|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.WidgetAdapter
net.xoetrope.swing.SwingWidgetAdapter
public class SwingWidgetAdapter
Adapts the abstract component definition used by the common XUI (net.xoetrope.xui) package to the concrete definition of an Swing component.
Copyright (c) Xoetrope Ltd., 1998-2005
License: see license.txt| Field Summary |
|---|
| 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 |
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 |
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 |
setName(java.lang.Object component, java.lang.String name)Set the name 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 |
| Method Detail |
|---|
public static WidgetAdapter getInstance()
public java.lang.String getName(java.lang.Object component)
getName in class WidgetAdapter
component - The component instancepublic int getComponentCount(java.lang.Object container)
getComponentCount in class WidgetAdapter
container - the container instancepublic 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 indexpublic 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 visible
public 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 instance
public void add(java.lang.Object container,
java.lang.Object comp)
add in class WidgetAdapter
container - the container instancecomp - the component to add
public 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 constraint
public 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 instancepublic void doLayout(java.lang.Object component)
doLayout in class WidgetAdapter
component - the container instance
public void setForeground(java.lang.Object component,
java.lang.Object c)
setForeground in class WidgetAdapter
component - the container instancec - the color
public void setBackground(java.lang.Object component,
java.lang.Object c)
setBackground in class WidgetAdapter
component - the container instancec - the color
public 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 instancepublic 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 enable
public void setCursor(java.lang.Object component,
java.lang.Object cursor)
setCursor in class WidgetAdapter
component - the container instancecursor - the cursor object
public 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 dimension
public 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 coordinates
public void setSize(java.lang.Object component,
int w,
int h)
setSize 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 instancepublic int getX(java.lang.Object component)
getX in class WidgetAdapter
component - the container instancepublic int getY(java.lang.Object component)
getY in class WidgetAdapter
component - the container instancepublic int getWidth(java.lang.Object component)
getWidth in class WidgetAdapter
component - the container instancepublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||