edu.umd.cs.piccolox.swing
Class PScrollPaneLayout

java.lang.Object
  extended by javax.swing.ScrollPaneLayout
      extended by edu.umd.cs.piccolox.swing.PScrollPaneLayout
All Implemented Interfaces:
LayoutManager, Serializable, ScrollPaneConstants
Direct Known Subclasses:
PScrollPaneLayout.UIResource

public class PScrollPaneLayout
extends ScrollPaneLayout

A subclass of ScrollPaneLayout that looks at the Viewport for sizing information rather than View. Also queries the Viewport for sizing information after each decision about scrollbar visiblity.

Author:
Lance Good
See Also:
Serialized Form

Nested Class Summary
static class PScrollPaneLayout.UIResource
          The UI resource version of PScrollPaneLayout.
 
Field Summary
 
Fields inherited from class javax.swing.ScrollPaneLayout
colHead, hsb, hsbPolicy, lowerLeft, lowerRight, rowHead, upperLeft, upperRight, viewport, vsb, vsbPolicy
 
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
 
Constructor Summary
PScrollPaneLayout()
           
 
Method Summary
protected  void adjustForHSB(boolean wantsHSB, Rectangle available, Rectangle hsbR, Insets vpbInsets)
          Copied FROM javax.swing.ScrollPaneLayout.adjustForHSB.
protected  void adjustForVSB(boolean wantsVSB, Rectangle available, Rectangle vsbR, Insets vpbInsets, boolean leftToRight)
          Copied FROM javax.swing.ScrollPaneLayout.adjustForVSB.
 void layoutContainer(Container parent)
          MODIFIED FROM javax.swing.ScrollPaneLayout.layoutContainer.
 
Methods inherited from class javax.swing.ScrollPaneLayout
addLayoutComponent, addSingletonComponent, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorderBounds, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy, syncWithScrollPane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PScrollPaneLayout

public PScrollPaneLayout()
Method Detail

layoutContainer

public void layoutContainer(Container parent)
MODIFIED FROM javax.swing.ScrollPaneLayout.layoutContainer. This is largely the same as ScrollPaneLayout.layoutContainer but obtains the preferred view size from the viewport rather than directly from the view so the viewport can get the preferred size from the PScrollDirector

Specified by:
layoutContainer in interface LayoutManager
Overrides:
layoutContainer in class ScrollPaneLayout
Parameters:
parent - the Container to lay out

adjustForVSB

protected void adjustForVSB(boolean wantsVSB,
                            Rectangle available,
                            Rectangle vsbR,
                            Insets vpbInsets,
                            boolean leftToRight)
Copied FROM javax.swing.ScrollPaneLayout.adjustForVSB. This method is called from ScrollPaneLayout.layoutContainer and is private in ScrollPaneLayout so it was copied here

Parameters:
wantsVSB - whether to account for vertical scrollbar
available - region to adjust
vsbR - vertical scroll bar region
vpbInsets - margin of vertical scroll bars
leftToRight - orientation of the text LTR or RTL

adjustForHSB

protected void adjustForHSB(boolean wantsHSB,
                            Rectangle available,
                            Rectangle hsbR,
                            Insets vpbInsets)
Copied FROM javax.swing.ScrollPaneLayout.adjustForHSB. This method is called from ScrollPaneLayout.layoutContainer and is private in ScrollPaneLayout so it was copied here

Parameters:
wantsHSB - whether to account for horizontal scrollbar
available - region to adjust
hsbR - vertical scroll bar region
vpbInsets - margin of the scroll bars


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.