JIDE 3.5.15

com.jidesoft.swing
Class JideScrollPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JScrollPane
                  extended by com.jidesoft.swing.JideScrollPane
All Implemented Interfaces:
JideScrollPaneConstants, ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants
Direct Known Subclasses:
PivotTablePane.JideScrollPaneEx, TableScrollPane

public class JideScrollPane
extends JScrollPane
implements JideScrollPaneConstants

JideScrollPane is an enhanced version of JScrollPane. In JScrollPane, you can have rowHeader and columnHeader. However you can't have rowFooter and columnFooter. However rowFooter and columnFooter are very useful in table. For example they can be used to display "total" or "summary" type of information.

Several methods related to rowFooter and columnFooter are added such as setRowFooter(javax.swing.JViewport), and setColumnFooter(javax.swing.JViewport) which will set the viewport to rowFooter and columnFooter area respectively. The usage of those methods are exactly the same as JScrollPane.setRowHeader(javax.swing.JViewport).

To fully leverage the power of JideScrollPane, we also create a class called TableScrollPane which is part of JIDE Grids package. It will allow you to easily create table with row header, row footer and column footer.

JideScrollPane also provides support for scrollbar corners. You can set them using setScrollBarCorner(String, java.awt.Component). Available key for scroll bar corner is defined at JideScrollPaneConstants which can be access from JideScrollPane.

Credit: This implementation of scroll bar corner is based on work from Santhosh Kumar - santhosh@in.fiorano.com.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JScrollPane
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JViewport _columnFooter
          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 _rowFooter
          The row footer child.
protected  JViewport _subColumnHeader
          The component under column header.
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.
static String CLIENT_PROPERTY_MASTER_VIEWPORT
           
static String CLIENT_PROPERTY_SLAVE_VIEWPORT
           
static String PROPERTY_COLUMN_FOOTERS_HEIGHT_UNIFIED
           
static String PROPERTY_COLUMN_HEADERS_HEIGHT_UNIFIED
           
static String PROPERTY_FLAT_LAYOUT
           
static String PROPERTY_HORIZONTAL_SCROLL_BAR_COVERS_WHOLE_WIDTH
           
static String PROPERTY_KEEP_CORNER_VISIBLE
           
static String PROPERTY_VERTICAL_SCROLL_BAR_COVERS_WHOLE_HEIGHT
           
 
Fields inherited from class javax.swing.JScrollPane
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JideScrollPane()
          Creates an empty (no viewport view) JideScrollPane where both horizontal and vertical scrollbars appear when needed.
JideScrollPane(Component view)
          Creates a JideScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.
JideScrollPane(Component view, int vsbPolicy, int hsbPolicy)
          Creates a JideScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars.
JideScrollPane(int vsbPolicy, int hsbPolicy)
          Creates an empty (no viewport view) JideScrollPane with specified scrollbar policies.
 
Method Summary
 JViewport getColumnFooter()
          Returns the column footer.
 Component getCorner(String key)
           
 JViewport getRowFooter()
          Returns the row footer.
 Component getScrollBarCorner(String key)
          Returns the component at the specified scroll bar corner.
 JViewport getSubColumnHeader()
          Returns the sub column header.
 boolean isColumnFootersHeightUnified()
          If true, the bottom-right, bottom-left corners the column footer will have the same height.
 boolean isColumnHeadersHeightUnified()
          If true, the top-right, top-left corners the column header will have the same height.
 boolean isFlatLayout()
          Gets the flag indicating if the JideScrollPane will layout its view flat without scroll bars.
 boolean isHorizontalScrollBarCoversWholeWidth()
           
 boolean isKeepCornerVisible()
          Get the flag indicating if JideScrollPane should keep the corner visible when it has corner components defined even when the scroll bar is not visible.
 boolean isVerticalScrollBarCoversWholeHeight()
           
 void setColumnFooter(JViewport columnFooter)
          Removes the old columnFooter, if it exists.
 void setColumnFootersHeightUnified(boolean columnFootersHeightUnified)
          Sets the flag if the bottom-right, bottom-left corner and the column footer will have the same height or different heights.
 void setColumnFooterView(Component view)
          Creates a column-footer viewport if necessary, sets its view, and then adds the column-footer viewport to the scrollpane.
 void setColumnHeader(JViewport columnHeader)
          Overrides to make column header viewport synchronizing with the main viewport.
 void setColumnHeadersHeightUnified(boolean columnHeadersHeightUnified)
          Sets the flag if the top-right, top-left corner and the column header will have the same height or different heights.
 void setCorner(String key, Component corner)
           
 void setFlatLayout(boolean flatLayout)
          Sets the flag indicating if the JideScrollPane will layout its view flat without scroll bars.
 void setHorizontalScrollBarCoversWholeWidth(boolean horizontalScrollBarCoversWholeWidth)
           
 void setKeepCornerVisible(boolean keepCornerVisible)
          Set the flag indicating if JideScrollPane should keep the corner visible when it has corner components defined even when the scroll bar is not visible.
 void setLayout(LayoutManager layout)
           
 void setRowFooter(JViewport rowFooter)
          Removes the old rowFooter, if it exists.
 void setRowFooterView(Component view)
          Creates a row-footer viewport if necessary, sets its view and then adds the row-footer viewport to the scrollpane.
 void setRowHeader(JViewport rowHeader)
          Override setRowHeader method in JScrollPane and synchronize the view with the main viewport.
 void setScrollBarCorner(String key, Component corner)
          Adds a child that will appear in one of the scroll bars corners.
 void setSubColumnHeader(JViewport subColumnHeader)
          Removes the old sub column header, if it exists.
 void setSubColumnHeaderView(Component view)
          Creates a sub-column-header viewport if necessary, sets its view, and then adds the sub-column-header viewport to the scrollpane.
 void setVerticalScrollBarCoversWholeHeight(boolean verticalScrollBarCoversWholeHeight)
           
 void setViewport(JViewport viewport)
           
 void updateUI()
           
 
