JIDE 3.5.15

com.jidesoft.swing
Class JideScrollPaneLayout

java.lang.Object
  extended by javax.swing.ScrollPaneLayout
      extended by com.jidesoft.swing.JideScrollPaneLayout
All Implemented Interfaces:
JideScrollPaneConstants, LayoutManager, Serializable, ScrollPaneConstants

public class JideScrollPaneLayout
extends ScrollPaneLayout
implements JideScrollPaneConstants

The layout manager used by JideScrollPane. JideScrollPaneLayout is responsible for eleven components: a viewport, two scrollbars, a row header, a column header, a row footer, a column footer, and four "corner" components.

See Also:
Serialized Form

Field Summary
protected  JViewport _colFoot
          The column footer child.
protected  Component _hLeft
          The component to the left of horizontal scroll bar.
protected  Component _hRight
          The component to the right of horizontal scroll bar.
protected  JViewport _rowFoot
          The row footer child.
protected  JViewport _subColHead
          The row sub column header componeng.
protected  Component _subUpperLeft
          The component under upper left corner.
protected  Component _subUpperRight
          The component under upper right corner.
protected  Component _vBottom
          The component to the bottom of vertical scroll bar.
protected  Component _vTop
          The component to the top of vertical scroll bar.
 
Fields inherited from class javax.swing.ScrollPaneLayout
colHead, hsb, hsbPolicy, lowerLeft, lowerRight, rowHead, upperLeft, upperRight, viewport, vsb, vsbPolicy
 
Fields inherited from interface com.jidesoft.swing.JideScrollPaneConstants
COLUMN_FOOTER, HORIZONTAL_LEADING, HORIZONTAL_LEFT, HORIZONTAL_RIGHT, HORIZONTAL_TRAILING, ROW_FOOTER, SUB_COLUMN_HEADER, SUB_UPPER_LEFT, SUB_UPPER_RIGHT, VERTICAL_BOTTOM, VERTICAL_TOP
 
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
JideScrollPaneLayout()
           
 
Method Summary
 void addLayoutComponent(String s, Component c)
           
 JViewport getColumnFooter()
          Returns the JViewport object that is the column footer.
 JViewport getRowFooter()
          Returns the JViewport object that is the row footer.
 JViewport getRowSubColumnHeader()
          Returns the JViewport object that is the row sub column header.
 Component getScrollBarCorner(String key)
          Returns the Component at the specified corner.
protected  boolean isColumnFootersHeightUnified(JScrollPane sp)
           
protected  boolean isColumnHeadersHeightUnified(JScrollPane sp)
           
protected  boolean isHsbCoversWholeWidth(JScrollPane sp)
           
protected  boolean isVsbCoversWholeHeight(JScrollPane sp)
           
 void layoutContainer(Container parent)
          Lays out the scrollpane.
 Dimension minimumLayoutSize(Container parent)
          The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.
 Dimension preferredLayoutSize(Container parent)
          The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.
 void removeLayoutComponent(Component c)
           
 void syncWithScrollPane(JScrollPane sp)
           
 
Methods inherited from class javax.swing.ScrollPaneLayout
addSingletonComponent, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorderBounds, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rowFoot

protected JViewport _rowFoot
The row footer child. Default is null.

See Also:
JideScrollPane.setRowFooter(javax.swing.JViewport)

_subColHead

protected JViewport _subColHead
The row sub column header componeng. Default is null.

See Also:
JideScrollPane.setSubColumnHeader(javax.swing.JViewport)

_colFoot

protected JViewport _colFoot
The column footer child. Default is null.

See Also:
JideScrollPane.setColumnFooter(javax.swing.JViewport)

_hLeft

protected Component _hLeft
The component to the left of horizontal scroll bar.


_hRight

protected Component _hRight
The component to the right of horizontal scroll bar.


_vTop

protected Component _vTop
The component to the top of vertical scroll bar.


_vBottom

protected Component _vBottom
The component to the bottom of vertical scroll bar.


_subUpperLeft

protected Component _subUpperLeft
The component under upper left corner. Default is null.


_subUpperRight

protected Component _subUpperRight
The component under upper right corner. Default is null.

Constructor Detail

JideScrollPaneLayout

public JideScrollPaneLayout()
Method Detail

syncWithScrollPane

public void syncWithScrollPane(JScrollPane sp)
Overrides:
syncWithScrollPane in class ScrollPaneLayout

isHsbCoversWholeWidth

protected boolean isHsbCoversWholeWidth(JScrollPane sp)

isVsbCoversWholeHeight

protected boolean isVsbCoversWholeHeight(JScrollPane sp)

isColumnHeadersHeightUnified

protected boolean isColumnHeadersHeightUnified(JScrollPane sp)

isColumnFootersHeightUnified

protected boolean isColumnFootersHeightUnified(JScrollPane sp)

addLayoutComponent

public void addLayoutComponent(String s,
                               Component c)
Specified by:
addLayoutComponent in interface LayoutManager
Overrides:
addLayoutComponent in class ScrollPaneLayout

removeLayoutComponent

public void removeLayoutComponent(Component c)
Specified by:
removeLayoutComponent in interface LayoutManager
Overrides:
removeLayoutComponent in class ScrollPaneLayout

getRowFooter

public JViewport getRowFooter()
Returns the JViewport object that is the row footer.

Returns:
the JViewport object that is the row footer
See Also:
JideScrollPane.getRowFooter()

getRowSubColumnHeader

public JViewport getRowSubColumnHeader()
Returns the JViewport object that is the row sub column header.

Returns:
the JViewport object that is the row sub column header.
See Also:
JideScrollPane.getSubColumnHeader()

getColumnFooter

public JViewport getColumnFooter()
Returns the JViewport object that is the column footer.

Returns:
the JViewport object that is the column footer
See Also:
JideScrollPane.getColumnFooter()

getScrollBarCorner

public Component getScrollBarCorner(String key)
Returns the Component at the specified corner.

Parameters:
key - the String specifying the corner
Returns:
the Component at the specified corner, as defined in ScrollPaneConstants; if key is not one of the four corners, null is returned
See Also:
JScrollPane.getCorner(java.lang.String)

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
The preferred size of a ScrollPane is the size of the insets, plus the preferred size of the viewport, plus the preferred size of the visible headers, plus the preferred size of the scrollbars that will appear given the current view and the current scrollbar displayPolicies.

Note that the rowHeader is calculated as part of the preferred width and the colHeader is calculated as part of the preferred size.

Specified by:
preferredLayoutSize in interface LayoutManager
Overrides:
preferredLayoutSize in class ScrollPaneLayout
Parameters:
parent - the Container that will be laid out
Returns:
a Dimension object specifying the preferred size of the viewport and any scrollbars
See Also:
ViewportLayout, LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
The minimum size of a ScrollPane is the size of the insets plus minimum size of the viewport, plus the scrollpane's viewportBorder insets, plus the minimum size of the visible headers, plus the minimum size of the scrollbars whose displayPolicy isn't NEVER.

Specified by:
minimumLayoutSize in interface LayoutManager
Overrides:
minimumLayoutSize in class ScrollPaneLayout
Parameters:
parent - the Container that will be laid out
Returns:
a Dimension object specifying the minimum size

layoutContainer

public void layoutContainer(Container parent)
Lays out the scrollpane. The positioning of components depends on the following constraints:

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

JIDE 3.5.15