Package org.eclipse.draw2d
Class CompoundBorder
java.lang.Object
org.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.CompoundBorder
- All Implemented Interfaces:
- Border
- Direct Known Subclasses:
- FrameBorder
CompoundBorder allows for the nesting of two borders. The nested borders are
 referred to as the inner and outer borders.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected BorderThe inner Border.protected BorderThe outer Border.Fields inherited from class org.eclipse.draw2d.AbstractBordertempRect
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a default CompoundBorder with no borders under it.CompoundBorder(Border outer, Border inner) Constructs a CompoundBorder with the two borders specified as input.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the inner border of this CompoundBorder.Returns the total insets required to hold both the inner and outer borders of this CompoundBorder.Returns the outer border of this CompoundBorder.getPreferredSize(IFigure fig) Returns the preferred width and height that this border would like to display itself properly.booleanisOpaque()Returnstrueif this border is opaque.voidPaints the border.Methods inherited from class org.eclipse.draw2d.AbstractBordergetPaintRectangle
- 
Field Details- 
innerThe inner Border.
- 
outerThe outer Border.
 
- 
- 
Constructor Details- 
CompoundBorderpublic CompoundBorder()Constructs a default CompoundBorder with no borders under it.- Since:
- 2.0
 
- 
CompoundBorderConstructs a CompoundBorder with the two borders specified as input.- Parameters:
- outer- Border which is drawn on the outside
- inner- Border which is drawn inside the outer border
- Since:
- 2.0
 
 
- 
- 
Method Details- 
getInnerBorderReturns the inner border of this CompoundBorder.- Returns:
- The inner border
- Since:
- 2.0
 
- 
getInsetsReturns the total insets required to hold both the inner and outer borders of this CompoundBorder.- Parameters:
- figure- Figure for which this is the border
- Returns:
- The total insets for this border
- Since:
- 2.0
 
- 
getPreferredSizeDescription copied from interface:BorderReturns the preferred width and height that this border would like to display itself properly.- Specified by:
- getPreferredSizein interface- Border
- Overrides:
- getPreferredSizein class- AbstractBorder
- Parameters:
- fig- The figure
- Returns:
- The preferred size
- See Also:
 
- 
getOuterBorderReturns the outer border of this CompoundBorder.- Returns:
- The outer border
- Since:
- 2.0
 
- 
isOpaquepublic boolean isOpaque()Returnstrueif this border is opaque. Return value is dependent on the opaque state of both the borders it contains. Both borders have to be opaque for this border to be opaque. In the absence of any of the borders, this border is not opaque.- Specified by:
- isOpaquein interface- Border
- Overrides:
- isOpaquein class- AbstractBorder
- Returns:
- trueif this border is opaque
- See Also:
 
- 
paintDescription copied from interface:BorderPaints the border. The border should paint inside figure'sIFigure.getBounds(), inset by the parameter insets. The border generally should not paint inside its own insets. More specifically, Border b should paint inside the rectangle: figure.getBounds().getCropped(insets) and outside of the rectangle: figure.getBounds().getCropped(insets).getCropped(getInsets()) where inside is defined asRectangle.contains(int, int).- Parameters:
- figure- The figure this border belongs to
- g- The graphics object used for painting
- insets- The insets
- See Also:
 
 
-