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
Class DelegatingLayout

java.lang.Object
  extended by

org.eclipse.draw2d.AbstractLayout
      extended by
org.eclipse.draw2d.DelegatingLayout
All Implemented Interfaces:
LayoutManager

public class DelegatingLayout
extends AbstractLayout

Figures using a DelegatingLayout as their layout manager give location responsibilities to their children. The children of a Figure using a DelegatingLayout should have a Locator as a constraint whose relocate method is responsible for placing the child.


Field Summary
 
Fields inherited from class org.eclipse.draw2d. AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
DelegatingLayout ()
           
 
Method Summary
protected   Dimension calculatePreferredSize ( IFigure parent, int wHint, int hHint)
          Calculates the preferred size of the given Figure.
 java.lang.Object getConstraint ( IFigure child)
          Returns the constraint for the given figure.
 void layout ( IFigure parent)
          Lays out the given figure's children based on their Locator constraint.
 void remove ( IFigure child)
          Removes the locator for the given figure.
 void setConstraint ( IFigure figure, java.lang.Object constraint)
          Sets the constraint for the given figure.
 
Methods inherited from class org.eclipse.draw2d. AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, invalidate, isObservingVisibility, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingLayout

public DelegatingLayout()
Method Detail

calculatePreferredSize

protected 
Dimension calculatePreferredSize(
IFigure parent,
                                           int wHint,
                                           int hHint)
Calculates the preferred size of the given Figure. For the DelegatingLayout, this is the largest width and height values of the passed Figure's children.

Specified by:
calculatePreferredSize in class AbstractLayout
Parameters:
parent - the figure whose preferred size is being calculated
wHint - the width hint
hHint - the height hint
Returns:
the preferred size
Since:
2.0

getConstraint

public java.lang.Object getConstraint(
IFigure child)
Description copied from class: AbstractLayout
Returns the constraint for the given figure.

Specified by:
getConstraint in interface LayoutManager
Overrides:
getConstraint in class AbstractLayout
Parameters:
child - The figure
Returns:
The constraint
See Also:
LayoutManager.getConstraint(org.eclipse.draw2d.IFigure)

layout

public void layout(
IFigure parent)
Lays out the given figure's children based on their Locator constraint.

Parameters:
parent - the figure whose children should be layed out

remove

public void remove(
IFigure child)
Removes the locator for the given figure.

Specified by:
remove in interface LayoutManager
Overrides:
remove in class AbstractLayout
Parameters:
child - the child being removed

setConstraint

public void setConstraint(
IFigure figure,
                          java.lang.Object constraint)
Sets the constraint for the given figure.

Specified by:
setConstraint in interface LayoutManager
Overrides:
setConstraint in class AbstractLayout
Parameters:
figure - the figure whose contraint is being set
constraint - the new constraint

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