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 BorderLayout

java.lang.Object
  extended by

org.eclipse.draw2d.AbstractLayout
      extended by

org.eclipse.draw2d.AbstractHintLayout
          extended by
org.eclipse.draw2d.BorderLayout
All Implemented Interfaces:
LayoutManager

public class BorderLayout
extends AbstractHintLayout


Field Summary
static java.lang.Integer BOTTOM
          Constant to be used as a constraint for child figures
static java.lang.Integer CENTER
          Constant to be used as a constraint for child figures
static java.lang.Integer LEFT
          Constant to be used as a constraint for child figures
static java.lang.Integer RIGHT
          Constant to be used as a constraint for child figures
static java.lang.Integer TOP
          Constant to be used as a constraint for child figures
 
Fields inherited from class org.eclipse.draw2d. AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
BorderLayout ()
           
 
Method Summary
protected   Dimension calculateMinimumSize ( IFigure container, int wHint, int hHint)
          Calculates the minimum size using the given width and height hints.
protected   Dimension calculatePreferredSize ( IFigure container, int wHint, int hHint)
          Calculates the preferred size of the given figure, using width and height hints.
 void layout ( IFigure container)
          Lays out the given figure.
 void remove ( IFigure child)
          Removes the given figure from this LayoutManager's list of figures.
 void setConstraint ( IFigure child, java.lang.Object constraint)
          Sets the location of hte given child in this layout.
 void setHorizontalSpacing (int gap)
          Sets the horizontal spacing to be used between the children.
 void setVerticalSpacing (int gap)
          Sets the vertical spacing ot be used between the children.
 
Methods inherited from class org.eclipse.draw2d. AbstractHintLayout
getMinimumSize, getPreferredSize, invalidate, isSensitiveHorizontally, isSensitiveVertically
 
Methods inherited from class org.eclipse.draw2d. AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CENTER

public static final java.lang.Integer CENTER
Constant to be used as a constraint for child figures


TOP

public static final java.lang.Integer TOP
Constant to be used as a constraint for child figures


BOTTOM

public static final java.lang.Integer BOTTOM
Constant to be used as a constraint for child figures


LEFT

public static final java.lang.Integer LEFT
Constant to be used as a constraint for child figures


RIGHT

public static final java.lang.Integer RIGHT
Constant to be used as a constraint for child figures

Constructor Detail

BorderLayout

public BorderLayout()
Method Detail

calculateMinimumSize

protected 
Dimension calculateMinimumSize(
IFigure container,
                                         int wHint,
                                         int hHint)
Description copied from class: AbstractHintLayout
Calculates the minimum size using the given width and height hints. This method is called from AbstractHintLayout.getMinimumSize(IFigure, int, int) whenever the cached minimum size has been flushed.

By default, this method just calls AbstractHintLayout.getPreferredSize(IFigure, int, int), meaning minimum and preferres sizes will be the same unless this method is overridden.

Overrides:
calculateMinimumSize in class AbstractHintLayout
Parameters:
container - the Figure on which this layout is installed
wHint - the width hint
hHint - the height hint
Returns:
the layout's minimum size
See Also:
AbstractHintLayout.calculateMinimumSize(IFigure, int, int)

calculatePreferredSize

protected 
Dimension calculatePreferredSize(
IFigure container,
                                           int wHint,
                                           int hHint)
Description copied from class: AbstractLayout
Calculates the preferred size of the given figure, using width and height hints.

Specified by:
calculatePreferredSize in class AbstractLayout
Parameters:
container - The figure
wHint - The width hint
hHint - The height hint
Returns:
The preferred size
See Also:
AbstractLayout.calculatePreferredSize(IFigure, int, int)

layout

public void layout(
IFigure container)
Description copied from interface: LayoutManager
Lays out the given figure.

Parameters:
container - The figure
See Also:
LayoutManager.layout(IFigure)

remove

public void remove(
IFigure child)
Description copied from class: AbstractLayout
Removes the given figure from this LayoutManager's list of figures.

Specified by:
remove in interface LayoutManager
Overrides:
remove in class AbstractLayout
Parameters:
child - The figure to remove
See Also:
AbstractLayout.remove(IFigure)

setConstraint

public void setConstraint(
IFigure child,
                          java.lang.Object constraint)
Sets the location of hte given child in this layout. Valid constraints:

Ensure that the given Figure is indeed a child of the Figure on which this layout has been set. Proper behaviour cannot be guaranteed if that is not the case. Also ensure that every child has a valid constraint.

Passing a null constraint will invoke remove(IFigure).

If the given child was assigned another constraint earlier, it will be re-assigned to the new constraint. If there is another child with the given constraint, it will be over-ridden so that the given child now has that constraint.

Specified by:
setConstraint in interface LayoutManager
Overrides:
setConstraint in class AbstractLayout
Parameters:
child - the child
constraint - the child's new constraint
See Also:
AbstractLayout.setConstraint(IFigure, Object)

setHorizontalSpacing

public void setHorizontalSpacing(int gap)
Sets the horizontal spacing to be used between the children. Default is 0.

Parameters:
gap - The horizonal spacing

setVerticalSpacing

public void setVerticalSpacing(int gap)
Sets the vertical spacing ot be used between the children. Default is 0.

Parameters:
gap - The vertical spacing

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