|
Eclipse Draw2d 3.0.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.AbstractLabeledBorder
org.eclipse.draw2d.TitleBarBorder
Border provides a title bar on the Figure for which this is the border of. Generally used in conjunction with other borders to create window-like effects. Also provides for alignment of the text in the bar.
FrameBorder| Field Summary |
| Fields inherited from class org.eclipse.draw2d.AbstractBorder |
tempRect |
| Constructor Summary | |
TitleBarBorder()
Constructs a TitleBarBorder with its label set to the name of this class. |
|
TitleBarBorder(String s)
Constructs a TitleBarBorder with its label set to the passed String. |
|
| Method Summary | |
protected Insets |
calculateInsets(IFigure figure)
Calculates and returns the Insets for this border. |
protected Color |
getBackgroundColor()
Returns the background Color of this TitleBarBorder. |
protected Insets |
getPadding()
Returns this TitleBarBorder's padding. |
int |
getTextAlignment()
Returns the alignment of the text in the title bar. |
boolean |
isOpaque()
Returns true thereby filling up all the contents within its boundaries,
eleminating the need by the figure to clip the boundaries and do the same. |
void |
paint(IFigure figure,
Graphics g,
Insets insets)
Paints the border. |
void |
setBackgroundColor(Color color)
Sets the background color of the area within the boundaries of this border. |
void |
setPadding(Insets pad)
Sets the padding space of this TitleBarBorder to the passed value. |
void |
setPadding(int all)
Sets the padding space to be applied on all sides of the border. |
void |
setTextAlignment(int align)
Sets the alignment of the text in the title bar. |
| Methods inherited from class org.eclipse.draw2d.AbstractLabeledBorder |
getFont, getInsets, getLabel, getPreferredSize, getTextColor, getTextExtents, invalidate, setFont, setLabel, setTextColor |
| 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 |
| Constructor Detail |
public TitleBarBorder()
public TitleBarBorder(String s)
s - text of the label| Method Detail |
protected Insets calculateInsets(IFigure figure)
calculateInsets in class AbstractLabeledBorderfigure - the figure on which Insets calculations are based
protected Color getBackgroundColor()
protected Insets getPadding()
public int getTextAlignment()
PositionConstants.LEFT, PositionConstants.CENTER and
PositionConstants.RIGHT.
public boolean isOpaque()
true thereby filling up all the contents within its boundaries,
eleminating the need by the figure to clip the boundaries and do the same.
isOpaque in interface BorderisOpaque in class AbstractBorderBorder.isOpaque()
public void paint(IFigure figure,
Graphics g,
Insets insets)
BorderIFigure.getBounds(),
inset by the parameter insets. The border generally should not paint inside its
own insets. More specifically, Border b should paint inside the rectangle:
figure.getBounds().getCropped(insets) and outside of the rectangle:
figure.getBounds().getCropped(insets).getCropped(getInsets()) where inside is
defined as Rectangle.contains(int, int).
figure - The figure this border belongs tog - The graphics object used for paintinginsets - The insetsBorder.paint(IFigure, Graphics, Insets)public void setBackgroundColor(Color color)
color - the background colorpublic void setPadding(int all)
all - the value of the padding on all sidespublic void setPadding(Insets pad)
pad - the paddingpublic void setTextAlignment(int align)
PositionConstants.LEFT, PositionConstants.CENTER and
PositionConstants.RIGHT.
align - the new text alignment
|
Eclipse Draw2d 3.0.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||