org.zaval.lw
Interface LwLayer

All Superinterfaces:
Drawable, Layoutable, LayoutContainer, LwComponent, LwContainer, Validationable
All Known Implementing Classes:
LwBaseLayer

public interface LwLayer
extends LwContainer

This layer interface is a special container that is used as the LwDesktop children. Desktop consists of the layers. Every layer is laid out by the desktop to place all desktop room. When an event is performed the desktop "asks" the layers starting from the tail layer if it is ready to get the event and delivers the event to the first-found layer. The layered structure of the desktop allows to implement additional features (for example, internal frame) basing on the LwVCL level.


Method Summary
 LwComponent getFocusRoot()
          Gets if the focus root component.
 java.lang.Object getID()
          Gets the layer id.
 boolean isActive()
          Gets if the layer is active.
 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.
 void releaseFocus()
          Invoked whenever the desktop lost focus.
 void setupFocus()
           
 
Methods inherited from interface org.zaval.lw.LwContainer
add, add, getLwLayout, indexOf, insert, paintOnTop, remove, removeAll, setLwLayout
 
Methods inherited from interface org.zaval.lw.LwComponent
canHaveFocus, getLwComponentAt, getLwParent, getViewMan, getVisiblePart, setBackground, setEnabled, setLwParent, setViewMan, setVisible
 
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
 
Methods inherited from interface org.zaval.lw.LayoutContainer
count, get, getLayoutOffset
 

Method Detail

getID

public java.lang.Object getID()
Gets the layer id.
Returns:
the layer id

releaseFocus

public void releaseFocus()
Invoked whenever the desktop lost focus.

setupFocus

public void setupFocus()

mousePressed

public void mousePressed(int x,
                         int y,
                         int mask)
Invoked whenever a mouse button has been pressed.
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)
Invoked whenever a key has been pressed.
Parameters:
keyCode - the key code.
mask - the keyboard trigger keys states.

isActive

public boolean isActive()
Gets if the layer is active.
Returns:
true if the layer is active.

getFocusRoot

public LwComponent getFocusRoot()
Gets if the focus root component.
Returns:
a focus root component.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org