org.zaval.lw
Class LwBaseLayer
java.lang.Object
|
+--org.zaval.lw.LwCanvas
|
+--org.zaval.lw.LwPanel
|
+--org.zaval.lw.LwBaseLayer
- All Implemented Interfaces:
- Layoutable, LayoutContainer, LwComponent, LwContainer, LwLayer, Validationable
- Direct Known Subclasses:
- LwPopupLayer, LwWinLayer
- public class LwBaseLayer
- extends LwPanel
- implements LwLayer
This is base implementation of the layer interface.
| Fields inherited from class org.zaval.lw.LwCanvas |
bits, bottom, height, isValidValue, left, parent, psHeight, psWidth, right, skins, temporary, top, width, x, y |
|
Constructor Summary |
LwBaseLayer(java.lang.Object id)
Constructs the layer with the specified id. |
|
Method Summary |
void |
activate(boolean b)
Invoked whenever the layer has been activated or de-activated. |
LwComponent |
getFocusRoot()
Gets if the focus root component. |
java.lang.Object |
getID()
Gets the layer id. |
boolean |
isActive()
Tests if the layer is active. |
boolean |
isActiveAt(int x,
int y)
Tests if the layer is active at the specified location. |
void |
keyPressed(int keyCode,
int mask)
Invoked whenever a key has been pressed. |
void |
mousePressed(int x,
int y,
int mask)
Invoked whenever a mouse button has been pressed. |
| Methods inherited from class org.zaval.lw.LwPanel |
add, add, calcPreferredSize, count, get, getDefaultLayout, getLayoutOffset, getLwComponentAt, getLwLayout, getPreferredSize, indexOf, insert, insert, invalidate, isInvalidatedByChild, laidout, paintOnTop, remove, remove, removeAll, setBackground, setLwLayout, setOpaque, setSize, toFront, updateCashedPs, validate |
| Methods inherited from class org.zaval.lw.LwCanvas |
calcInsets, canHaveFocus, customize, cvp, getBackground, getBottom, getBounds, getHeight, getInsets, getLeft, getLocation, getLwParent, getOrigin, getPSImpl, getRight, getSize, getTop, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isValid, isVisible, paint, recalc, repaint, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setViewMan, setVisible, update, viewManChanged, vrp |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.zaval.lw.LwComponent |
canHaveFocus, getBackground, getLwComponentAt, getLwParent, getOrigin, getViewMan, getVisiblePart, isEnabled, isOpaque, paint, repaint, repaint, repaint, setBackground, setEnabled, setInsets, setLwParent, setOpaque, setViewMan, setVisible, update |
| Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
LwBaseLayer
public LwBaseLayer(java.lang.Object id)
- Constructs the layer with the specified id.
- Parameters:
id - the specified id.
getID
public java.lang.Object getID()
- Description copied from interface:
LwLayer
- Gets the layer id.
- Specified by:
getID in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Returns:
- the layer id
activate
public void activate(boolean b)
- Description copied from interface:
LwLayer
- Invoked whenever the layer has been activated or de-activated.
- Specified by:
activate in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Parameters:
b - the flag specifies if the layer has been activated or de-activated.
The argument value is true if the layer has been activated.
mousePressed
public void mousePressed(int x,
int y,
int mask)
- Description copied from interface:
LwLayer
- Invoked whenever a mouse button has been pressed.
- Specified by:
mousePressed in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Parameters:
x - the x coordinate of the mouse pointer.y - the y coordinate of the mouse pointer.mask - the mask that specifies mouse buttons states.
keyPressed
public void keyPressed(int keyCode,
int mask)
- Description copied from interface:
LwLayer
- Invoked whenever a key has been pressed.
- Specified by:
keyPressed in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Parameters:
keyCode - the key code.mask - the keyboard trigger keys states.
isActive
public boolean isActive()
- Description copied from interface:
LwLayer
- Tests if the layer is active.
- Specified by:
isActive in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Returns:
true if the layer is active.
isActiveAt
public boolean isActiveAt(int x,
int y)
- Description copied from interface:
LwLayer
- Tests if the layer is active at the specified location. As rule the method is called when
a mouse (pointer) event happened.
- Specified by:
isActiveAt in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Parameters:
x - the x coordinate.y - the y coordinate.- Returns:
true if the layer is active.
getFocusRoot
public LwComponent getFocusRoot()
- Description copied from interface:
LwLayer
- Gets if the focus root component.
- Specified by:
getFocusRoot in interface LwLayer
- Following copied from interface:
org.zaval.lw.LwLayer
- Returns:
- a focus root component.
|