: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

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 library. To create own paint manager it is necessary to implement the updateComponent, paintComponent and paintOnTop methods that define update and paint algorithms for a light weight component.

The manager provides set of methods that are supposed to be used by the library for painting:

  • startPaint The method should be used to start painting for the given desktop.
  • paint The method can be used paint the given light-weight component including its child components.
  • repaint The method has to be used to initiate repaint for the specified component.


Field Summary
static java.lang.Object LOCKER
          This is data that should be used as a synchronization locker to be synchronized with the light-weight painting procedure.
 
Constructor Summary
LwPaintManager()
           
 
Method Summary
 void dispose()
          Disposes the manager.
 void paint(java.awt.Graphics g, LwComponent c, LwComponent p)
          The method initiates painting process for the specified light weight component using the graphics.
protected abstract  void paintComponent(java.awt.Graphics g, LwComponent c, LwComponent p)
          The method is called to paint the specified component.
protected  void paintDesktop(java.awt.Graphics g, LwDesktop d)
          Paints the specified desktop.
protected abstract  void paintOnTop(java.awt.Graphics g, LwContainer c)
          The method is called whenever the specified container and its child components has been rendered.
 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 startPaint(java.awt.Graphics g, LwDesktop d)
          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, LwComponent p)
          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
 

Field Detail

LOCKER

public static final java.lang.Object LOCKER
This is data that should be used as a synchronization locker to be synchronized with the light-weight painting procedure.
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.

startPaint

protected void startPaint(java.awt.Graphics g,
                          LwDesktop d)
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.
d - the specified root lightweight component.

paintDesktop

protected void paintDesktop(java.awt.Graphics g,
                            LwDesktop d)
Paints the specified desktop. The method i called by the startPaint method.
Parameters:
g - the specified graphics.
d - the specified desktop.

paint

public void paint(java.awt.Graphics g,
                  LwComponent c,
                  LwComponent p)
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.
p - the specified lightweight parent component that has been painted before.

dispose

public void dispose()
Description copied from interface: LwManager
Disposes the manager. The method is supposed to be used for disposing different manager related structures to free system resources. The method is invoked by LwVCL core when the manager ends its "live".
Specified by:
dispose in interface LwManager

updateComponent

protected abstract void updateComponent(java.awt.Graphics g,
                                        LwComponent c,
                                        LwComponent p)
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.
p - the specified lightweight parent component that has been updated just before.

paintComponent

protected abstract void paintComponent(java.awt.Graphics g,
                                       LwComponent c,
                                       LwComponent p)
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.
p - the specified lightweight parent component that has been painted just before.

paintOnTop

protected abstract void paintOnTop(java.awt.Graphics g,
                                   LwContainer c)
The method is called whenever the specified container and its child components has been rendered. Probably the method will be redesigned.
Parameters:
g - the specified graphics.
c - the specified lightweight container.


: up