Side of Software
Print Preview Library 1.8.1

sos.preview
Interface ScrollableLayoutManager

All Superinterfaces:
java.awt.LayoutManager
All Known Implementing Classes:
FitAllLayout, FitLayout, MatrixLayout, ZoomLayout

public interface ScrollableLayoutManager
extends java.awt.LayoutManager

A layout manager that also dictates how the container should scroll.

Since:
1.0

Method Summary
 java.awt.Dimension getPreferredScrollableViewportSize(java.awt.Container container)
          Returns the specified container's preferred scrollable viewport size.
 int getScrollableBlockIncrement(java.awt.Container container, java.awt.Rectangle rectangle, int orientation, int direction)
          Returns the specified container's scrollable block increment.
 boolean getScrollableTracksViewportHeight(java.awt.Container container)
          Returns true if a viewport should always force the height of the specified container to match the height of the viewport.
 boolean getScrollableTracksViewportWidth(java.awt.Container container)
          Returns true if a viewport should always force the width of the specified container to match the width of the viewport.
 int getScrollableUnitIncrement(java.awt.Container container, java.awt.Rectangle rectangle, int orientation, int direction)
          Returns the specified container's scrollable unit increment.
 
Methods inherited from interface java.awt.LayoutManager
addLayoutComponent, layoutContainer, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
 

Method Detail

getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize(java.awt.Container container)
Returns the specified container's preferred scrollable viewport size. The semantics are the same as javax.swing.Scrollable#getPreferredScrollableViewportSize, except the container is a parameter instead of the receiver.

Parameters:
container - Container for which the preferred size is requested
Returns:
The preferred scrollable viewport size of container

getScrollableBlockIncrement

public int getScrollableBlockIncrement(java.awt.Container container,
                                       java.awt.Rectangle rectangle,
                                       int orientation,
                                       int direction)
Returns the specified container's scrollable block increment. The semantics are the same as javax.swing.Scrollable#getScrollableBlockIncrement, except the container is a parameter instead of the receiver.

Parameters:
container - The container that is being scrolled
rectangle - The view area visible within the viewport
orientation - The axis of the scrolling--either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL
direction - A negative number to indicate scrolling left or up, or a positive number to indicate scrolling right or down
Returns:
The amount the viewport should scroll as a result of a "block" increment. It should be positive.

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight(java.awt.Container container)
Returns true if a viewport should always force the height of the specified container to match the height of the viewport. The semantics are the same as javax.swing.Scrollable#getScrollableTracksViewportHeight, except the container is a parameter instead of the receiver.

Parameters:
container - The container in question
Returns:
true if a viewport should keep the container's height the same height of the viewport

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth(java.awt.Container container)
Returns true if a viewport should always force the width of the specified container to match the width of the viewport. The semantics are the same as javax.swing.Scrollable#getScrollableTracksViewportWidth, except the container is a parameter instead of the receiver.

Parameters:
container - The container in question
Returns:
true if a viewport should keep the container's width the same width of the viewport

getScrollableUnitIncrement

public int getScrollableUnitIncrement(java.awt.Container container,
                                      java.awt.Rectangle rectangle,
                                      int orientation,
                                      int direction)
Returns the specified container's scrollable unit increment. The semantics are the same as javax.swing.Scrollable#getScrollableUnitIncrement, except the container is a parameter instead of the receiver.

Parameters:
container - The container that is being scrolled
rectangle - The view area visible within the viewport
orientation - The axis of the scrolling--either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL
direction - A negative number to indicate scrolling left or up, or a positive number to indicate scrolling right or down
Returns:
The amount the viewport should scroll as a result of a "unit" increment. It should be positive.

Side of Software
Print Preview Library 1.8.1

Copyright 2003-07 Side of Software (SOS). All rights reserved.