org.zaval.lw
Class LwTabRender
java.lang.Object
|
+--org.zaval.util.ValidationObject
|
+--org.zaval.lw.LwView
|
+--org.zaval.lw.LwRender
|
+--org.zaval.lw.LwTextRender
|
+--org.zaval.lw.LwTabRender
- All Implemented Interfaces:
- java.util.EventListener, TextListener, Validationable
- public class LwTabRender
- extends LwTextRender
This render is used to paint tab page of LwNotebook component. It inherits the
LwTextRender, so the page tab is a text that is bound with a special border.
Constructor Summary |
LwTabRender(java.lang.String s)
Constructs the render with the specified target text. |
Method Summary |
protected java.awt.Dimension |
calcPreferredSize()
Calculates and returns the render preferred size. |
void |
paint(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Drawable d)
Paints the render using a given width and height. |
protected void |
paintPage(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Drawable d)
Paints the border for the view. |
Methods inherited from class org.zaval.lw.LwTextRender |
getAscent, getFont, getFontMetrics, getForeground, getLine, getLineHeight, getLineIndent, getText, getTextModel, invalidate, invalidate, lineWidth, ownerChanged, paintLine, recalc, setFont, setForeground, stringWidth, substrWidth, targetWasChanged, textInserted, textRemoved, textUpdated |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LwTabRender
public LwTabRender(java.lang.String s)
- Constructs the render with the specified target text.
- Parameters:
s
- the specified tab text.
paint
public void paint(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Drawable d)
- Paints the render using a given width and height. The location where the
view has to be painted is determined with
x
and y
coordinates. This abstract method has to be implmented to define a "face" for the view.
- Overrides:
paint
in class LwTextRender
- 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.
calcPreferredSize
protected java.awt.Dimension calcPreferredSize()
- Calculates and returns the render preferred size. The method doesn't use
the view insets to compute the preferred size.
- Overrides:
calcPreferredSize
in class LwTextRender
- Returns:
- a "pure" preferred size of the view.
paintPage
protected void paintPage(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Drawable d)
- Paints the border for the view. The border type depends on a page tab
orientation that can have following values: Alignment.TOP, Alignment.BOTTOM,
Alignment.LEFT, Alignment.RIGHT.
- 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