|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.xoetrope.xui.WidgetAdapter
net.xoetrope.swt.SwtWidgetAdapter
public class SwtWidgetAdapter
Adapts the abstract component definition used by the common xui (net.xoetrope.xui) package to the concrete definition of an SWT component.
Copyright (c) Xoetrope Ltd., 1998-2005
License: see license.txt
Field Summary | |
---|---|
protected static org.eclipse.swt.widgets.Composite |
hiddenPage
|
Fields inherited from class net.xoetrope.xui.WidgetAdapter |
---|
instance |
Method Summary | |
---|---|
void |
add(java.lang.Object container,
java.lang.Object comp)
Add a component to the container |
void |
add(java.lang.Object container,
java.lang.Object comp,
java.lang.Object constraint)
Add a component to the container using a layout manager constraint |
void |
doLayout(java.lang.Object component)
Request that the container updates its layout |
java.lang.Object |
getComponent(java.lang.Object container,
int i)
Get the child component at a specific index within the container. |
int |
getComponentCount(java.lang.Object container)
Get the number of child components owned by this component, assuming that the component is a container. |
java.lang.Object[] |
getComponents(java.lang.Object container)
Get the children. |
int |
getHeight(java.lang.Object component)
Get the component height |
static WidgetAdapter |
getInstance()
Get an instance of this adapter. |
java.lang.Object |
getLayout(java.lang.Object component)
Get the layout manager used by the container |
java.lang.Object |
getLocation(java.lang.Object component)
Get the location of the component |
java.lang.String |
getName(java.lang.Object component)
Get the name of the object |
java.lang.Object |
getParent(java.lang.Object component)
Get the parent/owner object |
java.lang.Object |
getSize(java.lang.Object component)
Get the size of the component |
int |
getWidth(java.lang.Object component)
Get the component width |
int |
getX(java.lang.Object component)
Get the location of the component's left (X) edge |
int |
getY(java.lang.Object component)
Get the location of the component's top (Y) edge |
boolean |
isContainer(java.lang.Object container)
Check if the component is a container object, that is that it is capable of containing children |
boolean |
isVisible(java.lang.Object component)
Is the component visible? |
void |
remove(java.lang.Object component,
java.lang.Object obj)
Remove a component from the container |
void |
removeAll(java.lang.Object component)
Remove all components from the container |
void |
repaint(java.lang.Object component)
Request that the component repaints itself |
boolean |
requiresParent()
Check whether or not constructing an object requires the parent or if an argumentless constructor can be used. |
void |
setBackground(java.lang.Object component,
java.lang.Object c)
Set the background color |
void |
setBounds(java.lang.Object component,
int x,
int y,
int w,
int h)
Set the current bounds for the component |
void |
setCursor(java.lang.Object component,
java.lang.Object cursor)
Set the current cursor for the component |
void |
setEnabled(java.lang.Object component,
boolean b)
Set the enabled state of the component |
void |
setFont(java.lang.Object component,
java.lang.Object f)
Set the font |
void |
setForeground(java.lang.Object component,
java.lang.Object c)
Set the foreground color |
static void |
setHiddenPage(org.eclipse.swt.widgets.Composite hp)
Sets the hidden page to which removed components are moved. |
void |
setLayout(java.lang.Object component,
java.lang.Object lm)
Set the layout manager for the container |
void |
setLocation(java.lang.Object component,
int x,
int y)
Set the current location of the component |
void |
setMaximumSize(java.lang.Object component,
int w,
int h)
Set the maximum size of the component |
void |
setMinimumSize(java.lang.Object component,
int w,
int h)
Set the minimum size of the component |
void |
setName(java.lang.Object component,
java.lang.String name)
Set the name of the component |
void |
setPreferredSize(java.lang.Object component,
int w,
int h)
Set the size of the component |
void |
setSize(java.lang.Object component,
int w,
int h)
Set the size of the component |
void |
setVisible(java.lang.Object component,
boolean state)
Set the component visiblity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.eclipse.swt.widgets.Composite hiddenPage
Method Detail |
---|
public static void setHiddenPage(org.eclipse.swt.widgets.Composite hp)
hp
- the hidden pagepublic static WidgetAdapter getInstance()
public java.lang.String getName(java.lang.Object component)
getName
in class WidgetAdapter
component
- the component instance
public int getComponentCount(java.lang.Object container)
getComponentCount
in class WidgetAdapter
container
- the container instance
public java.lang.Object[] getComponents(java.lang.Object container)
getComponents
in class WidgetAdapter
container
- the container instance
public java.lang.Object getComponent(java.lang.Object container, int i)
getComponent
in class WidgetAdapter
container
- the container instancei
- the component index
public boolean isVisible(java.lang.Object component)
isVisible
in class WidgetAdapter
component
- the component instance
public void setVisible(java.lang.Object component, boolean state)
setVisible
in class WidgetAdapter
component
- the component instancestate
- true if the component is to be made visiblepublic void remove(java.lang.Object component, java.lang.Object obj)
remove
in class WidgetAdapter
component
- the container instanceobj
- the component to removepublic void removeAll(java.lang.Object component)
removeAll
in class WidgetAdapter
component
- the container instancepublic void add(java.lang.Object container, java.lang.Object comp)
add
in class WidgetAdapter
container
- the container instancecomp
- the component to addpublic void add(java.lang.Object container, java.lang.Object comp, java.lang.Object constraint)
add
in class WidgetAdapter
container
- the container instancecomp
- the component to addconstraint
- the layout constraintpublic void setLayout(java.lang.Object component, java.lang.Object lm)
setLayout
in class WidgetAdapter
component
- the container instancelm
- the LayoutManager instancepublic java.lang.Object getLayout(java.lang.Object component)
getLayout
in class WidgetAdapter
component
- the container instance
public void doLayout(java.lang.Object component)
doLayout
in class WidgetAdapter
component
- the container instancepublic void setForeground(java.lang.Object component, java.lang.Object c)
setForeground
in class WidgetAdapter
component
- the container instancec
- the colorpublic void setBackground(java.lang.Object component, java.lang.Object c)
setBackground
in class WidgetAdapter
component
- the container instancec
- the colorpublic void setFont(java.lang.Object component, java.lang.Object f)
setFont
in class WidgetAdapter
component
- the container instancef
- the fontpublic java.lang.Object getSize(java.lang.Object component)
getSize
in class WidgetAdapter
component
- the container instance
public java.lang.Object getParent(java.lang.Object component)
getParent
in class WidgetAdapter
component
- the container instance
public void setEnabled(java.lang.Object component, boolean b)
setEnabled
in class WidgetAdapter
component
- the container instanceb
- true to enablepublic void setCursor(java.lang.Object component, java.lang.Object cursor)
setCursor
in class WidgetAdapter
component
- the container instancecursor
- the cursor objectpublic void setBounds(java.lang.Object component, int x, int y, int w, int h)
setBounds
in class WidgetAdapter
component
- the container instancex
- the left/x edge coordinatesy
- the top/y edge coordinatesw
- the width dimensionh
- the height dimensionpublic void setLocation(java.lang.Object component, int x, int y)
setLocation
in class WidgetAdapter
component
- the container instancex
- the left/x edge coordinatesy
- the top/y edge coordinatespublic void setSize(java.lang.Object component, int w, int h)
setSize
in class WidgetAdapter
component
- the container instancew
- the width dimensionh
- the height dimensionpublic void setPreferredSize(java.lang.Object component, int w, int h)
setPreferredSize
in class WidgetAdapter
component
- the container instancew
- the width dimensionh
- the height dimensionpublic void setMinimumSize(java.lang.Object component, int w, int h)
setMinimumSize
in class WidgetAdapter
component
- the container instancew
- the width dimensionh
- the height dimensionpublic void setMaximumSize(java.lang.Object component, int w, int h)
setMaximumSize
in class WidgetAdapter
component
- the container instancew
- the width dimensionh
- the height dimensionpublic java.lang.Object getLocation(java.lang.Object component)
getLocation
in class WidgetAdapter
component
- the container instance
public int getX(java.lang.Object component)
getX
in class WidgetAdapter
component
- the container instance
public int getY(java.lang.Object component)
getY
in class WidgetAdapter
component
- the container instance
public int getWidth(java.lang.Object component)
getWidth
in class WidgetAdapter
component
- the container instance
public int getHeight(java.lang.Object component)
getHeight
in class WidgetAdapter
component
- the container instance
public void setName(java.lang.Object component, java.lang.String name)
setName
in class WidgetAdapter
component
- the container instancename
- the new component namepublic void repaint(java.lang.Object component)
repaint
in class WidgetAdapter
component
- the container instancepublic boolean isContainer(java.lang.Object container)
isContainer
in class WidgetAdapter
container
- the container instance
public boolean requiresParent()
requiresParent
in class WidgetAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |