org.zaval.lw
Interface LwDesktop
- All Superinterfaces:
- Drawable, Layoutable, LayoutContainer, LwComponent, LwContainer, Validationable
- All Known Implementing Classes:
- LwRoot
- public interface LwDesktop
- extends LwContainer
This interface is top-level container for all other lightweight components. The main
purpose of the interface to provide abstraction level that binds the library with a
concrete GUI implementation. Every lightweight component is bound with a desktop
container. Use LwToolkit.getDesktop
method to get a desktop for the
specified lightweight component. The desktop consists of layers. Layer is a special
light weight container that is child component of the desktop. It is impossible
to add a not-layer component to the desktop. Use getRootLayer
method
to get the root layer. The layer should be used if you want to add a light weight
component on the desktop surface. The other available layer is the windows layer. The
layer provides functionality to work with internal frames.
Method Summary |
java.awt.Image |
createImage(int w,
int h)
Creates an off-screen drawable image to be used for double buffering with the specified width
and height. |
java.awt.Graphics |
getGraphics()
Gets a graphics context for this desktop. |
LwLayer |
getLayer(java.lang.Object id)
Gets the layer by the specified id. |
java.lang.Object[] |
getLayersIDs()
Gets the list of available layers' IDs. |
java.lang.Object |
getProperty(int id)
Gets the value for the specified property. |
LwLayer |
getRootLayer()
Gets the root layer that should be used to add a light weight component on the desktop
surface. |
void |
setProperty(int id,
java.lang.Object value)
Sets the value for the specified property. |
Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
getRootLayer
public LwLayer getRootLayer()
- Gets the root layer that should be used to add a light weight component on the desktop
surface.
- Returns:
- a root layer.
getLayer
public LwLayer getLayer(java.lang.Object id)
- Gets the layer by the specified id. There are two layers available by the "root" and "win" IDs.
- Parameters:
id
- by the specified id.- Returns:
- a layer.
getLayersIDs
public java.lang.Object[] getLayersIDs()
- Gets the list of available layers' IDs.
- Returns:
- a list of the layers' IDs.
getGraphics
public java.awt.Graphics getGraphics()
- Gets a graphics context for this desktop. This is adaptive method and it is used to bind
native GUI implementation with the components of the library.
- Returns:
- a graphics context.
createImage
public java.awt.Image createImage(int w,
int h)
- Creates an off-screen drawable image to be used for double buffering with the specified width
and height. This is adaptive method and it is used to bind native GUI implementation with the
components of the library.
- Parameters:
w
- the specified image width.h
- the specified image height.- Returns:
- an off-screen drawable image.
getProperty
public java.lang.Object getProperty(int id)
- Gets the value for the specified property.
- Parameters:
id
- the specified property id.- Returns:
- a value of the property.
setProperty
public void setProperty(int id,
java.lang.Object value)
- Sets the value for the specified property.
- Parameters:
id
- the specified property id.value
- the specified property value.
Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org