jcontrol.ui.vole
Class Border

java.lang.Object
  |
  +--jcontrol.ui.vole.Component
        |
        +--jcontrol.ui.vole.Border

public class Border
extends Component

This class Border creates a border with the given extents. (C) DOMOLOGIC Home Automation GmbH 2003

Author:
Wolfgang Klingauf

Field Summary
static int ETCHED_BORDER
          Rectangular border with etched edges
protected  java.lang.String label
           
static int ROUND_BORDER
          Rectangular border with round corners
static int SIMPLE_BORDER
          Simple rectangular border
protected  int style
           
 
Fields inherited from class jcontrol.ui.vole.Component
focusOwner, font, g, height, listener, parent, visible, width, x, y
 
Constructor Summary
Border(int x, int y, int width, int height)
          Creates a simple rectangular border.
Border(java.lang.String label, int x, int y, int width, int height)
          Creates a labeled rectangular Border.
 
Method Summary
 void paint()
          Draw the border.
 void setLabel(java.lang.String label)
          Sets the label of this border.
 void setStyle(int style)
          Sets the style of this border.
 boolean transferFocus()
          We never gain the input focus.
 
Methods inherited from class jcontrol.ui.vole.Component
getBounds, getParent, isVisible, onActionEvent, onKeyEvent, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setLocation, setParent, setVisible, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, notifyAll, wait
 

Field Detail

ETCHED_BORDER

public static final int ETCHED_BORDER
Rectangular border with etched edges

See Also:
Constant Field Values

label

protected java.lang.String label

ROUND_BORDER

public static final int ROUND_BORDER
Rectangular border with round corners

See Also:
Constant Field Values

SIMPLE_BORDER

public static final int SIMPLE_BORDER
Simple rectangular border

See Also:
Constant Field Values

style

protected int style
Constructor Detail

Border

public Border(int x,
              int y,
              int width,
              int height)
Creates a simple rectangular border.

Parameters:
x - The x-coordinate of the border's top-left corner.
y - The y-coordinate of the border's top-left corner.
width - The width of the border.
height - The height of the border.

Border

public Border(java.lang.String label,
              int x,
              int y,
              int width,
              int height)
Creates a labeled rectangular Border.

Parameters:
label - The string label of the border.
x - The x-coordinate of the border's top-left corner.
y - The y-coordinate of the border's top-left corner.
width - The width of the border.
height - The height of the border.
Method Detail

paint

public void paint()
Draw the border.

Overrides:
paint in class Component

setLabel

public void setLabel(java.lang.String label)
Sets the label of this border.

Parameters:
label - The new label of the border.

setStyle

public void setStyle(int style)
Sets the style of this border. Possible values are SIMPLE_BORDER, ETCHED_BORDER and ROUND_BORDER.

Parameters:
style - The new style of the border.

transferFocus

public boolean transferFocus()
We never gain the input focus.

Overrides:
transferFocus in class Component
Returns:
true, if the focus was transferred successfully.