Methods inherited from class javax.swing.JScrollPane
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeaderView, setComponentOrientation, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewportBorder, setViewportView, setWheelScrollingEnabled
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_rowFooter

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

See Also:
setRowFooter(javax.swing.JViewport)

_subColumnHeader

protected JViewport _subColumnHeader
The component under column header. Default is null.

See Also:
setSubColumnHeader(javax.swing.JViewport)

_subUpperLeft

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

See Also:
setCorner(String, java.awt.Component)

_subUpperRight

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

See Also:
setCorner(String, java.awt.Component)

_columnFooter

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

See Also:
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.


PROPERTY_HORIZONTAL_SCROLL_BAR_COVERS_WHOLE_WIDTH

public static final String PROPERTY_HORIZONTAL_SCROLL_BAR_COVERS_WHOLE_WIDTH
See Also:
Constant Field Values

PROPERTY_VERTICAL_SCROLL_BAR_COVERS_WHOLE_HEIGHT

public static final String PROPERTY_VERTICAL_SCROLL_BAR_COVERS_WHOLE_HEIGHT
See Also:
Constant Field Values

PROPERTY_KEEP_CORNER_VISIBLE

public static final String PROPERTY_KEEP_CORNER_VISIBLE
See Also:
Constant Field Values

PROPERTY_FLAT_LAYOUT

public static final String PROPERTY_FLAT_LAYOUT
See Also:
Constant Field Values

PROPERTY_COLUMN_HEADERS_HEIGHT_UNIFIED

public static final String PROPERTY_COLUMN_HEADERS_HEIGHT_UNIFIED
See Also:
Constant Field Values

PROPERTY_COLUMN_FOOTERS_HEIGHT_UNIFIED

public static final String PROPERTY_COLUMN_FOOTERS_HEIGHT_UNIFIED
See Also:
Constant Field Values

CLIENT_PROPERTY_SLAVE_VIEWPORT

public static final String CLIENT_PROPERTY_SLAVE_VIEWPORT
See Also:
Constant Field Values

CLIENT_PROPERTY_MASTER_VIEWPORT

public static final String CLIENT_PROPERTY_MASTER_VIEWPORT
See Also:
Constant Field Values
Constructor Detail

JideScrollPane

public JideScrollPane(Component view,
                      int vsbPolicy,
                      int hsbPolicy)
Creates a JideScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars. The scrollbar policies specify when the scrollbars are displayed, For example, if vsbPolicy is VERTICAL_SCROLLBAR_AS_NEEDED then the vertical scrollbar only appears if the view doesn't fit vertically. The available policy settings are listed at JScrollPane.setVerticalScrollBarPolicy(int) and JScrollPane.setHorizontalScrollBarPolicy(int).

Parameters:
view - the component to display in the scrollpanes viewport
vsbPolicy - an integer that specifies the vertical scrollbar policy
hsbPolicy - an integer that specifies the horizontal scrollbar policy
See Also:
JScrollPane.setViewportView(java.awt.Component)

