|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.zaval.util.ValidationObject | +--org.zaval.lw.LwView | +--org.zaval.lw.LwBorder
The class implements set of borders views. The library registers the views as static objects that can be used by the border view key. It is possible to use following keys to get a border view as a static object:
Field Summary | |
static int |
DOT
The DOT border type. |
static int |
ETCHED
The ETCHED border type. |
static int |
PLAIN
The PLAIN border type. |
static int |
RAISED
The RAISED border type. |
static int |
SUNKEN
The SUNKEN border type. |
static int |
SUNKEN2
The SUNKEN2 border type. |
Fields inherited from class org.zaval.lw.LwView |
MOSAIC, ORIGINAL, STRETCH |
Fields inherited from class org.zaval.util.ValidationObject |
isValidFlag |
Constructor Summary | |
LwBorder(int type)
Constructs the new border view with the specified border type. |
Method Summary | |
protected void |
bottomLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
Draws the bottom horizontal border line between the coordinates (x1,y1) and (x2,y2). |
protected java.awt.Dimension |
calcPreferredSize()
Calculates and returns the view preferred size. |
int |
getBorderType()
Gets the border type. |
java.awt.Insets |
getInsets()
Gets the view insets. |
protected void |
leftLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
Draws the left vertical border line between the coordinates (x1,y1) and (x2,y2). |
void |
paint(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Drawable d)
Paints the view using a given width and height. |
protected void |
rightLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
Draws the right vertical border line between the coordinates (x1,y1) and (x2,y2). |
protected void |
topLine(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2)
Draws the top horizontal border line between the coordinates (x1,y1) and (x2,y2). |
Methods inherited from class org.zaval.lw.LwView |
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 |
Field Detail |
public static final int RAISED
public static final int SUNKEN
public static final int ETCHED
public static final int PLAIN
public static final int DOT
public static final int SUNKEN2
Constructor Detail |
public LwBorder(int type)
type
- the specified border type.Method Detail |
public int getBorderType()
protected void leftLine(java.awt.Graphics g, int x1, int y1, int x2, int y2)
g
- the specified context to be used for drawing.x1
- the x coordinate of the start of the line.y1
- the y coordinate of the start of the line.x2
- the x coordinate of the end of the line.y2
- the y coordinate of the end of the line.protected void rightLine(java.awt.Graphics g, int x1, int y1, int x2, int y2)
g
- the specified context to be used for drawing.x1
- the x coordinate of the start of the line.y1
- the y coordinate of the start of the line.x2
- the x coordinate of the end of the line.y2
- the y coordinate of the end of the line.protected void topLine(java.awt.Graphics g, int x1, int y1, int x2, int y2)
g
- the specified context to be used for drawing.x1
- the x coordinate of the start of the line.y1
- the y coordinate of the start of the line.x2
- the x coordinate of the end of the line.y2
- the y coordinate of the end of the line.protected void bottomLine(java.awt.Graphics g, int x1, int y1, int x2, int y2)
g
- the specified context to be used for drawing.x1
- the x coordinate of the start of the line.y1
- the y coordinate of the start of the line.x2
- the x coordinate of the end of the line.y2
- the y coordinate of the end of the line.public void paint(java.awt.Graphics g, int x, int y, int w, int h, Drawable d)
x
and y
coordinates. This method is implemented with the border view and this defines
face of the view.paint
in class LwView
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.public java.awt.Insets getInsets()
getInsets
in class LwView
protected java.awt.Dimension calcPreferredSize()
LwView
calcPreferredSize
in class LwView
org.zaval.lw.LwView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |