EchoPoint API - 3.0.0b5
App Webcontainer

echopoint
Class Strut

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.internal.AbstractContainer
          extended by echopoint.Strut
All Implemented Interfaces:
Serializable, RenderIdSupport

public class Strut
extends AbstractContainer

Strut is a very simple component that can have a fixed width and height. It is most commonly used to create precise spaces between components laid out in a container component such as Column.

The following shows how to add a 50 px space between two labels in a Row container.

   import echopoint.Strut;
   import nextapp.echo.app.Label;
   import nextapp.echo.app.Row;

     ...
     final Row row = new Row();
     row.add( new Label( "Label 1" ) );
     row.add( new Strut( 50, 10 ) );
     row.add( new Label( "Label 2" ) );
 

Version:
$Id: Strut.java 42 2008-07-21 12:42:21Z sptrakesh $
Author:
Brad Baker

Modified by Rakesh 2008-07-20

See Also:
Serialized Form

Field Summary
 
Fields inherited from class echopoint.internal.AbstractContainer
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
Strut()
          Constructs a Strut that is 10px wide by 10px high.
Strut(Extent width, Extent height)
          Constructs a Strut.
Strut(int width, int height)
          Constructs a Strut that is width pixels wide by height pixels high.
 
Method Summary
 boolean isValidChild(Component child)
          Strut is NOT allowed to have any children.
 
Methods inherited from class echopoint.internal.AbstractContainer
addActionListener, fireActionPerformed, getAlignment, getBackgroundImage, getBorder, getHeight, getInsets, getWidth, hasActionListeners, removeActionListener, setAlignment, setBackgroundImage, setBorder, setHeight, setInsets, setWidth
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strut

public Strut()
Constructs a Strut that is 10px wide by 10px high.


Strut

public Strut(int width,
             int height)
Constructs a Strut that is width pixels wide by height pixels high.

Parameters:
width - The width in pixels for this component.
height - The height in pixels for this component.

Strut

public Strut(Extent width,
             Extent height)
Constructs a Strut. This is the designated constructor.

Parameters:
width - The width of the Strut
height - The height of the Strut
Method Detail

isValidChild

public boolean isValidChild(Component child)
Strut is NOT allowed to have any children.

Overrides:
isValidChild in class Component
See Also:
Component.isValidChild(nextapp.echo.app.Component)

EchoPoint API - 3.0.0b5
App Webcontainer