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 ViewportLayout

java.lang.Object
  extended by

org.eclipse.draw2d.AbstractLayout
      extended by

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

public class ViewportLayout
extends AbstractHintLayout

Layout for a viewport. A viewport is a flexible window onto a figure.


Field Summary
 
Fields inherited from class org.eclipse.draw2d. AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
ViewportLayout ()
           
 
Method Summary
protected   Dimension calculateMinimumSize ( IFigure figure, int wHint, int hHint)
          Returns the minimum size required by the input viewport figure.
protected   Dimension calculatePreferredSize ( IFigure parent, int wHint, int hHint)
          Calculates and returns the preferred size of the figure based on the given hints.
protected  boolean isSensitiveHorizontally ( IFigure parent)
          Returns whether this layout manager is sensitive to changes in the horizontal hint.
protected  boolean isSensitiveVertically ( IFigure parent)
          Returns whether this layout manager is sensitive to changes in the vertical hint.
 void layout ( IFigure figure)
          Lays out the given figure.
 
Methods inherited from class org.eclipse.draw2d. AbstractHintLayout
getMinimumSize, getPreferredSize, invalidate
 
Methods inherited from class org.eclipse.draw2d. AbstractLayout
calculatePreferredSize, getBorderPreferredSize, getConstraint, getMinimumSize, getPreferredSize, invalidate, isObservingVisibility, remove, setConstraint, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewportLayout

public ViewportLayout()
Method Detail

calculateMinimumSize

protected 
Dimension calculateMinimumSize(
IFigure figure,
                                         int wHint,
                                         int hHint)
Returns the minimum size required by the input viewport figure. Since viewport is flexible, the minimum size required would be the just the size of the borders.

Overrides:
calculateMinimumSize in class AbstractHintLayout
Parameters:
figure - 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 parent,
                                           int wHint,
                                           int hHint)
Calculates and returns the preferred size of the figure based on the given hints. The given wHint is ignored unless the viewport (parent) is tracking width. The same is true for the height hint.

Specified by:
calculatePreferredSize in class AbstractLayout
Parameters:
parent - the Viewport whose preferred size is to be calculated
wHint - the width hint
hHint - the height hint
Returns:
the Preferred size of the given viewport
Since:
2.0

isSensitiveHorizontally

protected boolean isSensitiveHorizontally(
IFigure parent)
Description copied from class: AbstractHintLayout
Returns whether this layout manager is sensitive to changes in the horizontal hint. By default, this method returns true.

Overrides:
isSensitiveHorizontally in class AbstractHintLayout
Parameters:
parent - the layout's container
Returns:
true if this layout is sensite to horizontal hint changes
See Also:
AbstractHintLayout.isSensitiveHorizontally(IFigure)

isSensitiveVertically

protected boolean isSensitiveVertically(
IFigure parent)
Description copied from class: AbstractHintLayout
Returns whether this layout manager is sensitive to changes in the vertical hint. By default, this method returns true.

Overrides:
isSensitiveVertically in class AbstractHintLayout
Parameters:
parent - the layout's container
Returns:
true if this layout is sensite to vertical hint changes
See Also:
AbstractHintLayout.isSensitiveHorizontally(IFigure)

layout

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

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

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