JideScrollPane

public JideScrollPane(Component view)
Creates a JideScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.

Parameters:
view - the component to display in the scrollpane's viewport
See Also:
JScrollPane.setViewportView(java.awt.Component)

JideScrollPane

public JideScrollPane(int vsbPolicy,
                      int hsbPolicy)
Creates an empty (no viewport view) JideScrollPane with specified scrollbar policies. The available policy settings are listed at JScrollPane.setVerticalScrollBarPolicy(int) and JScrollPane.setHorizontalScrollBarPolicy(int).

Parameters:
vsbPolicy - an integer that specifies the vertical scrollbar policy
hsbPolicy - an integer that specifies the horizontal scrollbar policy
See Also:
JScrollPane.setViewportView(java.awt.Component)

JideScrollPane

public JideScrollPane()
Creates an empty (no viewport view) JideScrollPane where both horizontal and vertical scrollbars appear when needed.

Method Detail

setViewport

public void setViewport(JViewport viewport)
Overrides:
setViewport in class JScrollPane

getRowFooter

public JViewport getRowFooter()
Returns the row footer.

Returns:
the rowFooter property
See Also:
setRowFooter(javax.swing.JViewport)

setRowFooter

public void setRowFooter(JViewport rowFooter)
Removes the old rowFooter, if it exists. If the new rowFooter isn't null, syncs the y coordinate of its viewPosition with the viewport (if there is one) and then adds it to the scrollpane.

Parameters:
rowFooter - the new row footer to be used; if null the old row footer is still removed and the new rowFooter is set to null
See Also:
getRowFooter(), setRowFooterView(java.awt.Component)

setRowHeader

public void setRowHeader(JViewport rowHeader)
Override setRowHeader method in JScrollPane and synchronize the view with the main viewport. Swing tried to implement this feature but it will break if the view position changes starts from rowHeader.

Overrides:
setRowHeader in class JScrollPane
Parameters:
rowHeader - the new row header

setRowFooterView

public void setRowFooterView(Component view)
Creates a row-footer viewport if necessary, sets its view and then adds the row-footer viewport to the scrollpane. For example:
 JScrollPane scrollpane = new JideScrollPane();
 scrollpane.setViewportView(myBigComponentToScroll);
 scrollpane.setRowFooterView(myBigComponentsRowFooter);
 

Parameters:
view - the component to display as the row footer
See Also:
setRowFooter(javax.swing.JViewport), JViewport.setView(java.awt.Component)

getColumnFooter

public JViewport getColumnFooter()
Returns the column footer.

Returns:
the columnFooter property
See Also:
setColumnFooter(javax.swing.JViewport)

setColumnFooter

public void setColumnFooter(JViewport columnFooter)
Removes the old columnFooter, if it exists. If the new columnFooter isn't null, sync the x coordinate of the its viewPosition with the viewport (if there is one) and then add it to the scrollpane.

Parameters:
columnFooter - the new column footer to be used; if null the old column footer is still removed and the new columnFooter is set to null
See Also:
getColumnFooter(), setColumnFooterView(java.awt.Component)

setColumnHeader

public void setColumnHeader(JViewport columnHeader)
Overrides to make column header viewport synchronizing with the main viewport.

Overrides:
setColumnHeader in class JScrollPane
Parameters:
columnHeader - the column header

getSubColumnHeader

public JViewport getSubColumnHeader()
Returns the sub column header.

Returns:
the rowSubColumnHeader property
See Also:
setSubColumnHeader(javax.swing.JViewport)

setSubColumnHeader

public void setSubColumnHeader(JViewport subColumnHeader)
Removes the old sub column header, if it exists. If the new sub column header isn't null, sync the x coordinate of the its viewPosition with the viewport (if there is one) and then add it to the scroll pane.

Parameters:
subColumnHeader - the new sub column header to be used; if null the old sub column header is still removed and the new sub column header is set to null
See Also:
getSubColumnHeader()

setColumnFooterView

public void setColumnFooterView(Component view)
Creates a column-footer viewport if necessary, sets its view, and then adds the column-footer viewport to the scrollpane. For example:
 JScrollPane scrollpane = new JideScrollPane();
 scrollpane.setViewportView(myBigComponentToScroll);
 scrollpane.setColumnFooterView(myBigComponentsColumnFooter);
 

