Package org.eclipse.draw2d

# Class SeparatorBorder

java.lang.Object
org.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.MarginBorder
org.eclipse.draw2d.SeparatorBorder

All Implemented Interfaces:
  `Border`

public final class SeparatorBorder extends MarginBorder
This border behaves similar to a `LineBorder` with width `1`, except that individual sides are drawn. The sides are specified via `PositionConstants.LEFT`, `PositionConstants.RIGHT`, `PositionConstants.TOP` and `PositionConstants.BOTTOM`. Multiple sides can be specified by logically or-ing these constants.

Since:
  3.16

## Field Summary

### Fields inherited from class org.eclipse.draw2d.MarginBorder

`insets`

### Fields inherited from class org.eclipse.draw2d.AbstractBorder

`tempRect`

## Constructor Summary

Constructors
Constructor
Description
`SeparatorBorder(Insets insets, int sides)`
The sides are specified via `PositionConstants.LEFT`, `PositionConstants.RIGHT`, `PositionConstants.TOP`, `PositionConstants.BOTTOM`.

## Method Summary

Modifier and Type
Method
Description
`void`
`paint(IFigure f, Graphics g, Insets i)`
This method does nothing, since this border is just for spacing.
`void`
`setColor(Color color)`
If `null` is given as a parameter, the current foreground color of the graphics object is used while painting.

### Methods inherited from class org.eclipse.draw2d.MarginBorder

`getInsets`

### Methods inherited from class org.eclipse.draw2d.AbstractBorder

`getPaintRectangle, getPreferredSize, isOpaque`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SeparatorBorder

public SeparatorBorder(Insets insets, int sides)
The sides are specified via `PositionConstants.LEFT`, `PositionConstants.RIGHT`, `PositionConstants.TOP`, `PositionConstants.BOTTOM`. Multiple sides can be specified by logically or-ing these constants.

Parameters:
  `insets` - The Insets for the border
  `sides` - The integer-encoded sides that should be drawn.
See Also:
  - `PositionConstants.LEFT`
  - `PositionConstants.RIGHT`
  - `PositionConstants.TOP`
  - `PositionConstants.BOTTOM`

## Method Details

### setColor

public void setColor(Color color)
If `null` is given as a parameter, the current foreground color of the graphics object is used while painting.

Parameters:
  `color` - The color used for drawing each side.

### paint

public void paint(IFigure f, Graphics g, Insets i)
Description copied from class: `MarginBorder`
This method does nothing, since this border is just for spacing.

Specified by:
  `paint` in interface `Border`
Overrides:
  `paint` in class `MarginBorder`
Parameters:
  `f` - The figure this border belongs to
  `g` - The graphics object used for painting
  `i` - The insets
See Also:
  - `Border.paint(IFigure, Graphics, Insets)`