Class AbstractBorder

java.lang.Object
org.eclipse.draw2d.AbstractBorder
All Implemented Interfaces:
Border
Direct Known Subclasses:
AbstractBackground, AbstractFlowBorder, AbstractLabeledBorder, CompoundBorder, FocusBorder, LineBorder, MarginBorder, SchemeBorder

public abstract class AbstractBorder extends Object implements Border
Provides generic support for borders.
  • Field Details

    • tempRect

      protected static Rectangle tempRect
      A temporary Rectangle
  • Constructor Details

    • AbstractBorder

      public AbstractBorder()
  • Method Details

    • getPaintRectangle

      protected static final Rectangle getPaintRectangle(IFigure figure, Insets insets)
      Returns a temporary rectangle representing the figure's bounds cropped by the specified insets. This method exists for convenience and performance; the method does not new any Objects and returns a rectangle which the caller can manipulate.
      Parameters:
      figure - Figure for which the paintable rectangle is needed
      insets - The insets
      Returns:
      The paintable region on the Figure f
      Since:
      2.0
    • getPreferredSize

      public Dimension getPreferredSize(IFigure f)
      Description copied from interface: Border
      Returns the preferred width and height that this border would like to display itself properly.
      Specified by:
      getPreferredSize in interface Border
      Parameters:
      f - The figure
      Returns:
      The preferred size
      See Also:
    • isOpaque

      public boolean isOpaque()
      Description copied from interface: Border
      Returns true if the Border completely fills the region defined in Border.paint(IFigure, Graphics, Insets).
      Specified by:
      isOpaque in interface Border
      Returns:
      true if this border is opaque
      See Also: