|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.helper.XLayoutHelper
public class XLayoutHelper
A helper class for working with layout managers. This class provides mappings between the names of layout styles and constraints and the corresponding Java constants.
Copyright (c) Xoetrope Ltd., 2002-2003
License: see license.txt
$Revision: 2.21 $
| Field Summary | |
|---|---|
static int |
BOTTOM
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
TOP
|
| Constructor Summary | |
|---|---|
XLayoutHelper()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
addLayout(java.lang.Object cont,
int type)
Sets a LayoutManager for the panel |
java.lang.Object |
addLayout(java.lang.Object cont,
int type,
java.util.Hashtable attribs)
Sets a LayoutManager for the panel |
int |
getAlignment(java.lang.String name)
Gets a constraint object corresponding to a constraint name |
protected java.lang.Integer |
getBoxAlignment(java.lang.String value)
Convert an attribute value to the equivalent BoxLayout constant, defaults to x-axis if not found. |
java.lang.Object |
getConstraint(java.lang.String name)
Gets a constraint object corresponding to a constraint name |
protected int |
getIntAttrib(java.util.Hashtable attribs,
java.lang.String attrib)
Get an attribute as an int value |
java.lang.String |
getLayoutClass(java.lang.Object layout)
Get the layout type |
int |
getLayoutType(java.lang.String ls)
Get the layout type enumerated in XPage |
boolean |
getUsesConstraints(java.lang.Object layout)
Does the layout manager use constraints for its children? |
boolean |
getUsesDimensions(java.lang.Object layout)
Does this layout manager used the absoulte dimensions? |
void |
setAttrib(java.lang.Object cont,
java.lang.Object lm,
java.lang.String attrib,
java.lang.Object value)
Set the attributes for a layout manager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
| Constructor Detail |
|---|
public XLayoutHelper()
| Method Detail |
|---|
public java.lang.Object addLayout(java.lang.Object cont,
int type)
addLayout in interface LayoutHelpercont - the container whose layout manager is being set or null to set the parent panel's layout managertype - the layout manager as defined in the XLayoutHelper class
public java.lang.Object addLayout(java.lang.Object cont,
int type,
java.util.Hashtable attribs)
addLayout in interface LayoutHelpercont - the container whose layout manager is being set or null to set the parent panel's layout managertype - the layout manager as defined in the XLayoutHelper classpublic int getAlignment(java.lang.String name)
getAlignment in interface LayoutHelpername - the constraint name
public int getLayoutType(java.lang.String ls)
getLayoutType in interface LayoutHelperls - the layout style
public java.lang.String getLayoutClass(java.lang.Object layout)
getLayoutClass in interface LayoutHelperlayout - the layout manager instance
public boolean getUsesConstraints(java.lang.Object layout)
getUsesConstraints in interface LayoutHelperlayout - the layout manager instance
public boolean getUsesDimensions(java.lang.Object layout)
getUsesDimensions in interface LayoutHelperlayout - the layout manager instance
public java.lang.Object getConstraint(java.lang.String name)
getConstraint in interface LayoutHelpername - the quoted constraint name e.g. "WEST"
protected int getIntAttrib(java.util.Hashtable attribs,
java.lang.String attrib)
attribs - the attribs hashtableattrib - the attribute key
public void setAttrib(java.lang.Object cont,
java.lang.Object lm,
java.lang.String attrib,
java.lang.Object value)
setAttrib in interface LayoutHelpercont - the containerlm - the layout managerattrib - the attribute namevalue - the value of the attributeprotected java.lang.Integer getBoxAlignment(java.lang.String value)
value - the attribute value specifying the alignment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||