|
|||||||||
| Home >> All >> com >> eireneh >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.eireneh.swing
Class AbstractLayout

java.lang.Objectcom.eireneh.swing.AbstractLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2, java.io.Serializable
- Direct Known Subclasses:
- DeckLayout, FieldLayout
- public abstract class AbstractLayout
- extends java.lang.Object
- implements java.awt.LayoutManager2, java.io.Serializable
- extends java.lang.Object
AbstractLayout - support for DeckLayout. From a JDJ article
|
Distribution Licence: Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program 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. The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below. The copyright to this program is held by it's authors. |
| Field Summary | |
protected int |
hgap
horizontal gap |
protected int |
vgap
vertical gap |
| Constructor Summary | |
AbstractLayout()
Defaults the horizontal and vertical gaps to 0 |
|
AbstractLayout(int hgap,
int vgap)
Constructor that specifies the horizontal and vertical gaps |
|
| Method Summary | |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
Add the specified component from the layout. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component with the specified name to the layout. |
int |
getHgap()
Get the horizontal gap between components. |
float |
getLayoutAlignmentX(java.awt.Container parent)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container parent)
Returns the alignment along the y axis. |
int |
getVgap()
Get the vertical gap between components. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum dimensions for this layout given the component in the specified target container. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setHgap(int gap)
Set the horizontal gap between components. |
void |
setVgap(int gap)
Set the vertical gap between components. |
java.lang.String |
toString()
Return a string representation of the layout manager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.LayoutManager |
layoutContainer, minimumLayoutSize, preferredLayoutSize |
| Field Detail |
hgap
protected int hgap
- horizontal gap
vgap
protected int vgap
- vertical gap
| Constructor Detail |
AbstractLayout
public AbstractLayout()
- Defaults the horizontal and vertical gaps to 0
AbstractLayout
public AbstractLayout(int hgap,
int vgap)
- Constructor that specifies the horizontal and vertical gaps
| Method Detail |
getHgap
public int getHgap()
- Get the horizontal gap between components.
getVgap
public int getVgap()
- Get the vertical gap between components.
setHgap
public void setHgap(int gap)
- Set the horizontal gap between components.
setVgap
public void setVgap(int gap)
- Set the vertical gap between components.
maximumLayoutSize
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
- Returns the maximum dimensions for this layout given
the component in the specified target container.
- Specified by:
maximumLayoutSizein interfacejava.awt.LayoutManager2
getLayoutAlignmentX
public float getLayoutAlignmentX(java.awt.Container parent)
- Returns the alignment along the x axis. This specifies how
the component would like to be aligned relative to other
components. The value should be a number between 0 and 1
where 0 represents alignment along the origin, 1 is aligned
the furthest away from the origin, 0.5 is centered, etc.
- Specified by:
getLayoutAlignmentXin interfacejava.awt.LayoutManager2
getLayoutAlignmentY
public float getLayoutAlignmentY(java.awt.Container parent)
- Returns the alignment along the y axis. This specifies how
the component would like to be aligned relative to other
components. The value should be a number between 0 and 1
where 0 represents alignment along the origin, 1 is aligned
the furthest away from the origin, 0.5 is centered, etc.
- Specified by:
getLayoutAlignmentYin interfacejava.awt.LayoutManager2
invalidateLayout
public void invalidateLayout(java.awt.Container target)
- Invalidates the layout, indicating that if the layout
manager has cached information it should be discarded.
- Specified by:
invalidateLayoutin interfacejava.awt.LayoutManager2
addLayoutComponent
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
- Adds the specified component with the specified name
to the layout. By default, we call the more recent
addLayoutComponent method with an object constraint
argument. The name is passed through directly.
- Specified by:
addLayoutComponentin interfacejava.awt.LayoutManager
addLayoutComponent
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
- Add the specified component from the layout.
By default, we let the Container handle this directly.
- Specified by:
addLayoutComponentin interfacejava.awt.LayoutManager2
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)
- Removes the specified component from the layout.
By default, we let the Container handle this directly.
- Specified by:
removeLayoutComponentin interfacejava.awt.LayoutManager
toString
public java.lang.String toString()
- Return a string representation of the layout manager
|
|||||||||
| Home >> All >> com >> eireneh >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.eireneh.swing.AbstractLayout