Liking cljdoc? Tell your friends :D

javax.swing.ScrollPaneLayout

The layout manager used by JScrollPane. JScrollPaneLayout is responsible for nine components: a viewport, two scrollbars, a row header, a column header, and four "corner" components.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

The layout manager used by JScrollPane.
JScrollPaneLayout is
responsible for nine components: a viewport, two scrollbars,
a row header, a column header, and four "corner" components.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing.  As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

->scroll-pane-layoutclj

(->scroll-pane-layout)

Constructor.

Constructor.
raw docstring

add-layout-componentclj

(add-layout-component this s c)

Adds the specified component to the layout. The layout is identified using one of:

ScrollPaneConstants.VIEWPORT ScrollPaneConstants.VERTICAL_SCROLLBAR ScrollPaneConstants.HORIZONTAL_SCROLLBAR ScrollPaneConstants.ROW_HEADER ScrollPaneConstants.COLUMN_HEADER ScrollPaneConstants.LOWER_LEFT_CORNER ScrollPaneConstants.LOWER_RIGHT_CORNER ScrollPaneConstants.UPPER_LEFT_CORNER ScrollPaneConstants.UPPER_RIGHT_CORNER

s - the component identifier - java.lang.String c - the the component to be added - java.awt.Component

throws: java.lang.IllegalArgumentException - if s is an invalid key

Adds the specified component to the layout. The layout is
 identified using one of:

 ScrollPaneConstants.VIEWPORT
 ScrollPaneConstants.VERTICAL_SCROLLBAR
 ScrollPaneConstants.HORIZONTAL_SCROLLBAR
 ScrollPaneConstants.ROW_HEADER
 ScrollPaneConstants.COLUMN_HEADER
 ScrollPaneConstants.LOWER_LEFT_CORNER
 ScrollPaneConstants.LOWER_RIGHT_CORNER
 ScrollPaneConstants.UPPER_LEFT_CORNER
 ScrollPaneConstants.UPPER_RIGHT_CORNER

s - the component identifier - `java.lang.String`
c - the the component to be added - `java.awt.Component`

throws: java.lang.IllegalArgumentException - if s is an invalid key
raw docstring

get-column-headerclj

(get-column-header this)

Returns the JViewport object that is the column header.

returns: the JViewport object that is the column header - javax.swing.JViewport

Returns the JViewport object that is the column header.

returns: the JViewport object that is the column header - `javax.swing.JViewport`
raw docstring

get-cornerclj

(get-corner this key)

Returns the Component at the specified corner.

key - the String specifying the corner - java.lang.String

returns: the Component at the specified corner, as defined in ScrollPaneConstants; if key is not one of the four corners, null is returned - java.awt.Component

Returns the Component at the specified corner.

key - the String specifying the corner - `java.lang.String`

returns: the Component at the specified corner, as defined in
         ScrollPaneConstants; if key is not one of the
          four corners, null is returned - `java.awt.Component`
raw docstring

get-horizontal-scroll-barclj

(get-horizontal-scroll-bar this)

Returns the JScrollBar object that handles horizontal scrolling.

returns: the JScrollBar object that handles horizontal scrolling - javax.swing.JScrollBar

Returns the JScrollBar object that handles horizontal scrolling.

returns: the JScrollBar object that handles horizontal scrolling - `javax.swing.JScrollBar`
raw docstring

get-horizontal-scroll-bar-policyclj

(get-horizontal-scroll-bar-policy this)

Returns the horizontal scrollbar-display policy.

returns: an integer giving the display policy - int

Returns the horizontal scrollbar-display policy.

returns: an integer giving the display policy - `int`
raw docstring

get-row-headerclj

(get-row-header this)

Returns the JViewport object that is the row header.

returns: the JViewport object that is the row header - javax.swing.JViewport

Returns the JViewport object that is the row header.

returns: the JViewport object that is the row header - `javax.swing.JViewport`
raw docstring

get-vertical-scroll-barclj

(get-vertical-scroll-bar this)

Returns the JScrollBar object that handles vertical scrolling.

returns: the JScrollBar object that handles vertical scrolling - javax.swing.JScrollBar

Returns the JScrollBar object that handles vertical scrolling.

returns: the JScrollBar object that handles vertical scrolling - `javax.swing.JScrollBar`
raw docstring

get-vertical-scroll-bar-policyclj

(get-vertical-scroll-bar-policy this)

Returns the vertical scrollbar-display policy.

returns: an integer giving the display policy - int

Returns the vertical scrollbar-display policy.

returns: an integer giving the display policy - `int`
raw docstring

get-viewportclj

(get-viewport this)

Returns the JViewport object that displays the scrollable contents.

returns: the JViewport object that displays the scrollable contents - javax.swing.JViewport

Returns the JViewport object that displays the
 scrollable contents.

returns: the JViewport object that displays the scrollable contents - `javax.swing.JViewport`
raw docstring

get-viewport-border-boundsclj

(get-viewport-border-bounds this scrollpane)

Deprecated. As of JDK version Swing1.1 replaced by JScrollPane.getViewportBorderBounds().

scrollpane - javax.swing.JScrollPane

returns: the size and position of the viewport border - java.awt.Rectangle

Deprecated. As of JDK version Swing1.1
    replaced by JScrollPane.getViewportBorderBounds().

scrollpane - `javax.swing.JScrollPane`

returns: the size and position of the viewport border - `java.awt.Rectangle`
raw docstring

layout-containerclj

(layout-container this parent)

Lays out the scrollpane. The positioning of components depends on the following constraints:

The row header, if present and visible, gets its preferred width and the viewport's height.

The column header, if present and visible, gets its preferred height and the viewport's width.

If a vertical scrollbar is needed, i.e. if the viewport's extent height is smaller than its view height or if the displayPolicy is ALWAYS, it's treated like the row header with respect to its dimensions and is made visible.

If a horizontal scrollbar is needed, it is treated like the column header (see the paragraph above regarding the vertical scrollbar).

If the scrollpane has a non-null viewportBorder, then space is allocated for that.

The viewport gets the space available after accounting for the previous constraints.

The corner components, if provided, are aligned with the ends of the scrollbars and headers. If there is a vertical scrollbar, the right corners appear; if there is a horizontal scrollbar, the lower corners appear; a row header gets left corners, and a column header gets upper corners.

parent - the Container to lay out - java.awt.Container

Lays out the scrollpane. The positioning of components depends on
 the following constraints:

  The row header, if present and visible, gets its preferred
 width and the viewport's height.

  The column header, if present and visible, gets its preferred
 height and the viewport's width.

  If a vertical scrollbar is needed, i.e. if the viewport's extent
 height is smaller than its view height or if the displayPolicy
 is ALWAYS, it's treated like the row header with respect to its
 dimensions and is made visible.

  If a horizontal scrollbar is needed, it is treated like the
 column header (see the paragraph above regarding the vertical scrollbar).

  If the scrollpane has a non-null
 viewportBorder, then space is allocated for that.

  The viewport gets the space available after accounting for
 the previous constraints.

  The corner components, if provided, are aligned with the
 ends of the scrollbars and headers. If there is a vertical
 scrollbar, the right corners appear; if there is a horizontal
 scrollbar, the lower corners appear; a row header gets left
 corners, and a column header gets upper corners.

parent - the Container to lay out - `java.awt.Container`
raw docstring

minimum-layout-sizeclj

(minimum-layout-size this 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.

parent - the Container that will be laid out - java.awt.Container

returns: a Dimension object specifying the minimum size - java.awt.Dimension

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.

parent - the Container that will be laid out - `java.awt.Container`

returns: a Dimension object specifying the minimum size - `java.awt.Dimension`
raw docstring

preferred-layout-sizeclj

(preferred-layout-size this 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.

parent - the Container that will be laid out - java.awt.Container

returns: a Dimension object specifying the preferred size of the viewport and any scrollbars - java.awt.Dimension

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.

parent - the Container that will be laid out - `java.awt.Container`

returns: a Dimension object specifying the preferred size of the
         viewport and any scrollbars - `java.awt.Dimension`
raw docstring

remove-layout-componentclj

(remove-layout-component this c)

Removes the specified component from the layout.

c - the component to remove - java.awt.Component

Removes the specified component from the layout.

c - the component to remove - `java.awt.Component`
raw docstring

set-horizontal-scroll-bar-policyclj

(set-horizontal-scroll-bar-policy this x)

Sets the horizontal scrollbar-display policy. The options are: ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS

Note: Applications should use the JScrollPane version of this method. It only exists for backwards compatibility with the Swing 1.0.2 (and earlier) versions of this class.

x - an int giving the display policy - int

throws: java.lang.IllegalArgumentException - if x is not a valid horizontal scrollbar policy, as listed above

Sets the horizontal scrollbar-display policy.
 The options are:
 ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED
 ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
 ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS

 Note: Applications should use the JScrollPane version
 of this method.  It only exists for backwards compatibility
 with the Swing 1.0.2 (and earlier) versions of this class.

x - an int giving the display policy - `int`

throws: java.lang.IllegalArgumentException - if x is not a valid horizontal scrollbar policy, as listed above
raw docstring

set-vertical-scroll-bar-policyclj

(set-vertical-scroll-bar-policy this x)

Sets the vertical scrollbar-display policy. The options are:

ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS

Note: Applications should use the JScrollPane version of this method. It only exists for backwards compatibility with the Swing 1.0.2 (and earlier) versions of this class.

x - an integer giving the display policy - int

throws: java.lang.IllegalArgumentException - if x is an invalid vertical scroll bar policy, as listed above

Sets the vertical scrollbar-display policy. The options
 are:

 ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED
 ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER
 ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS

 Note: Applications should use the JScrollPane version
 of this method.  It only exists for backwards compatibility
 with the Swing 1.0.2 (and earlier) versions of this class.

x - an integer giving the display policy - `int`

throws: java.lang.IllegalArgumentException - if x is an invalid vertical scroll bar policy, as listed above
raw docstring

sync-with-scroll-paneclj

(sync-with-scroll-pane this sp)

This method is invoked after the ScrollPaneLayout is set as the LayoutManager of a JScrollPane. It initializes all of the internal fields that are ordinarily set by addLayoutComponent. For example:

ScrollPaneLayout mySPLayout = new ScrollPanelLayout() { public void layoutContainer(Container p) { super.layoutContainer(p); // do some extra work here ... } }; scrollpane.setLayout(mySPLayout):

sp - javax.swing.JScrollPane

This method is invoked after the ScrollPaneLayout is set as the
 LayoutManager of a JScrollPane.
 It initializes all of the internal fields that
 are ordinarily set by addLayoutComponent.  For example:


 ScrollPaneLayout mySPLayout = new ScrollPanelLayout() {
     public void layoutContainer(Container p) {
         super.layoutContainer(p);
         // do some extra work here ...
     }
 };
 scrollpane.setLayout(mySPLayout):

sp - `javax.swing.JScrollPane`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close