org.tbee.swing
Class ScrollPaneLayout
java.lang.Object
javax.swing.ScrollPaneLayout
org.tbee.swing.ScrollPaneLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.io.Serializable, javax.swing.ScrollPaneConstants
public class ScrollPaneLayout
- extends javax.swing.ScrollPaneLayout
Extends scrollpane layout so the room in the scroll borders next to the scrollbars can be used.
Usage:
JScrollPane sp = new JScrollPane();
sp.setLayout(new ScrollPaneLayout());
sp.add("HorizontalLeft", JPanelUtils.createHorizontalPanel(new Component[]{new ImageButton(), new ImageButton(), new ImageButton() }));
sp.add("HorizontalRight", JPanelUtils.createHorizontalPanel(new Component[]{new JButton("test"),new JButton("test"),new JButton("test") }, 0));
sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
sp.add("VerticalTop", JPanelUtils.createVerticalPanel(new Component[]{new JButton(new VerticalTextIcon("test", true)), new JButton(new VerticalTextIcon("test2", true)), new JButton(new VerticalTextIcon("test3", true)) }, 0));
sp.add("VerticalBottom", JPanelUtils.createVerticalPanel(new Component[]{new ImageButton(), new ImageButton(), new ImageButton() }));
sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
sp.setViewportView(...);
- Version:
- $Revision: 1.6 $
- 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 |
| Methods inherited from class javax.swing.ScrollPaneLayout |
addSingletonComponent, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorderBounds, minimumLayoutSize, preferredLayoutSize, setHorizontalScrollBarPolicy, setVerticalScrollBarPolicy, syncWithScrollPane |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCECODE_VERSION
public static final java.lang.String SOURCECODE_VERSION
- Standard variable for determining version of a class file.
- See Also:
- Constant Field Values
HORIZONTAL_LEFT
public static final java.lang.String HORIZONTAL_LEFT
- See Also:
- Constant Field Values
HORIZONTAL_RIGHT
public static final java.lang.String HORIZONTAL_RIGHT
- See Also:
- Constant Field Values
VERTICAL_TOP
public static final java.lang.String VERTICAL_TOP
- See Also:
- Constant Field Values
VERTICAL_BOTTOM
public static final java.lang.String VERTICAL_BOTTOM
- See Also:
- Constant Field Values
hleft
protected java.awt.Component hleft
hright
protected java.awt.Component hright
vtop
protected java.awt.Component vtop
vbottom
protected java.awt.Component vbottom
ScrollPaneLayout
public ScrollPaneLayout()
addLayoutComponent
public void addLayoutComponent(java.lang.String s,
java.awt.Component c)
- Specified by:
addLayoutComponent in interface java.awt.LayoutManager- Overrides:
addLayoutComponent in class javax.swing.ScrollPaneLayout
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component c)
- Specified by:
removeLayoutComponent in interface java.awt.LayoutManager- Overrides:
removeLayoutComponent in class javax.swing.ScrollPaneLayout
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Specified by:
layoutContainer in interface java.awt.LayoutManager- Overrides:
layoutContainer in class javax.swing.ScrollPaneLayout
main
public static void main(java.lang.String[] args)
Copyright © 2010 KnowledgePlaza. All Rights Reserved.