java.awt
Class FlowLayout
- LayoutManager, Serializable
This class implements a flow-based layout. Components are laid
out in order from left to right. When a component cannot be placed
without horizontal clipping, a new row is started. This class
supports horizontal and vertical gaps. These are used for spacing
between components.
static int | CENTER - Constant that specifies center alignment.
|
static int | LEADING - Constant that specifies alignment to leading edge of container's
orientation.
|
static int | LEFT - Constant that specifies left alignment.
|
static int | RIGHT - Constant that specifies right alignment.
|
static int | TRAILING - Constant that specifies alignment to trailing edge of container's
orientation.
|
FlowLayout() - Initializes a new instance of
FlowLayout with a center
justification and a default horizontal and vertical gap of 5.
|
FlowLayout(int align) - Initializes a new instance of
FlowLayout with the specified
justification and a default horizontal and vertical gap of 5.
|
FlowLayout(int align, int hgap, int vgap) - Initializes a new instance of
FlowLayout with the specified
justification and gap values
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
CENTER
public static final int CENTER
Constant that specifies center alignment.
LEADING
public static final int LEADING
Constant that specifies alignment to leading edge of container's
orientation.
LEFT
public static final int LEFT
Constant that specifies left alignment.
RIGHT
public static final int RIGHT
Constant that specifies right alignment.
TRAILING
public static final int TRAILING
Constant that specifies alignment to trailing edge of container's
orientation.
FlowLayout
public FlowLayout()
Initializes a new instance of FlowLayout
with a center
justification and a default horizontal and vertical gap of 5.
FlowLayout
public FlowLayout(int align)
Initializes a new instance of FlowLayout
with the specified
justification and a default horizontal and vertical gap of 5.
align
- The justification setting, which should be one of the
contants in this class.
FlowLayout
public FlowLayout(int align,
int hgap,
int vgap)
Initializes a new instance of FlowLayout
with the specified
justification and gap values
align
- Alignmenthgap
- The horizontal gapvgap
- The vertical gap
getAlignment
public int getAlignment()
Returns the current justification value for this object.
- The current justification value for this object.
getHgap
public int getHgap()
Returns the horizontal gap between components.
- The horizontal gap between components.
getVgap
public int getVgap()
Returns the vertical gap between lines of components.
- The vertical gap between lines of components.
setAlignment
public void setAlignment(int align)
Sets the justification value for this object to the specified value.
align
- The new justification value for this object, which must
be one of the constants in this class.
setHgap
public void setHgap(int hgap)
Sets the horizontal gap between lines of components to the specified value.
No Exception is thrown if hgap <320.
hgap
- The new horizontal gap between components.
setVgap
public void setVgap(int vgap)
Sets the vertical gap between lines of components to the specified value.
No Exception is thrown if vgap <320.
vgap
- The new vertical gap.
toString
public String toString()
Return String description of this object.
- toString in interface Object
- A string representation of this object.
FlowLayout.java -- Grid-based layout engine
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.