Parameters:
view - the component to display as the column footer
See Also:
setColumnFooter(javax.swing.JViewport), JViewport.setView(java.awt.Component)

setSubColumnHeaderView

public void setSubColumnHeaderView(Component view)
Creates a sub-column-header viewport if necessary, sets its view, and then adds the sub-column-header viewport to the scrollpane.

Parameters:
view - the component to display as the sub column header
See Also:
setSubColumnHeader(javax.swing.JViewport), JViewport.setView(java.awt.Component)

getCorner

public Component getCorner(String key)
Overrides:
getCorner in class JScrollPane

setCorner

public void setCorner(String key,
                      Component corner)
Overrides:
setCorner in class JScrollPane

getScrollBarCorner

public Component getScrollBarCorner(String key)
Returns the component at the specified scroll bar corner. The key value specifying the corner is one of:

Parameters:
key - one of the values as shown above
Returns:
one of the components listed below or null if key is invalid:
  • lowerLeft
  • lowerRight
  • upperLeft
  • upperRight
See Also:
setCorner(String, java.awt.Component)

setScrollBarCorner

public void setScrollBarCorner(String key,
                               Component corner)
Adds a child that will appear in one of the scroll bars corners. Scroll bar will make room to show the corner component. Legal values for the key are:

Although "corner" doesn't match any beans property signature, PropertyChange events are generated with the property name set to the corner key.

Parameters:
key - identifies which corner the component will appear in
corner - one of the following components:
  • lowerLeft
  • lowerRight
  • upperLeft
  • upperRight
Throws:
IllegalArgumentException - if corner key is invalid

updateUI

public void updateUI()
Overrides:
updateUI in class JScrollPane

setLayout

public void setLayout(LayoutManager layout)
Overrides:
setLayout in class JScrollPane

isVerticalScrollBarCoversWholeHeight

public boolean isVerticalScrollBarCoversWholeHeight()

setHorizontalScrollBarCoversWholeWidth

public void setHorizontalScrollBarCoversWholeWidth(boolean horizontalScrollBarCoversWholeWidth)

isHorizontalScrollBarCoversWholeWidth

public boolean isHorizontalScrollBarCoversWholeWidth()

setVerticalScrollBarCoversWholeHeight

public void setVerticalScrollBarCoversWholeHeight(boolean verticalScrollBarCoversWholeHeight)

isColumnHeadersHeightUnified

public boolean isColumnHeadersHeightUnified()
If true, the top-right, top-left corners the column header will have the same height. If false, three of them will keep their own preferred height.

Returns:
true or false.

setColumnHeadersHeightUnified

public void setColumnHeadersHeightUnified(boolean columnHeadersHeightUnified)
Sets the flag if the top-right, top-left corner and the column header will have the same height or different heights.

Parameters:
columnHeadersHeightUnified - true or false.

isColumnFootersHeightUnified

public boolean isColumnFootersHeightUnified()
If true, the bottom-right, bottom-left corners the column footer will have the same height. If false, three of them will keep their own preferred height.

Returns:
true or false.

setColumnFootersHeightUnified

public void setColumnFootersHeightUnified(boolean columnFootersHeightUnified)
Sets the flag if the bottom-right, bottom-left corner and the column footer will have the same height or different heights.

Parameters:
columnFootersHeightUnified - true or false.

isKeepCornerVisible

public boolean isKeepCornerVisible()
Get the flag indicating if JideScrollPane should keep the corner visible when it has corner components defined even when the scroll bar is not visible.

This flag will take effect only when the scroll bar policy is HORIZONTAL_SCROLLBAR_AS_NEEDED or VERTICAL_SCROLLBAR_AS_NEEDED

The default value of this flag is false.

Returns:
the flag.

setKeepCornerVisible

public void setKeepCornerVisible(boolean keepCornerVisible)
Set the flag indicating if JideScrollPane should keep the corner visible when it has corner components defined even when the scroll bar is not visible.

Parameters:
keepCornerVisible - the flag

isFlatLayout

public boolean isFlatLayout()
Gets the flag indicating if the JideScrollPane will layout its view flat without scroll bars.

Returns:
true if flat layout. Otherwise false.
Since:
3.3.3
See Also:
setFlatLayout(boolean)

setFlatLayout

public void setFlatLayout(boolean flatLayout)
Sets the flag indicating if the JideScrollPane will layout its view flat without scroll bars.

By default, the value is false to keep normal behavior.

Parameters:
flatLayout - the flag
Since:
3.3.3

JIDE 3.5.15