org.zaval.lw.gdp
Class DgnBorder
java.lang.Object
|
+--org.zaval.lw.LwView
|
+--org.zaval.lw.gdp.DgnBorder
- All Implemented Interfaces:
- Validationable
- public class DgnBorder
- extends LwView
This is special border view implementation. The border renders special square
areas where the component can be resized. The view is used by designer controller
to create designer container component. Take a look at the image below where the
button component uses the view as its border:
|
Constructor Summary |
DgnBorder()
Constructs a new border view. |
|
Method Summary |
java.awt.Color |
getBorderColor()
Gets the border color. |
int |
getBottom()
Gets the bottom indent. |
int |
getGap()
Gets the gap. |
int |
getLeft()
Gets the left indent. |
int |
getRight()
Gets the right indent. |
int |
getTop()
Gets the top indent. |
void |
paint(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Layoutable d)
Paints the view using the given width and height. |
void |
setBorderColor(java.awt.Color c)
Sets the specified border color. |
void |
setGap(int g)
Sets the given gap. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DgnBorder
public DgnBorder()
- Constructs a new border view.
getGap
public int getGap()
- Gets the gap. The gap specifies indents from top, left, right and bottom
sides.
- Returns:
- a gap.
setGap
public void setGap(int g)
- Sets the given gap. The gap specifies indents from top, left, right and bottom
sides.
- Parameters:
g - the specified gap.
getTop
public int getTop()
- Description copied from class:
LwView
- Gets the top indent.
- Overrides:
getTop in class LwView
- Following copied from class:
org.zaval.lw.LwView
- Returns:
- a top indent.
getLeft
public int getLeft()
- Description copied from class:
LwView
- Gets the left indent.
- Overrides:
getLeft in class LwView
- Following copied from class:
org.zaval.lw.LwView
- Returns:
- a left indent.
getBottom
public int getBottom()
- Description copied from class:
LwView
- Gets the bottom indent.
- Overrides:
getBottom in class LwView
- Following copied from class:
org.zaval.lw.LwView
- Returns:
- a bottom indent.
getRight
public int getRight()
- Description copied from class:
LwView
- Gets the right indent.
- Overrides:
getRight in class LwView
- Following copied from class:
org.zaval.lw.LwView
- Returns:
- a right indent.
paint
public void paint(java.awt.Graphics g,
int x,
int y,
int w,
int h,
Layoutable d)
- Description copied from class:
LwView
- Paints the view using the given width and height. The location where the
view has to be painted is determined with the
x and y
coordinates. This abstract method has to be implemented to define a "face" for the view.
- Overrides:
paint in class LwView
- Following copied from class:
org.zaval.lw.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.
setBorderColor
public void setBorderColor(java.awt.Color c)
- Sets the specified border color.
- Parameters:
c - the specified color.
getBorderColor
public java.awt.Color getBorderColor()
- Gets the border color.
- Returns:
- a border color.
|