org.zaval.lw
Class LwCursorView

java.lang.Object
  |
  +--org.zaval.util.ValidationObject
        |
        +--org.zaval.lw.LwView
              |
              +--org.zaval.lw.LwCursorView
All Implemented Interfaces:
Validationable

public class LwCursorView
extends LwView

This class is used as a LwTextField caret view.


Fields inherited from class org.zaval.lw.LwView
MOSAIC, ORIGINAL, STRETCH
 
Fields inherited from class org.zaval.util.ValidationObject
isValidFlag
 
Constructor Summary
LwCursorView()
          Constructs the view.
 
Method Summary
protected  java.awt.Dimension calcPreferredSize()
          Calculates and returns the view preferred size.
 void paint(java.awt.Graphics g, int x, int y, int w, int h, Drawable d)
          Paints the view using the given width and height.
 void setCursorColor(java.awt.Color c)
          Sets the specified caret color.
 
Methods inherited from class org.zaval.lw.LwView
getInsets, getPreferredSize, getType, ownerChanged, 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

LwCursorView

public LwCursorView()
Constructs the view. The view will use STRETCH type as a default view type.
Method Detail

setCursorColor

public void setCursorColor(java.awt.Color c)
Sets the specified caret color.
Parameters:
c - the specified caret color.

calcPreferredSize

protected java.awt.Dimension calcPreferredSize()
Calculates and returns the view preferred size.
Overrides:
calcPreferredSize in class LwView
Returns:
a "pure" preferred size of the view.

paint

public void paint(java.awt.Graphics g,
                  int x,
                  int y,
                  int w,
                  int h,
                  Drawable d)
Paints the view using the given width and height. The location where the view has to be painted is determined with x and y coordinates.
Overrides:
paint in class LwView
Parameters:
g - the specified context to be used for painting.
x - the x coordinate.
y - the y coordinate.
w - the width of the view.
h - the height of the view.
d - the owner component.


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