|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.xoetrope.xui.WidgetAdapter
public abstract class WidgetAdapter
Adapts the abstract component definition used by the common xui (net.xoetrope.xui) package to the concrete definition of a widget as required by an individual widget set such as AWT, Swing, SWT or HTML components.
The widget adapter generally does little more than casting the abstract widget reference to the appropriate type. The interface specifies only those methods used by XUI to manipulate components, it is not intended for any other use. By the same token it does not prevent access to the methods of the underlying class.
Copyright (c) Xoetrope Ltd., 1998-2005
License: see license.txtField Summary | |
---|---|
protected static WidgetAdapter |
instance Get the instance of the adapter |
Constructor Summary | |
---|---|
WidgetAdapter() |
Method Summary | |
---|---|
abstract void |
add(java.lang.Object component, java.lang.Object comp) Add a component to the container |
abstract void |
add(java.lang.Object component, java.lang.Object comp, java.lang.Object constraint) Add a component to the container using a layout manager constraint |
abstract void |
doLayout(java.lang.Object component) Request that the container updates its layout |
abstract java.lang.Object |
getComponent(java.lang.Object container, int i) Get the child component at a specific index within the container. |
abstract int |
getComponentCount(java.lang.Object container) Get the number of child components owned by this component, assuming that the component is a container. |
abstract java.lang.Object[] |
getComponents(java.lang.Object container) Get the children. |
abstract int |
getHeight(java.lang.Object component) Get the component height |
static WidgetAdapter |
getInstance() Get an instance of this adapter. |
abstract java.lang.Object |
getLayout(java.lang.Object component) Get the layout manager used by the container |
abstract java.lang.Object |
getLocation(java.lang.Object component) Get the location of the component |
abstract java.lang.String |
getName(java.lang.Object component) Get the name of the object |
abstract java.lang.Object |
getParent(java.lang.Object component) Get the parent/owner object |
abstract java.lang.Object |
getSize(java.lang.Object component) Get the size of the component |
abstract int |
getWidth(java.lang.Object component) Get the component width |
abstract int |
getX(java.lang.Object component) Get the location of the component's left (X) edge |
abstract int |
getY(java.lang.Object component) Get the location of the component's top (Y) edge |
abstract boolean |
isContainer(java.lang.Object container) Check if the component is a container object, that is that it is capable of containing children |
abstract boolean |
isVisible(java.lang.Object component) Is the component visible? |
abstract void |
remove(java.lang.Object component, java.lang.Object obj) Remove a component from the container |
abstract void |
repaint(java.lang.Object component) Request that the component repaints itself |
abstract void |
setBackground(java.lang.Object component, java.lang.Object c) Set the background color |
abstract void |
setBounds(java.lang.Object component, int x, int y, int w, int h) Set the current bounds for the component |
abstract void |
setCursor(java.lang.Object component, java.lang.Object cursor) Set the current cursor for the component |
abstract void |
setEnabled(java.lang.Object component, boolean b) Set the enabled state of the component |
abstract void |
setFont(java.lang.Object component, java.lang.Object f) Set the font |
abstract void |
setForeground(java.lang.Object component, java.lang.Object c) Set the foreground color |
abstract void |
setLayout(java.lang.Object component, java.lang.Object lm) Set the layout manager for the container |
abstract void |
setLocation(java.lang.Object component, int x, int y) Set the current location of the component |
abstract void |
setName(java.lang.Object component, java.lang.String name) Set the name of the component |
abstract void |
setSize(java.lang.Object component, int w, int h) Set the size of the component |
abstract 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 WidgetAdapter instance
Constructor Detail |
---|
public WidgetAdapter()
Method Detail |
---|
public static WidgetAdapter getInstance()
public abstract java.lang.String getName(java.lang.Object component)
component
- The component instancepublic abstract int getComponentCount(java.lang.Object container)
container
- the container instancepublic abstract java.lang.Object[] getComponents(java.lang.Object container)
container
- the container instancepublic abstract java.lang.Object getComponent(java.lang.Object container, int i)
container
- the container instancei
- the component indexpublic abstract boolean isVisible(java.lang.Object component)
component
- the component instancepublic abstract void setVisible(java.lang.Object component, boolean state)
component
- the component instancestate
- true if the component is to be made visiblepublic abstract void remove(java.lang.Object component, java.lang.Object obj)
component
- the container instanceobj
- the component to removepublic abstract void add(java.lang.Object component, java.lang.Object comp)
component
- the container instancecomp
- the component to addpublic abstract void add(java.lang.Object component, java.lang.Object comp, java.lang.Object constraint)
component
- the container instancecomp
- the component to addconstraint
- the layout constraintpublic abstract void setLayout(java.lang.Object component, java.lang.Object lm)
component
- the container instancelm
- the LayoutManager instancepublic abstract java.lang.Object getLayout(java.lang.Object component)
component
- the container instancepublic abstract void doLayout(java.lang.Object component)
component
- the container instancepublic abstract void setForeground(java.lang.Object component, java.lang.Object c)
component
- the container instancec
- the colorpublic abstract void setBackground(java.lang.Object component, java.lang.Object c)
component
- the container instancec
- the colorpublic abstract void setFont(java.lang.Object component, java.lang.Object f)
component
- the container instancef
- the fontpublic abstract java.lang.Object getSize(java.lang.Object component)
component
- the container instancepublic abstract int getX(java.lang.Object component)
component
- the container instancepublic abstract int getY(java.lang.Object component)
component
- the container instancepublic abstract int getWidth(java.lang.Object component)
component
- the container instancepublic abstract int getHeight(java.lang.Object component)
component
- the container instancepublic abstract java.lang.Object getParent(java.lang.Object component)
component
- the container instancepublic abstract void setEnabled(java.lang.Object component, boolean b)
component
- the container instanceb
- true to enablepublic abstract void setCursor(java.lang.Object component, java.lang.Object cursor)
component
- the container instancecursor
- the cursor objectpublic abstract void setBounds(java.lang.Object component, int x, int y, int w, int h)
component
- the container instancex
- the left/x edge coordinatesy
- the top/y edge coordinatesw
- the width dimensionh
- the height dimensionpublic abstract void setLocation(java.lang.Object component, int x, int y)
component
- the container instancex
- the left/x edge coordinatesy
- the top/y edge coordinatespublic abstract void setSize(java.lang.Object component, int w, int h)
component
- the container instancew
- the width dimensionh
- the height dimensionpublic abstract java.lang.Object getLocation(java.lang.Object component)
component
- the container instancepublic abstract void setName(java.lang.Object component, java.lang.String name)
component
- the container instancename
- the new component namepublic abstract void repaint(java.lang.Object component)
component
- the container instancepublic abstract boolean isContainer(java.lang.Object container)
container
- the container instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |