vocleditor.figures
Class LabelBorder

java.lang.Object
  extended by org.eclipse.draw2d.AbstractBorder
      extended by org.eclipse.draw2d.AbstractLabeledBorder
          extended by vocleditor.figures.LabelBorder
All Implemented Interfaces:
org.eclipse.draw2d.Border, org.eclipse.draw2d.LabeledBorder

public class LabelBorder
extends org.eclipse.draw2d.AbstractLabeledBorder

A labeled border intended to house a Figure with a group of children. The label should serve as a description of the group.


Constructor Summary
LabelBorder(org.eclipse.swt.graphics.Color fill, org.eclipse.swt.graphics.Color outside)
          Constructs a TitleBarBorder with its label set to the name of this class.
 
Method Summary
 java.lang.String getTitle()
          returns the title string
 boolean isOpaque()
          Says that this border does not use local coordinates.
 void paint(org.eclipse.draw2d.IFigure figure, org.eclipse.draw2d.Graphics g, org.eclipse.draw2d.geometry.Insets insets)
          Paints this border.
 void setBackgroundColor(org.eclipse.swt.graphics.Color color)
          Sets the background color of the area within the boundaries of this border.
 void setLines(boolean top, boolean bottom, boolean left, boolean right, boolean rightComplete, boolean leftComplete)
          Sets whichs lines o this border should be drawn
 void setTextPos(int textPos)
          Sets the position od
 void setTitle(java.lang.String s)
          sets the title string
 
Methods inherited from class org.eclipse.draw2d.AbstractLabeledBorder
getInsets, getLabel, getPreferredSize, getTextColor, setFont, setLabel, setTextColor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelBorder

public LabelBorder(org.eclipse.swt.graphics.Color fill,
                   org.eclipse.swt.graphics.Color outside)
Constructs a TitleBarBorder with its label set to the name of this class.

Parameters:
fill - the Color to fill the border with
outside - the Color of the outside border
Since:
2.0
Method Detail

setLines

public void setLines(boolean top,
                     boolean bottom,
                     boolean left,
                     boolean right,
                     boolean rightComplete,
                     boolean leftComplete)
Sets whichs lines o this border should be drawn

Parameters:
top - draw the top line
bottom - draw the bottom line
left - draw the left line
right - draw the right line
rightComplete - draw the right (or top) line beyond the line at the middle of the title text
leftComplete - draw the left (or bottom) line beyond the line at the middle of the title text

setTextPos

public void setTextPos(int textPos)
Sets the position od

Parameters:
textPos -

isOpaque

public boolean isOpaque()
Says that this border does not use local coordinates.

Specified by:
isOpaque in interface org.eclipse.draw2d.Border
Overrides:
isOpaque in class org.eclipse.draw2d.AbstractBorder
See Also:
AbstractBorder.isOpaque()

paint

public void paint(org.eclipse.draw2d.IFigure figure,
                  org.eclipse.draw2d.Graphics g,
                  org.eclipse.draw2d.geometry.Insets insets)
Paints this border.

See Also:
Border#paint(IFigure, Graphics, Insets)

setBackgroundColor

public void setBackgroundColor(org.eclipse.swt.graphics.Color color)
Sets the background color of the area within the boundaries of this border. This is required as this border takes responsibility for filling up the region, as TitleBarBorders are always opaque.

Parameters:
color - the background color
Since:
2.0

getTitle

public java.lang.String getTitle()
returns the title string

Returns:
the title string

setTitle

public void setTitle(java.lang.String s)
sets the title string

Parameters:
s - the new title string