|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.ui.layout.FractionalLayout
A layout manager for a container that lays out components in a VisualWorks kinda way. For each component, you can specify a constraint, which must be a kind of OriginConstraint. Please see the constraint classes for more information.
OriginConstraint
,
AlignmentOriginConstraint
,
FrameConstraint
Field Summary | |
protected Hashtable |
components
The keys are components, which are pointing to contraints. |
Constructor Summary | |
FractionalLayout()
Create an instanace of a FractionalLayout |
Method Summary | |
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component with the specified name to the layout. |
OriginConstraint |
getConstraint(Component comp)
Return the constraint that is associated with the given component. |
void |
layoutContainer(Container parent)
Lays out the container in the specified panel. |
Dimension |
minimumLayoutSize(Container parent)
Returns the minimum dimensions for this layout given the components in the specified panel. |
Dimension |
preferredLayoutSize(Container parent)
Returns the preferred dimensions for this layout given the components in the specified panel. |
void |
removeAll()
This method was created by a SmartGuide. |
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout. |
void |
setConstraint(Component comp,
OriginConstraint constraint)
Add a component and a corresponding constraint to the layout. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Hashtable components
Constructor Detail |
public FractionalLayout()
Method Detail |
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
name
- the name of the component (ignored)comp
- the component to be addedpublic OriginConstraint getConstraint(Component comp)
comp
- the component to return the constraint for
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
parent
- the specified component being laid outContainer
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
parent
- the component which needs to be laid out
preferredLayoutSize(java.awt.Container)
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
parent
- the component which needs to be laid out
minimumLayoutSize(java.awt.Container)
public void removeAll()
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- the component to be removedpublic void setConstraint(Component comp, OriginConstraint constraint)
comp
- the component to addconstraint
- an instance of a constraint. Note that I
do not clone the instance, so be careful.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |