com.objectwave.viewUtility
Class ResizableGridBagLayout
java.lang.Object
|
+--java.awt.GridBagLayout
|
+--com.objectwave.viewUtility.ResizableGridBagLayout
- All Implemented Interfaces:
- java.util.EventListener, java.awt.LayoutManager, java.awt.LayoutManager2, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
- public class ResizableGridBagLayout
- extends java.awt.GridBagLayout
- implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener
This class is similar to a grid bag layout, but it automatically adds
resizing capability. It resizes components by changing their weight.
That method of resizing doesn't always provide the behavior expected,
so be sure to test with your system.
- See Also:
- Serialized Form
| Fields inherited from class java.awt.GridBagLayout |
columnWeights, columnWidths, comptable, defaultConstraints, layoutInfo, MAXGRIDSIZE, MINSIZE, PREFERREDSIZE, rowHeights, rowWeights |
|
Method Summary |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
|
void |
adjustHorizontal(int xAdjust,
com.objectwave.viewUtility.MouseTracker track)
|
void |
adjustVertical(int yAdjust,
com.objectwave.viewUtility.MouseTracker track)
|
protected void |
ArrangeGrid(java.awt.Container parent)
|
int[][] |
changeLayoutDimensions(java.awt.Container parent)
|
protected void |
dumpIt(int[][] some)
|
static void |
main(java.lang.String[] argv)
Test routine |
protected static java.awt.Button |
makebutton(java.lang.String name,
java.awt.GridBagLayout gridbag,
java.awt.GridBagConstraints c)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
setConstraints(java.awt.Component comp,
java.awt.GridBagConstraints constraints)
|
static java.awt.Panel |
testPanel()
|
| Methods inherited from class java.awt.GridBagLayout |
addLayoutComponent, adjustForGravity, AdjustForGravity, arrangeGrid, getConstraints, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutDimensions, getLayoutInfo, GetLayoutInfo, getLayoutOrigin, getLayoutWeights, getMinSize, GetMinSize, invalidateLayout, layoutContainer, location, lookupConstraints, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ResizableGridBagLayout
public ResizableGridBagLayout()
addLayoutComponent
public void addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
- Specified by:
addLayoutComponent in interface java.awt.LayoutManager2- Overrides:
addLayoutComponent in class java.awt.GridBagLayout
adjustHorizontal
public void adjustHorizontal(int xAdjust,
com.objectwave.viewUtility.MouseTracker track)
adjustVertical
public void adjustVertical(int yAdjust,
com.objectwave.viewUtility.MouseTracker track)
ArrangeGrid
protected void ArrangeGrid(java.awt.Container parent)
- Overrides:
ArrangeGrid in class java.awt.GridBagLayout
changeLayoutDimensions
public int[][] changeLayoutDimensions(java.awt.Container parent)
dumpIt
protected void dumpIt(int[][] some)
main
public static void main(java.lang.String[] argv)
- Test routine
makebutton
protected static java.awt.Button makebutton(java.lang.String name,
java.awt.GridBagLayout gridbag,
java.awt.GridBagConstraints c)
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked in interface java.awt.event.MouseListener
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited in interface java.awt.event.MouseListener
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased in interface java.awt.event.MouseListener
setConstraints
public void setConstraints(java.awt.Component comp,
java.awt.GridBagConstraints constraints)
- Overrides:
setConstraints in class java.awt.GridBagLayout
testPanel
public static java.awt.Panel testPanel()