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 ScrollPaneLayout

java.lang.Object
  extended by

org.eclipse.draw2d.AbstractLayout
      extended by

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

public class ScrollPaneLayout
extends AbstractHintLayout

The ScrollPaneLayout is responsible for laying out the Viewport and ScrollBars of a ScrollPane.


Field Summary
protected static int ALWAYS
           
protected static int AUTO
           
protected static int NEVER
           
 
Fields inherited from class org.eclipse.draw2d. AbstractLayout
isObservingVisibility, preferredSize
 
Constructor Summary
ScrollPaneLayout ()
           
 
Method Summary
  Dimension calculateMinimumSize ( IFigure figure, int w, int h)
          Calculates the minimum size using the given width and height hints.
protected   Dimension calculatePreferredSize ( IFigure container, int wHint, int hHint)
          Calculates and returns the preferred size of the container based on the given hints.
 void layout ( IFigure parent)
          Lays out the given figure.
 
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, remove, setConstraint, setObserveVisibility
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEVER

protected static final int NEVER
See Also:
ScrollPane.NEVER, Constant Field Values

AUTO

protected static final int AUTO
See Also:
ScrollPane.AUTOMATIC, Constant Field Values

ALWAYS

protected static final int ALWAYS
See Also:
ScrollPane.ALWAYS, Constant Field Values
Constructor Detail

ScrollPaneLayout

public ScrollPaneLayout()
Method Detail

calculateMinimumSize

public 
Dimension calculateMinimumSize(
IFigure figure,
                                      int w,
                                      int h)
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:
figure - the Figure on which this layout is installed
w - the width hint
h - 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)
Calculates and returns the preferred size of the container based on the given hints. If the given ScrollPane's (container) horizontal and vertical scroll bar visibility is not ScrollPane.NEVER, then space for those bars is always deducted from the hints (whether or not we actually need the scroll bars).

Specified by:
calculatePreferredSize in class AbstractLayout
Parameters:
container - the ScrollPane whose preferred size needs to be calculated
wHint - the width hint
hHint - the height hint
Returns:
the preferred size of the given container
Since:
2.0

layout

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

Parameters:
parent - 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