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
Answertopia.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
Class GroupBoxBorder

java.lang.Object
  extended by

org.eclipse.draw2d.AbstractBorder
      extended by

org.eclipse.draw2d.AbstractLabeledBorder
          extended by
org.eclipse.draw2d.GroupBoxBorder
All Implemented Interfaces:
Border, LabeledBorder

public class GroupBoxBorder
extends AbstractLabeledBorder

A labeled border intended to house a Figure with a group of children. The label should serve as a description of the group.


Field Summary
 
Fields inherited from class org.eclipse.draw2d. AbstractBorder
tempRect
 
Constructor Summary
GroupBoxBorder ()
          Constructs a GroupBoxBorder with the name of this class as its label.
GroupBoxBorder (java.lang.String s)
          Constructs a GroupBoxBorder with label s.
 
Method Summary
protected   Insets calculateInsets ( IFigure figure)
          Calculates and returns the Insets for this GroupBoxBorder.
  Dimension getPreferredSize ( IFigure fig)
          Returns the preferred width and height that this border would like to display itself properly.
 void paint ( IFigure figure, Graphics g, Insets insets)
          Paints the border.
 
Methods inherited from class org.eclipse.draw2d. AbstractLabeledBorder
getFont, getInsets, getLabel, getTextColor, getTextExtents, invalidate, setFont, setLabel, setTextColor
 
Methods inherited from class org.eclipse.draw2d. AbstractBorder
getPaintRectangle, isOpaque
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d. Border
isOpaque
 

Constructor Detail

GroupBoxBorder

public GroupBoxBorder()
Constructs a GroupBoxBorder with the name of this class as its label.

Since:
2.0

GroupBoxBorder

public GroupBoxBorder(java.lang.String s)
Constructs a GroupBoxBorder with label s.

Parameters:
s - the label
Since:
2.0
Method Detail

calculateInsets

protected 
Insets calculateInsets(
IFigure figure)
Calculates and returns the Insets for this GroupBoxBorder.

Specified by:
calculateInsets in class AbstractLabeledBorder
Parameters:
figure - IFigure on which the calculations should be made. Generally this is the IFigure of which this GroupBoxBorder is surrounding.
Returns:
the Insets for this GroupBoxBorder.
Since:
2.0

getPreferredSize

public 
Dimension getPreferredSize(
IFigure fig)
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
Overrides:
getPreferredSize in class AbstractLabeledBorder
See Also:
Border.getPreferredSize(IFigure)

paint

public void paint(
IFigure figure,
                  
Graphics g,
                  
Insets insets)
Description copied from interface: Border
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
g - The graphics object used for painting
insets - The insets
See Also:
Border.paint(IFigure, Graphics, 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