Package org.eclipse.graphiti.tb
Class BorderDecorator
java.lang.Object
org.eclipse.graphiti.tb.AbstractDecorator
org.eclipse.graphiti.tb.BorderDecorator
- All Implemented Interfaces:
IBorderDecorator
,IDecorator
Border decorators can be used to add a border (a rectangle around the shape)
to the visualization of a shape without modifying the dirty state of the
displaying editor, see
IDecorator
.- Since:
- 0.9
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new border decorator that decorates a shape with a border.BorderDecorator
(IColorConstant borderColor, Integer lineWidth, Integer lineStyle) Creates a new border decorator that decorates a shape with a border with the given settings. -
Method Summary
Modifier and TypeMethodDescriptionReturns the color that will be used for the border.Returns the style that will be used for the border line.Returns the width that will be used for the border line.void
setBorderColor
(IColorConstant borderColor) Sets the color to be used for the border line.void
setBorderStyle
(Integer lineStyle) Sets the style that will be used for the border line.void
setBorderWidth
(Integer lineWidth) Sets the width that will be used for the border line.Methods inherited from class org.eclipse.graphiti.tb.AbstractDecorator
getMessage, setMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.graphiti.tb.IDecorator
getMessage, setMessage
-
Constructor Details
-
BorderDecorator
public BorderDecorator()Creates a new border decorator that decorates a shape with a border. -
BorderDecorator
Creates a new border decorator that decorates a shape with a border with the given settings. See the setter methods for details on these values.- Parameters:
borderColor
- anIColorConstant
defining the color for the border linelineWidth
- anInteger
defining the width of the border linelineStyle
- anInteger
defining the style of the border line
-
-
Method Details
-
getBorderColor
Description copied from interface:IBorderDecorator
Returns the color that will be used for the border. By default (when returningnull
)IColorConstant.BLACK
is used.- Specified by:
getBorderColor
in interfaceIBorderDecorator
- Returns:
- a
IColorConstant
defining the color
-
setBorderColor
Sets the color to be used for the border line. By default (whennull
is set)IColorConstant.BLACK
is used.- Parameters:
borderColor
-
-
getBorderWidth
Description copied from interface:IBorderDecorator
Returns the width that will be used for the border line. By default (when returningnull
or a value smaller than 1) 1 is used.- Specified by:
getBorderWidth
in interfaceIBorderDecorator
- Returns:
- an
Integer
defining the width of the border line
-
setBorderWidth
Sets the width that will be used for the border line. By default (whennull
or a value smaller than 1 is set) 1 is used.- Parameters:
lineWidth
- an Integer defining the width of the border line
-
getBorderStyle
Description copied from interface:IBorderDecorator
Returns the style that will be used for the border line. Possible values are:Graphics.LINE_SOLID
Graphics.LINE_DASH
Graphics.LINE_DASHDOT
Graphics.LINE_DASHDOTDOT
Graphics.LINE_DOT
null
or an invalid value)Graphics.LINE_SOLID
is used.- Specified by:
getBorderStyle
in interfaceIBorderDecorator
- Returns:
- an
Integer
defining the width of the border style
-
setBorderStyle
Sets the style that will be used for the border line. Possible values are:Graphics.LINE_SOLID
Graphics.LINE_DASH
Graphics.LINE_DASHDOT
Graphics.LINE_DASHDOTDOT
Graphics.LINE_DOT
null
or an invalid value is set)Graphics.LINE_SOLID
is used.- Parameters:
lineStyle
- an Integer defining the style of the border line
-