Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Draw2d
3.3

org.eclipse.draw2d
Interface Border

All Known Subinterfaces:
FlowBorder, LabeledBorder
All Known Implementing Classes:
AbstractBorder, AbstractFlowBorder, AbstractLabeledBorder, FrameBorder

public interface Border

A decoration on a Figure. A border may paint itself within the bounds of a figure, and it may provide Insets which can affect how the figures children are posiiton and painted.

A border instance may be used with multiple figure instances.


Method Summary
  Insets getInsets ( IFigure figure)
          Returns the Insets for this Border for the given Figure.
  Dimension getPreferredSize ( IFigure figure)
          Returns the preferred width and height that this border would like to display itself properly.
 boolean isOpaque ()
          Returns true if the Border completely fills the region defined in paint(IFigure, Graphics, Insets).
 void paint ( IFigure figure, Graphics graphics, Insets insets)
          Paints the border.
 

Method Detail

getInsets

public 
Insets getInsets(
IFigure figure)
Returns the Insets for this Border for the given Figure.

Parameters:
figure - The figure this border belongs to
Returns:
The insets

getPreferredSize

public 
Dimension getPreferredSize(
IFigure figure)
Returns the preferred width and height that this border would like to display itself properly.

Parameters:
figure - The figure
Returns:
The preferred size

isOpaque

public boolean isOpaque()
Returns true if the Border completely fills the region defined in paint(IFigure, Graphics, Insets).

Returns:
true if this border is opaque

paint

public void paint(
IFigure figure,
                  
Graphics graphics,
                  
Insets insets)
Paints the border. The border should paint inside figure's IFigure.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 as Rectangle.contains(int, int).

Parameters:
figure - The figure this border belongs to
graphics - The graphics object used for painting
insets - The insets

Eclipse Draw2d
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire