Skip navigation links
oracle.ide.ceditor
Class CEScrollPaneLayout
java.lang.Object
javax.swing.ScrollPaneLayout
oracle.ide.ceditor.CEScrollPaneLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.io.Serializable, javax.swing.ScrollPaneConstants
-
public final class CEScrollPaneLayout
- extends javax.swing.ScrollPaneLayout
The CEScrollPaneLayout
lays out a custom view that looks like this:
G XXXXX V
G XXXXX V
G XXXXX V
G XXXXX V
HHHHHHHHH
Where G = Line Gutter, V = Vertical Scroll bar, H = Horizontal Scroll Bar, X = main view. This is so that we don't have blank corners that are unused, and also allows us to make the entire scrollpane non-opaque and leave it to the children to paint in.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.ScrollPaneLayout |
javax.swing.ScrollPaneLayout.UIResource |
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 |
Method Summary |
void |
layoutContainer(java.awt.Container parent)
Lay out the scrollpane according to our custom layout. |
java.awt.Dimension |
minimumLayoutSize(java.awt.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. |
java.awt.Dimension |
preferredLayoutSize(java.awt.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 |
syncWithScrollPane(javax.swing.JScrollPane scrollPane)
This method must be called after setting a JScrollPanes layout manager. |
Methods inherited from class javax.swing.ScrollPaneLayout |
addLayoutComponent, addSingletonComponent, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorderBounds, removeLayoutComponent, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CEScrollPaneLayout
public CEScrollPaneLayout()
syncWithScrollPane
public void syncWithScrollPane(javax.swing.JScrollPane scrollPane)
- This method must be called after setting a JScrollPanes layout manager. It initializes all of the internal fields that are ordinarily set by addLayoutComponent().
-
- Overrides:
syncWithScrollPane
in class javax.swing.ScrollPaneLayout
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.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.
-
- Specified by:
preferredLayoutSize
in interface java.awt.LayoutManager
- Overrides:
preferredLayoutSize
in class javax.swing.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 java.awt.Dimension minimumLayoutSize(java.awt.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 java.awt.LayoutManager
- Overrides:
minimumLayoutSize
in class javax.swing.ScrollPaneLayout
-
- Parameters:
parent
- the Container that will be laid out
- Returns:
- a Dimension object specifying the minimum size
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Lay out the scrollpane according to our custom layout.
-
- Specified by:
layoutContainer
in interface java.awt.LayoutManager
- Overrides:
layoutContainer
in class javax.swing.ScrollPaneLayout
-
- Parameters:
parent
- the Container to lay out
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.