|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javatools.swing.ResizeManager
It's a class to manage resizing in form in which the GridBagLayout
is used.
Preferably do not use it, but if you want improve it...
| Field Summary | |
int |
BOTH
Both horizontal and vertical resizing will be performed. |
int |
HORIZONTAL
Only horizontal resizing will be performed. |
int |
NONE
No resizing will be performed. |
int |
VERTICAL
Only vertical resizing will be performed. |
| Constructor Summary | |
ResizeManager()
Creates new ResizeManager |
|
| Method Summary | |
void |
addComponent(javax.swing.JComponent comp,
java.awt.Dimension dims,
int resizeOpt)
Adds a component to resize on resizing of the monitored container. |
javax.swing.JComponent |
getComponent(int numComponent)
Returns a referenced component. |
java.awt.Container |
getContainer()
Returns the monitored container. |
java.awt.Dimension |
getContainerInitialDimension()
Returns initial dimension of the monitored container. |
java.awt.Dimension |
getContainerMinDimension()
Returns minimum dimension of the monitored container. |
java.awt.Dimension |
getInitialDimension(int numComponent)
Returns initial dimension of a component. |
int |
getNumComponents()
Returns the number of managed components. |
int |
getResizeOption(int numComponent)
Returns the resize option for a component. |
void |
initSize()
Initializes the monitored object with initials sizes. |
void |
removeComponent(int numComponent)
Removes a component from the list. |
void |
resize()
Resizes the form by taking current dimension of the container. |
void |
setContainer(java.awt.Container cont,
java.awt.Dimension initialDims,
java.awt.Dimension minDims)
Sets the container whose dimension will be checked. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final int NONE
public final int HORIZONTAL
public final int VERTICAL
public final int BOTH
| Constructor Detail |
public ResizeManager()
| Method Detail |
public void setContainer(java.awt.Container cont,
java.awt.Dimension initialDims,
java.awt.Dimension minDims)
cont - The referenced container.initialDims - Initial dimension of the container.minDims - Minimum dimension of the container.public java.awt.Container getContainer()
public java.awt.Dimension getContainerInitialDimension()
public java.awt.Dimension getContainerMinDimension()
public void addComponent(javax.swing.JComponent comp,
java.awt.Dimension dims,
int resizeOpt)
comp - The component to add.dims - Initial dimension of the component.resizeOpt - Integer value representing how resizing will be performed.public int getNumComponents()
public javax.swing.JComponent getComponent(int numComponent)
throws java.lang.IndexOutOfBoundsException
numComponent - The position of the needed component.
java.lang.IndexOutOfBoundsException - If numComponent is not valid.
public void removeComponent(int numComponent)
throws java.lang.IndexOutOfBoundsException
numComponent - The position of the component.
java.lang.IndexOutOfBoundsException - If numComponent is not valid.
public java.awt.Dimension getInitialDimension(int numComponent)
throws java.lang.IndexOutOfBoundsException
numComponent - The position of the component.
java.lang.IndexOutOfBoundsException - If numComponent is not valid.
public int getResizeOption(int numComponent)
throws java.lang.IndexOutOfBoundsException
numComponent - The position of the needed component.
java.lang.IndexOutOfBoundsException - If numComponent is not valid.public void resize()
public void initSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||