|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.datadosen.explorer.SmartFlowLayout
public class SmartFlowLayout
| Field Summary | |
|---|---|
static int |
CENTER
This value indicates that each row of components should be centered. |
static int |
LEADING
This value indicates that each row of components should be justified to the leading edge of the container's orientation, for example, to the left in left-to-right orientations. |
static int |
LEFT
This value indicates that each row of components should be left-justified. |
static int |
RIGHT
This value indicates that each row of components should be right-justified. |
static int |
TRAILING
This value indicates that each row of components should be justified to the trailing edge of the container's orientation, for example, to the right in left-to-right orientations. |
| Constructor Summary | |
|---|---|
SmartFlowLayout()
Constructs a new FlowLayout with a centered alignment and
a default 5-unit horizontal and vertical gap. |
|
SmartFlowLayout(int align)
Constructs a new FlowLayout with the specified alignment
and a default 5-unit horizontal and vertical gap. |
|
SmartFlowLayout(int align,
int hgap,
int vgap)
Creates a new flow layout manager with the indicated alignment and the indicated horizontal and vertical gaps. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component to the layout. |
int |
getAlignment()
Gets the alignment for this layout. |
int |
getHgap()
Gets the horizontal gap between components. |
int |
getVgap()
Gets the vertical gap between components. |
void |
layoutContainer(java.awt.Container target)
Lays out the container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container target)
Returns the minimum dimensions needed to layout the visible components contained in the specified target container. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container target)
Returns the preferred dimensions for this layout given the visible components in the specified target container. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setAlignment(int align)
Sets the alignment for this layout. |
void |
setHgap(int hgap)
Sets the horizontal gap between components. |
void |
setVgap(int vgap)
Sets the vertical gap between components. |
java.lang.String |
toString()
Returns a string representation of this FlowLayout object
and its values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int LEADING
Component.getComponentOrientation(),
ComponentOrientation,
Constant Field Valuespublic static final int TRAILING
Component.getComponentOrientation(),
ComponentOrientation,
Constant Field Values| Constructor Detail |
|---|
public SmartFlowLayout()
FlowLayout with a centered alignment and
a default 5-unit horizontal and vertical gap.
public SmartFlowLayout(int align)
FlowLayout with the specified alignment
and a default 5-unit horizontal and vertical gap. The value of the
alignment argument must be one of FlowLayout.LEFT,
FlowLayout.RIGHT, or FlowLayout.CENTER.
align - the alignment value
public SmartFlowLayout(int align,
int hgap,
int vgap)
The value of the alignment argument must be one of
FlowLayout.LEFT, FlowLayout.RIGHT, or
FlowLayout.CENTER.
align - the alignment valuehgap - the horizontal gap between componentsvgap - the vertical gap between components| Method Detail |
|---|
public int getAlignment()
FlowLayout.LEFT, FlowLayout.RIGHT,
FlowLayout.CENTER, FlowLayout.LEADING, or
FlowLayout.TRAILING.
FlowLayout.setAlignment(int)public void setAlignment(int align)
FlowLayout.LEFT
FlowLayout.RIGHT
FlowLayout.CENTER
FlowLayout.LEADING
FlowLayout.TRAILING
align - one of the alignment values shown abovegetAlignment()public int getHgap()
FlowLayout.setHgap(int)public void setHgap(int hgap)
hgap - the horizontal gap between componentsFlowLayout.getHgap()public int getVgap()
FlowLayout.setVgap(int)public void setVgap(int vgap)
vgap - the vertical gap between componentsFlowLayout.getVgap()
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagername - the name of the componentcomp - the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagercomp - the component to removeContainer.removeAll()public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
preferredLayoutSize in interface java.awt.LayoutManagertarget - the component which needs to be laid out
Container,
minimumLayoutSize(java.awt.Container),
Container.getPreferredSize()public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
minimumLayoutSize in interface java.awt.LayoutManagertarget - the component which needs to be laid out
preferredLayoutSize(java.awt.Container),
Container,
Container.doLayout()public void layoutContainer(java.awt.Container target)
FlowLayout object.
layoutContainer in interface java.awt.LayoutManagertarget - the specified component being laid outContainer,
Container.doLayout()public java.lang.String toString()
FlowLayout object
and its values.
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||