echoxul.component
Class XulBox

java.lang.Object
  extended bynextapp.echo.Component
      extended byechoxul.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:

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

Field Summary
 
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
 
Constructor Summary
XulBox()
           
XulBox(XulBoxConstraints constraintsThis)
           
 
Method Summary
 void add(nextapp.echo.Component arg0)
           
 void add(nextapp.echo.Component arg0, int arg1)
           
 void add(nextapp.echo.Component c, int index, XulBoxConstraints constraints)
           
 void add(nextapp.echo.Component c, XulBoxConstraints constraints)
           
 int getBoxAlign()
           
 XulBoxConstraints getBoxConstraints()
          Return the box constraints.
 int getBoxDirection()
           
 boolean getBoxExpands()
           
 int getBoxOrient()
           
 int getBoxPack()
           
 XulBoxConstraints[] getConstraints()
           
 void remove(nextapp.echo.Component arg0)
           
 void remove(int arg0)
           
 void removeAll()
           
 void setBoxAlign(int boxAlign)
           
 void setBoxDirection(int boxDirection)
           
 void setBoxExpands(boolean boxExpands)
           
 void setBoxOrient(int boxOrient)
           
 void setBoxPack(int boxPack)
           
 
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
 

Constructor Detail

XulBox

public XulBox()

XulBox

public XulBox(XulBoxConstraints constraintsThis)
Parameters:
constraintsThis -
Method Detail

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.