|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.WidgetAdapter
org.formaria.swing.SwingWidgetAdapter
public class SwingWidgetAdapter
Adapts the abstract component definition used by the common Aria (org.formaria.aria) package to the concrete definition of an Swing component.
Copyright (c) Formaria Ltd., 2008
License: see license.txt
| Field Summary |
|---|
| Fields inherited from class org.formaria.aria.WidgetAdapter |
|---|
instance |
| Constructor Summary | |
|---|---|
protected |
SwingWidgetAdapter()
|
| Method Summary | |
|---|---|
java.lang.Object |
add(java.lang.Object container,
java.lang.Object comp)
Add a component to the container |
java.lang.Object |
add(java.lang.Object container,
java.lang.Object comp,
java.lang.Object constraint)
Add a component to the container using a layout manager constraint |
java.lang.Object |
add(java.lang.Object container,
java.lang.Object comp,
java.lang.Object constraint,
int index)
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? |
PageSupport |
newPage()
Create a new pages |
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 |
setBorderStyle(java.lang.Object component,
java.lang.String borderStyle)
Sets the border style. |
void |
setBorderType(java.lang.Object component,
java.lang.String border)
Sets the border. |
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 |
setHorizontalAlignment(java.lang.Object component,
java.lang.String value)
Sets the horizontal alignment. |
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 |
setOpaque(java.lang.Object component,
boolean opaque)
Sets the opaque-property |
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 |
setTooltip(java.lang.Object component,
java.lang.String tooltip)
Sets the text which will be shown if the cursor rests over the component |
void |
setVerticalAlignment(java.lang.Object component,
java.lang.String value)
Sets the vertical alignment. |
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 |
| Constructor Detail |
|---|
protected SwingWidgetAdapter()
| Method Detail |
|---|
public static WidgetAdapter getInstance()
public java.lang.String getName(java.lang.Object component)
getName in class WidgetAdaptercomponent - The component instance
public int getComponentCount(java.lang.Object container)
getComponentCount in class WidgetAdaptercontainer - the container instance
public java.lang.Object[] getComponents(java.lang.Object container)
getComponents in class WidgetAdaptercontainer - the container instance
public java.lang.Object getComponent(java.lang.Object container,
int i)
getComponent in class WidgetAdaptercontainer - the container instancei - the component index
public boolean isVisible(java.lang.Object component)
isVisible in class WidgetAdaptercomponent - the component instance
public void setVisible(java.lang.Object component,
boolean state)
setVisible in class WidgetAdaptercomponent - 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 WidgetAdaptercomponent - the container instanceobj - the component to removepublic void removeAll(java.lang.Object component)
removeAll in class WidgetAdaptercomponent - the container instance
public java.lang.Object add(java.lang.Object container,
java.lang.Object comp)
add in class WidgetAdaptercontainer - the container instancecomp - the component to add
public java.lang.Object add(java.lang.Object container,
java.lang.Object comp,
java.lang.Object constraint)
add in class WidgetAdaptercontainer - the container instancecomp - the component to addconstraint - the layout constraint
public java.lang.Object add(java.lang.Object container,
java.lang.Object comp,
java.lang.Object constraint,
int index)
add in class WidgetAdaptercontainer - the container instancecomp - the component to addconstraint - the layout constraintthe - z-order index.
public void setLayout(java.lang.Object component,
java.lang.Object lm)
setLayout in class WidgetAdaptercomponent - the container instancelm - the LayoutManager instancepublic java.lang.Object getLayout(java.lang.Object component)
getLayout in class WidgetAdaptercomponent - the container instance
public void doLayout(java.lang.Object component)
doLayout in class WidgetAdaptercomponent - the container instance
public void setForeground(java.lang.Object component,
java.lang.Object c)
setForeground in class WidgetAdaptercomponent - the container instancec - the color
public void setBackground(java.lang.Object component,
java.lang.Object c)
setBackground in class WidgetAdaptercomponent - the container instancec - the color
public void setFont(java.lang.Object component,
java.lang.Object f)
setFont in class WidgetAdaptercomponent - the container instancef - the fontpublic java.lang.Object getSize(java.lang.Object component)
getSize in class WidgetAdaptercomponent - the container instance
public java.lang.Object getParent(java.lang.Object component)
getParent in class WidgetAdaptercomponent - the container instance
public void setEnabled(java.lang.Object component,
boolean b)
setEnabled in class WidgetAdaptercomponent - the container instanceb - true to enable
public void setCursor(java.lang.Object component,
java.lang.Object cursor)
setCursor in class WidgetAdaptercomponent - the container instancecursor - the cursor object
public void setBounds(java.lang.Object component,
int x,
int y,
int w,
int h)
setBounds in class WidgetAdaptercomponent - 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 WidgetAdaptercomponent - 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 WidgetAdaptercomponent - the container instancew - the width dimensionh - the height dimension
public void setPreferredSize(java.lang.Object component,
int w,
int h)
setPreferredSize in class WidgetAdaptercomponent - the container instancew - the width dimensionh - the height dimension
public void setMinimumSize(java.lang.Object component,
int w,
int h)
setMinimumSize in class WidgetAdaptercomponent - the container instancew - the width dimensionh - the height dimension
public void setMaximumSize(java.lang.Object component,
int w,
int h)
setMaximumSize in class WidgetAdaptercomponent - the container instancew - the width dimensionh - the height dimensionpublic java.lang.Object getLocation(java.lang.Object component)
getLocation in class WidgetAdaptercomponent - the container instance
public int getX(java.lang.Object component)
getX in class WidgetAdaptercomponent - the container instance
public int getY(java.lang.Object component)
getY in class WidgetAdaptercomponent - the container instance
public int getWidth(java.lang.Object component)
getWidth in class WidgetAdaptercomponent - the container instance
public int getHeight(java.lang.Object component)
getHeight in class WidgetAdaptercomponent - the container instance
public void setName(java.lang.Object component,
java.lang.String name)
setName in class WidgetAdaptercomponent - the container instancename - the new component namepublic void repaint(java.lang.Object component)
repaint in class WidgetAdaptercomponent - the container instancepublic boolean isContainer(java.lang.Object container)
isContainer in class WidgetAdaptercontainer - the container instance
public boolean requiresParent()
requiresParent in class WidgetAdapter
public void setTooltip(java.lang.Object component,
java.lang.String tooltip)
setTooltip in class WidgetAdaptercomponent - the container instancetooltip - the text to show
public void setOpaque(java.lang.Object component,
boolean opaque)
setOpaque in class WidgetAdaptercomponent - the container instanceopaque - true or false
public void setHorizontalAlignment(java.lang.Object component,
java.lang.String value)
WidgetAdapterAlignmentHelper
setHorizontalAlignment in class WidgetAdaptercomponent - the componentvalue - the value
public void setVerticalAlignment(java.lang.Object component,
java.lang.String value)
WidgetAdapterAlignmentHelper
setVerticalAlignment in class WidgetAdaptercomponent - the componentvalue - the value
public void setBorderType(java.lang.Object component,
java.lang.String border)
WidgetAdapter
setBorderType in class WidgetAdaptercomponent - the componentborder - the border
public void setBorderStyle(java.lang.Object component,
java.lang.String borderStyle)
WidgetAdapter
setBorderStyle in class WidgetAdaptercomponent - the componentborderStyle - the border stylepublic PageSupport newPage()
newPage in class WidgetAdapter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||