org.zaval.lw
Class LwPaintManager

java.lang.Object
  |
  +--org.zaval.lw.LwPaintManager
All Implemented Interfaces:
LwManager
Direct Known Subclasses:
LwPaintManImpl

public abstract class LwPaintManager
extends java.lang.Object
implements LwManager

This manager is abstract class that is used as base for creating own paint managers for the light weight libarary. To create own paint manager it is necessary to implement updateComponent and paintComponent methods that define update and paint algorithms for a light weight component.

Use manager static field of the class to get current implementation of the paint manager. The field is set with LwToolkit.during initialization the library basing on the light weight properties file.

Any light weight component implementation has to use paint and repaint methods of the current paint manager to paint and repaint itself.


Constructor Summary
LwPaintManager()
           
 
Method Summary
 void paint(java.awt.Graphics g, LwComponent c)
          The method initiates painting process for the specified light weight component using the graphics.
protected abstract  void paintComponent(java.awt.Graphics g, LwComponent c)
          The method is called to paint the specified component.
protected abstract  void paintOnTop(java.awt.Graphics g, LwContainer c)
          Probably will be redesigned
 void repaint(LwComponent c)
          Repaints the specified light weight component.
 void repaint(LwComponent c, int x, int y, int w, int h)
          Repaints a part of the specified light weight component.
protected  void rootPaint(java.awt.Graphics g, LwComponent c)
          The method initiates painting process for the specified root light weight component using the graphics.
protected abstract  void updateComponent(java.awt.Graphics g, LwComponent c)
          The method is called to update the specified component.
 
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.LwManager
dispose
 

Constructor Detail

LwPaintManager

public LwPaintManager()
Method Detail

repaint

public void repaint(LwComponent c)
Repaints the specified light weight component.
Parameters:
c - the specified light weight component.

repaint

public void repaint(LwComponent c,
                    int x,
                    int y,
                    int w,
                    int h)
Repaints a part of the specified light weight component. The part is specified with the bound (location and size).
Parameters:
c - the specified light weight component.
x - the x coordinate of the repainting part.
y - the y coordinate of the repainting part.
w - the width of the repainting part.
h - the height of the repainting part.

rootPaint

protected void rootPaint(java.awt.Graphics g,
                         LwComponent c)
The method initiates painting process for the specified root light weight component using the graphics. The method has to be used with a light weight root component implementation to start painting process.
Parameters:
g - the specified graphics.
c - the specified root lightweight component.

paint

public void paint(java.awt.Graphics g,
                  LwComponent c)
The method initiates painting process for the specified light weight component using the graphics. The method has to be used with a light weight component implementation to paint itself.
Parameters:
g - the specified graphics.
c - the specified lightweight component.

updateComponent

protected abstract void updateComponent(java.awt.Graphics g,
                                        LwComponent c)
The method is called to update the specified component. The method has to just update the component, it doesn't care about updating any child components.
Parameters:
g - the specified graphics.
c - the specified lightweight component to be updated.

paintComponent

protected abstract void paintComponent(java.awt.Graphics g,
                                       LwComponent c)
The method is called to paint the specified component. The method has to just paint the component, it doesn't care about painting any child components.
Parameters:
g - the specified graphics.
c - the specified lightweight component to be painted.

paintOnTop

protected abstract void paintOnTop(java.awt.Graphics g,
                                   LwContainer c)
Probably will be redesigned


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