com.partnersoft.gui
Class NewspaperLayout
java.lang.Object
com.partnersoft.gui.NewspaperLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2
public class NewspaperLayout
- extends java.lang.Object
- implements java.awt.LayoutManager2
A layout manager that lays its components top to bottom, then right to left
in columns, much like articles in a newspaper.
This layout is specifically designed to work well with JScrollPane; it adapts to larger
widths by adding columns and to narrower widths by removing them, eliminating the necessity for
the oft-annoying horizontal scroll bar.
Copyright 2007 Partner Software, Inc.
- Version:
- $Id$
- Author:
- Paul Reavis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NewspaperLayout
public NewspaperLayout()
NewspaperLayout
public NewspaperLayout(boolean stretchHorizontally,
boolean stretchVertically)
addLayoutComponent
public void addLayoutComponent(java.awt.Component component,
java.lang.Object constraints)
- Specified by:
addLayoutComponent in interface java.awt.LayoutManager2
getLayoutAlignmentX
public float getLayoutAlignmentX(java.awt.Container container)
- Specified by:
getLayoutAlignmentX in interface java.awt.LayoutManager2
getLayoutAlignmentY
public float getLayoutAlignmentY(java.awt.Container container)
- Specified by:
getLayoutAlignmentY in interface java.awt.LayoutManager2
invalidateLayout
public void invalidateLayout(java.awt.Container container)
- Specified by:
invalidateLayout in interface java.awt.LayoutManager2
maximumLayoutSize
public java.awt.Dimension maximumLayoutSize(java.awt.Container container)
- Specified by:
maximumLayoutSize in interface java.awt.LayoutManager2
addLayoutComponent
public void addLayoutComponent(java.lang.String constraints,
java.awt.Component component)
- Specified by:
addLayoutComponent in interface java.awt.LayoutManager
layoutContainer
public void layoutContainer(java.awt.Container container)
- Specified by:
layoutContainer in interface java.awt.LayoutManager
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container container)
- Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container container)
- Specified by:
preferredLayoutSize in interface java.awt.LayoutManager
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component component)
- Specified by:
removeLayoutComponent in interface java.awt.LayoutManager
getStretchVertically
public boolean getStretchVertically()
setStretchVertically
public void setStretchVertically(boolean tizit)
getStretchHorizontally
public boolean getStretchHorizontally()
setStretchHorizontally
public void setStretchHorizontally(boolean tizit)
main
public static void main(java.lang.String[] argv)