|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is basic interface for GUI components of the light weight library. Every GUI components of the library should implement the interface. Actually the interface is analog of java.awt.Component class that is provided with Java AWT library. The lightweight library provides an implementation of the interface - LwCanvas - that is more handly for usage. To create lightweight components just to inherit the class. The another variation of the interface is lightweight container interface - LwContainer. The interface extends the component interface and has implementation to create own lightweight containers - LwPanel.
Method Summary | |
boolean |
canHaveFocus()
Specifies if the component can have focus. |
LwComponent |
getLwComponentAt(int x,
int y)
Determines if the component or an immediate child component contains the (x, y) location in its visible part and if so, returns the component. |
LwComponent |
getLwParent()
Gets the lightweight parent of this component. |
LwViewMan |
getViewMan(boolean autoCreate)
Returns a view manager of the component. |
java.awt.Rectangle |
getVisiblePart()
Returns the bounding rectangle of the visible part for the component. |
void |
setBackground(java.awt.Color c)
Sets the background color of this component. |
void |
setEnabled(boolean b)
Enables or disables this component. |
void |
setLwParent(LwComponent p)
Sets the lightweight parent of this component. |
void |
setViewMan(LwViewMan man)
Sets the specified view manager for the component. |
void |
setVisible(boolean b)
Shows or hides this lightweight component depending on the value of parameter b . |
Methods inherited from interface org.zaval.lw.Drawable |
getBackground, getOrigin, isEnabled, isOpaque, paint, repaint, repaint, setOpaque, update |
Methods inherited from interface org.zaval.util.Validationable |
invalidate, isValid, validate |
Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
Method Detail |
public java.awt.Rectangle getVisiblePart()
public LwComponent getLwComponentAt(int x, int y)
x
- the x coordinate.y
- the y coordinate.null
if the location is outside this component.public LwComponent getLwParent()
public void setLwParent(LwComponent p)
p
- the specified parent container.public void setEnabled(boolean b)
b
- if the value is true
- enables the component;
otherwise disables this component.public void setVisible(boolean b)
b
.b
- if it is true
, shows this component;
otherwise, hides this component.public void setBackground(java.awt.Color c)
c
- the color to become this component background color.public LwViewMan getViewMan(boolean autoCreate)
null
.
The input argument autoCreate
defines if the view manager has to be created
automatically in a case if it has not been determined before. It means, if the argument is
true
and the view manager is null
, than the component will
try to create and initialize its view manager by a default view manager. If the argument
is false
than the method returns the component view manager as is.autoCreate
- the flag defines if the view manager should be created
automatically.public void setViewMan(LwViewMan man)
man
- the view manager to set for the component.public boolean canHaveFocus()
true
if the component can have the focus.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |