Package org.eclipse.draw2d
Class FrameBorder
java.lang.Object
org.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.CompoundBorder
org.eclipse.draw2d.FrameBorder
- All Implemented Interfaces:
Border
,LabeledBorder
Provides for a frame-like border which contains a title bar for holding the
title of a Figure.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final SchemeBorder.Scheme
The border scheme that determines the border highlight and shadow colors, as well as the border width (3).Fields inherited from class org.eclipse.draw2d.CompoundBorder
inner, outer
Fields inherited from class org.eclipse.draw2d.AbstractBorder
tempRect
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a FrameBorder with its label set to the name of theTitleBarBorder
class.FrameBorder
(String label) Constructs a FrameBorder with the title set to the passed String. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates the necessary borders for this FrameBorder.getLabel()
Returns the label for this Border.protected LabeledBorder
Returns the inner border of this FrameBorder, which contains the label for the FrameBorder.void
Sets the font for this border's label.void
Sets the label for this border.Methods inherited from class org.eclipse.draw2d.CompoundBorder
getInnerBorder, getInsets, getOuterBorder, getPreferredSize, isOpaque, paint
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
getInsets, getPreferredSize, isOpaque, paint
-
Field Details
-
SCHEME_FRAME
The border scheme that determines the border highlight and shadow colors, as well as the border width (3).
-
-
Constructor Details
-
FrameBorder
public FrameBorder()Constructs a FrameBorder with its label set to the name of theTitleBarBorder
class.- Since:
- 2.0
-
FrameBorder
Constructs a FrameBorder with the title set to the passed String.- Parameters:
label
- label or title of the frame.- Since:
- 2.0
-
-
Method Details
-
createBorders
protected void createBorders()Creates the necessary borders for this FrameBorder. The inner border is aTitleBarBorder
. The outer border is aSchemeBorder
.- Since:
- 2.0
-
getLabeledBorder
Returns the inner border of this FrameBorder, which contains the label for the FrameBorder.- Returns:
- the border holding the label.
- Since:
- 2.0
-
getLabel
Description copied from interface:LabeledBorder
Returns the label for this Border.- Specified by:
getLabel
in interfaceLabeledBorder
- Returns:
- the label for this border
-
setLabel
Sets the label for this border.- Specified by:
setLabel
in interfaceLabeledBorder
- Parameters:
label
- the label
-
setFont
Sets the font for this border's label.- Specified by:
setFont
in interfaceLabeledBorder
- Parameters:
font
- the font
-