org.tbee.swing
Class ScrollPaneLayout

java.lang.Object
  extended by javax.swing.ScrollPaneLayout
      extended by org.tbee.swing.ScrollPaneLayout
All Implemented Interfaces:
LayoutManager, Serializable, ScrollPaneConstants

public class ScrollPaneLayout
extends 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 Class Summary
 
Nested classes/interfaces inherited from class javax.swing.ScrollPaneLayout
ScrollPaneLayout.UIResource
 
Field Summary
protected  Component hleft
           
static String HORIZONTAL_LEFT
           
static String HORIZONTAL_RIGHT
           
protected  Component hright
           
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
protected  Component vbottom
           
static String VERTICAL_BOTTOM
           
static String VERTICAL_TOP
           
protected  Component vtop
           
 
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
 
Constructor Summary
ScrollPaneLayout()
           
 
Method Summary
 void addLayoutComponent(String s, Component c)
           
 void layoutContainer(Container parent)
           
static void main(String[] args)
           
 void removeLayoutComponent(Component c)
           
 
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
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values

HORIZONTAL_LEFT

public static final String HORIZONTAL_LEFT
See Also:
Constant Field Values

HORIZONTAL_RIGHT

public static final String HORIZONTAL_RIGHT
See Also:
Constant Field Values

VERTICAL_TOP

public static final String VERTICAL_TOP
See Also:
Constant Field Values

VERTICAL_BOTTOM

public static final String VERTICAL_BOTTOM
See Also:
Constant Field Values

hleft

protected Component hleft

hright

protected Component hright

vtop

protected Component vtop

vbottom

protected Component vbottom
Constructor Detail

ScrollPaneLayout

public ScrollPaneLayout()
Method Detail

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

layoutContainer

public void layoutContainer(Container parent)
Specified by:
layoutContainer in interface LayoutManager
Overrides:
layoutContainer in class ScrollPaneLayout

main

public static void main(String[] args)


Copyright © 2012 KnowledgePlaza. All Rights Reserved.