org.zaval.lw
Class LwRender

java.lang.Object
  |
  +--org.zaval.util.ValidationObject
        |
        +--org.zaval.lw.LwView
              |
              +--org.zaval.lw.LwRender
All Implemented Interfaces:
Validationable
Direct Known Subclasses:
LwCompRender, LwImgRender, LwTextRender

public abstract class LwRender
extends LwView

This abstract class is used as base for lightweight renders implementations. The main purpose of a render is to provide face for an object (text, image and so on). So, to create own render it is necessary to inherit the class and implement paint method of the new class.


Fields inherited from class org.zaval.lw.LwView
MOSAIC, ORIGINAL, STRETCH
 
Fields inherited from class org.zaval.util.ValidationObject
isValidFlag
 
Constructor Summary
LwRender(java.lang.Object target)
          Constructs the render with the specified target component that should be rendered.
LwRender(java.lang.Object target, int type)
          Constructs the render with the specified target component that should be rendered and the specified view type.
 
Method Summary
 java.lang.Object getTarget()
          Gets the target object.
 void setTarget(java.lang.Object o)
          Sets the specified target object.
protected  void targetWasChanged(java.lang.Object o, java.lang.Object n)
          Invoked whenever the target object has been set.
 
Methods inherited from class org.zaval.lw.LwView
calcPreferredSize, getInsets, getPreferredSize, getType, ownerChanged, paint, paint, recalc, setType
 
Methods inherited from class org.zaval.util.ValidationObject
invalidate, isValid, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LwRender

public LwRender(java.lang.Object target)
Constructs the render with the specified target component that should be rendered. The constructor sets ORIGINAL view type.
Parameters:
target - the target component.

LwRender

public LwRender(java.lang.Object target,
                int type)
Constructs the render with the specified target component that should be rendered and the specified view type.
Parameters:
target - the target component to be rendered.
type - the specified view type.
Method Detail

getTarget

public java.lang.Object getTarget()
Gets the target object.
Returns:
a target object.

setTarget

public void setTarget(java.lang.Object o)
Sets the specified target object.
Parameters:
o - the target object.

targetWasChanged

protected void targetWasChanged(java.lang.Object o,
                                java.lang.Object n)
Invoked whenever the target object has been set. The method can be overrided if the render wants to be notified about re-setting the target object.
Parameters:
o - the old target object.
n - the new target object.


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