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
public class BorderDecorator extends AbstractDecorator implements IBorderDecorator
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, seeIDecorator.- Since:
- 0.9
-
-
Constructor Summary
Constructors Constructor Description BorderDecorator()Creates a new border decorator that decorates a shape with a border.BorderDecorator(IColorConstant borderColor, java.lang.Integer lineWidth, java.lang.Integer lineStyle)Creates a new border decorator that decorates a shape with a border with the given settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IColorConstantgetBorderColor()Returns the color that will be used for the border.java.lang.IntegergetBorderStyle()Returns the style that will be used for the border line.java.lang.IntegergetBorderWidth()Returns the width that will be used for the border line.voidsetBorderColor(IColorConstant borderColor)Sets the color to be used for the border line.voidsetBorderStyle(java.lang.Integer lineStyle)Sets the style that will be used for the border line.voidsetBorderWidth(java.lang.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 Detail
-
BorderDecorator
public BorderDecorator()
Creates a new border decorator that decorates a shape with a border.
-
BorderDecorator
public BorderDecorator(IColorConstant borderColor, java.lang.Integer lineWidth, java.lang.Integer lineStyle)
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- anIColorConstantdefining the color for the border linelineWidth- anIntegerdefining the width of the border linelineStyle- anIntegerdefining the style of the border line
-
-
Method Detail
-
getBorderColor
public IColorConstant getBorderColor()
Description copied from interface:IBorderDecoratorReturns the color that will be used for the border. By default (when returningnull)IColorConstant.BLACKis used.- Specified by:
getBorderColorin interfaceIBorderDecorator- Returns:
- a
IColorConstantdefining the color
-
setBorderColor
public void setBorderColor(IColorConstant borderColor)
Sets the color to be used for the border line. By default (whennullis set)IColorConstant.BLACKis used.- Parameters:
borderColor-
-
getBorderWidth
public java.lang.Integer getBorderWidth()
Description copied from interface:IBorderDecoratorReturns the width that will be used for the border line. By default (when returningnullor a value smaller than 1) 1 is used.- Specified by:
getBorderWidthin interfaceIBorderDecorator- Returns:
- an
Integerdefining the width of the border line
-
setBorderWidth
public void setBorderWidth(java.lang.Integer lineWidth)
Sets the width that will be used for the border line. By default (whennullor a value smaller than 1 is set) 1 is used.- Parameters:
lineWidth- an Integer defining the width of the border line
-
getBorderStyle
public java.lang.Integer getBorderStyle()
Description copied from interface:IBorderDecoratorReturns the style that will be used for the border line. Possible values are:Graphics.LINE_SOLIDGraphics.LINE_DASHGraphics.LINE_DASHDOTGraphics.LINE_DASHDOTDOTGraphics.LINE_DOT
nullor an invalid value)Graphics.LINE_SOLIDis used.- Specified by:
getBorderStylein interfaceIBorderDecorator- Returns:
- an
Integerdefining the width of the border style
-
setBorderStyle
public void setBorderStyle(java.lang.Integer lineStyle)
Sets the style that will be used for the border line. Possible values are:Graphics.LINE_SOLIDGraphics.LINE_DASHGraphics.LINE_DASHDOTGraphics.LINE_DASHDOTDOTGraphics.LINE_DOT
nullor an invalid value is set)Graphics.LINE_SOLIDis used.- Parameters:
lineStyle- an Integer defining the style of the border line
-
-