echoxul.component
Class XulBox
java.lang.Object
nextapp.echo.Component
echoxul.component.XulBox
- All Implemented Interfaces:
- java.io.Serializable, XulBoxConstants, XulBoxConstrainable
- public class XulBox
- extends nextapp.echo.Component
- implements XulBoxConstants, XulBoxConstrainable
The XulBox is a container that implements the functionality
of the XUL box constructs. It supports the component level properties
specified by the box model:
- BoxAlign - Defined by XulBoxConstants.BOXALIGN_* constants (defaults
to BOXALIGN_STRETCH)
- BoxOrient - Determines the layout of children. Defined by
XulBoxConstants.BOXORIENT_* constants. Default to BOXORIENT_INLINE_AXIS.
- BoxPack - Determines the use of remaining whitespace once all
children have been laid out to their maximum size. Defined by
XulBoxConstants.BOXPACK_* constants. Defaults to BOXPACK_START.
- BoxDirection - Determines the direction of the children in the box.
Defined by XulBoxConstants.BOXDIRECTION_* constants. Defaults to
BOXDIRECTION_NORMAL.
The XUL box model supports additional constraints on child components,
which are not supported by Echo. In order to allow these constraints
to be specified on child components, an XulBoxConstraints instance must
be associated with the child. This can be done either at the time
of child addition (through the overloaded add(Component, XulBoxConstraints)
method) or at any later time (through a call to setChildConstraints).
The concept of xul child constraints does not really match up
with the echopoint LayoutManageable idea (there can be multiple
duplicate constraints in the container). Therefore, this implementation
uses an internal mechanism to map constraints to contained components.
- Author:
- Terry Laurenzo
- See Also:
- Serialized Form
Fields inherited from class nextapp.echo.Component |
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY |
Fields inherited from interface echoxul.component.XulBoxConstants |
BOXALIGN_BASELINE, BOXALIGN_CENTER, BOXALIGN_END, BOXALIGN_START, BOXALIGN_STRETCH, BOXDIRECTION_NORMAL, BOXDIRECTION_REVERSE, BOXORIENT_BLOCK_AXIS, BOXORIENT_HORIZONTAL, BOXORIENT_INLINE_AXIS, BOXORIENT_VERTICAL, BOXPACK_CENTER, BOXPACK_END, BOXPACK_JUSTIFY, BOXPACK_START |
Methods inherited from class nextapp.echo.Component |
addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XulBox
public XulBox()
XulBox
public XulBox(XulBoxConstraints constraintsThis)
- Parameters:
constraintsThis
-
getConstraints
public XulBoxConstraints[] getConstraints()
- Returns:
- An array of constraints that mirrors the child
component array
add
public void add(nextapp.echo.Component arg0,
int arg1)
- See Also:
Component.add(nextapp.echo.Component, int)
add
public void add(nextapp.echo.Component arg0)
- See Also:
Component.add(nextapp.echo.Component)
add
public void add(nextapp.echo.Component c,
int index,
XulBoxConstraints constraints)
add
public void add(nextapp.echo.Component c,
XulBoxConstraints constraints)
remove
public void remove(nextapp.echo.Component arg0)
- See Also:
Component.remove(nextapp.echo.Component)
remove
public void remove(int arg0)
- See Also:
Component.remove(int)
removeAll
public void removeAll()
- See Also:
Component.removeAll()
getBoxConstraints
public XulBoxConstraints getBoxConstraints()
- Description copied from interface:
XulBoxConstrainable
- Return the box constraints. A value of null is equivilent to
having all default constraints.
- Specified by:
getBoxConstraints
in interface XulBoxConstrainable
- See Also:
XulBoxConstrainable.getBoxConstraints()
getBoxAlign
public int getBoxAlign()
- Returns:
- Returns the boxAlign.
setBoxAlign
public void setBoxAlign(int boxAlign)
- Parameters:
boxAlign
- The boxAlign to set.
getBoxDirection
public int getBoxDirection()
- Returns:
- Returns the boxDirection.
setBoxDirection
public void setBoxDirection(int boxDirection)
- Parameters:
boxDirection
- The boxDirection to set.
getBoxOrient
public int getBoxOrient()
- Returns:
- Returns the boxOrient.
setBoxOrient
public void setBoxOrient(int boxOrient)
- Parameters:
boxOrient
- The boxOrient to set.
getBoxPack
public int getBoxPack()
- Returns:
- Returns the boxPack.
setBoxPack
public void setBoxPack(int boxPack)
- Parameters:
boxPack
- The boxPack to set.
getBoxExpands
public boolean getBoxExpands()
- Returns:
- Returns the boxExpands.
setBoxExpands
public void setBoxExpands(boolean boxExpands)
- Parameters:
boxExpands
- The boxExpands to set.
Copyright © 2004 Terry Laurenzo. All Rights Reserved.