Class OneLineBorder
- java.lang.Object
-
- org.eclipse.draw2d.AbstractBorder
-
- org.eclipse.draw2d.LineBorder
-
- com._1c.g5.v8.dt.common.gef.figures.borders.OneLineBorder
-
- All Implemented Interfaces:
org.eclipse.draw2d.Border
public class OneLineBorder extends org.eclipse.draw2d.LineBorder
This is a border that only draws a line at several position around the shape based on a position constant. This is useful for cases where it may be necessary to draw a separator between shapes without instantiating a new figure.
-
-
Constructor Summary
Constructors Constructor Description OneLineBorder(int width, int positions)
Constructor.OneLineBorder(org.eclipse.swt.graphics.Color color, int width, int positions)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.draw2d.geometry.Insets
getInsets(org.eclipse.draw2d.IFigure figure)
int
getPositions()
void
paint(org.eclipse.draw2d.IFigure figure, org.eclipse.draw2d.Graphics graphics, org.eclipse.draw2d.geometry.Insets insets)
Paints the border based on the inputs given.
-
-
-
Constructor Detail
-
OneLineBorder
public OneLineBorder(int width, int positions)
Constructor.- Parameters:
width
- the width of the line in relative coordinatesposition
- the value should be mask from thePositionConstants.TOP
,PositionConstants.BOTTOM
,PositionConstants.LEFT
,PositionConstants.RIGHT
- See Also:
PositionConstants
-
OneLineBorder
public OneLineBorder(org.eclipse.swt.graphics.Color color, int width, int positions)
Constructor.- Parameters:
color
- The color of the border.width
- the width of the line in relative coordinatesposition
- the value should be mask from thePositionConstants.TOP
,PositionConstants.BOTTOM
,PositionConstants.LEFT
,PositionConstants.RIGHT
- See Also:
PositionConstants
-
-
Method Detail
-
getPositions
public int getPositions()
- Returns:
- the positions mask.
-
getInsets
public org.eclipse.draw2d.geometry.Insets getInsets(org.eclipse.draw2d.IFigure figure)
- Specified by:
getInsets
in interfaceorg.eclipse.draw2d.Border
- Overrides:
getInsets
in classorg.eclipse.draw2d.LineBorder
-
paint
public void paint(org.eclipse.draw2d.IFigure figure, org.eclipse.draw2d.Graphics graphics, org.eclipse.draw2d.geometry.Insets insets)
Paints the border based on the inputs given.- Specified by:
paint
in interfaceorg.eclipse.draw2d.Border
- Overrides:
paint
in classorg.eclipse.draw2d.LineBorder
- Parameters:
figure
-IFigure
for which this is the border.graphics
-Graphics
handle for drawing the border.insets
- Space to be taken up by this border.
-
-