|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.eclipse.draw2d.AbstractBorder
|
+--org.eclipse.draw2d.AbstractLabeledBorder
Provides support for a border with a label describing the contents of which it is surronding.
| Fields inherited from class org.eclipse.draw2d.AbstractBorder |
tempRect |
| Constructor Summary | |
AbstractLabeledBorder()
Constructs a default AbstractLabeledBorder with the name of this class set as its label. |
|
AbstractLabeledBorder(String s)
Constructs a border with the label set to the String passed in as input. |
|
| Method Summary | |
protected abstract Insets |
calculateInsets(IFigure figure)
|
protected Font |
getFont(IFigure f)
|
Insets |
getInsets(IFigure fig)
Returns the Insets for this Border for the given Figure. |
String |
getLabel()
Returns the label for this border. |
Dimension |
getPreferredSize(IFigure fig)
Returns the preferred width and height that this border would like to display itself properly. |
Color |
getTextColor()
Returns the text Color of this AbstractLabeledBorder's label. |
protected Dimension |
getTextExtents(IFigure f)
Calculates and returns the size required by this border's label. |
protected void |
invalidate()
|
void |
setFont(Font font)
Sets the font for the label. |
void |
setLabel(String s)
Sets the label. |
void |
setTextColor(Color color)
Sets the color for this border's text. |
| Methods inherited from class org.eclipse.draw2d.AbstractBorder |
getPaintRectangle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.draw2d.Border |
isOpaque, paint |
| Constructor Detail |
public AbstractLabeledBorder()
public AbstractLabeledBorder(String s)
s - Label to be set on the border.| Method Detail |
protected abstract Insets calculateInsets(IFigure figure)
protected Font getFont(IFigure f)
public Insets getInsets(IFigure fig)
BordergetInsets in interface Borderpublic String getLabel()
LabeledBordergetLabel in interface LabeledBorderpublic Dimension getPreferredSize(IFigure fig)
BordergetPreferredSize in interface BordergetPreferredSize in class AbstractBorderpublic Color getTextColor()
protected Dimension getTextExtents(IFigure f)
f - IFigure on which the calculations are
to be made.protected void invalidate()
public void setFont(Font font)
LabeledBordersetFont in interface LabeledBorderpublic void setLabel(String s)
LabeledBordersetLabel in interface LabeledBorderpublic void setTextColor(Color color)
color - Color to be set for this border's text.
|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||