EchoPoint
1.0

echopoint
Class HorizontalPanel

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Panel
          extended byechopoint.Panel
              extended byechopoint.ScrollablePanel
                  extended byechopoint.HorizontalPanel
All Implemented Interfaces:
Borderable, Clippable, LayoutManageable, MouseCursorable, Positionable, ReflectionSetter, Scrollable, ScrollableContainer, java.io.Serializable

public class HorizontalPanel
extends ScrollablePanel

The HorizontalPanel class provides a Panel that will layout its contents horizontally in a series of adjoining cells.

 |=======|=======|=======|=======|=======|
|-------|-------|-------|-------|-------|
|-------|-------|-------|-------|-------| extends -->
|-------|-------|-------|-------|-------|
|=======|=======|=======|=======|=======|

The vertical and horizontal alignment properties of Panel relate to these horizontal cells. The component will only be sized as large as its contents.

This component uses a HorizontalLayoutManager layout manager to provide the left to right placing of components.

For more complex layout components see :

See Also:
Grid, Table, GridPanel, HorizontalLayoutManager, GridLayoutManager, Serialized Form

Nested Class Summary
static class HorizontalPanel.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String CELL_SPACING_CHANGED_PROPERTY
           
static java.lang.String STYLE_CELL_SPACING
           
 
Fields inherited from class echopoint.ScrollablePanel
DEFAULT_POSITONABLE_POLICY, DEFAULT_SCROLLBAR_POLICY
 
Fields inherited from class nextapp.echo.Panel
DEFAULT_INSETS, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_VERTICAL_ALIGNMENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY
 
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 echopoint.positionable.ScrollableContainer
HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_VERTICAL_ALIGNMENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.Scrollable
HEIGHT_CHANGED_PROPERTY, SCROLL_BAR_X_CHANGED_PROPERTY, SCROLL_BAR_Y_CHANGED_PROPERTY, SCROLLBAR_POLICY_CHANGED_PROPERTY, SCROLLBARS_ALWAYS, SCROLLBARS_AUTO, SCROLLBARS_CLIPHIDE, SCROLLBARS_NEVER, STYLE_HEIGHT, STYLE_SCROLL_BAR_POLICY, STYLE_WIDTH, UNDEFINED, undefinedSymbolic, WIDTH_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.Positionable
POSITION_CHANGED_PROPERTY, POSITIONING_ABSOLUTE, POSITIONING_FLOW, POSITIONING_RELATIVE, positioningSymbolics, STYLE_BOTTOM, STYLE_LEFT, STYLE_POSITIONING, STYLE_RIGHT, STYLE_TOP, STYLE_ZINDEX, UNDEFINED, undefinedSymbolic
 
Fields inherited from interface echopoint.positionable.Clippable
CLIP_RECT_CHANGED_PROPERTY, STYLE_CLIP_RECT
 
Fields inherited from interface echopoint.positionable.Borderable
BORDER_DASHED, BORDER_DOTTED, BORDER_DOUBLE, BORDER_GROOVE, BORDER_INSET, BORDER_NONE, BORDER_OUTSET, BORDER_RIDGE, BORDER_SOLID, borderStyleSymbolics, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_BOTTOM_BORDER_COLOR, STYLE_BOTTOM_BORDER_SIZE, STYLE_BOTTOM_BORDER_STYLE, STYLE_LEFT_BORDER_COLOR, STYLE_LEFT_BORDER_SIZE, STYLE_LEFT_BORDER_STYLE, STYLE_RIGHT_BORDER_COLOR, STYLE_RIGHT_BORDER_SIZE, STYLE_RIGHT_BORDER_STYLE, STYLE_TOP_BORDER_COLOR, STYLE_TOP_BORDER_SIZE, STYLE_TOP_BORDER_STYLE
 
Fields inherited from interface echopoint.layout.LayoutManageable
LAYOUT_MANAGED_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Constructor Summary
HorizontalPanel()
          Constructs a HorizontalPanel, which will of course have an underlying HorizontalLayoutManager.
 
Method Summary
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
 int getCellSpacing()
          Returns the cell spacing
 int getHeight()
          Returns the height of the component
 int getHorizontalAlignment()
          Returns the horizontal alignment of the contents of this ScrollableContainer.
 nextapp.echo.Insets getInsets()
          Returns the insets of the ScrollableContainer.
 int getScrollBarPolicy()
          Returns the ScrollBarPolicy in place This can be one of : SCOLLBARS_NONE SCOLLBARS_ALWAYS SCOLLBARS_AUTO
 int getScrollBarX()
          Returns the position of the horizontal scroll bar, in pixels offset from the left of the component.
 int getScrollBarY()
          Returns the position of the vertical scroll bar, in pixels offset from the top the component.
 int getVerticalAlignment()
          Returns the vertical alignment of the contents of this ScrollableContainer.
 int getWidth()
          Returns the width of the component
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setCellSpacing(int newValue)
          Sets the cell spacing
 void setHeight(int newValue)
          Sets the height of the component
 void setHorizontalAlignment(int newValue)
          Sets the horizontal alignment of the contents of this ScrollableContainer.
 void setInsets(nextapp.echo.Insets newValue)
          Sets the insets (margins) of the pane.
 void setLayoutManager(LayoutManager newLayoutManager)
          Sets a new LayoutManager into the LayoutManageable container.
 void setScrollBarPolicy(int newScrollBarPolicy)
          This sets the scroll bar policy to use.
 void setScrollBarX(int newValue)
          Sets the position of the horizontal scroll bar, in pixels offset from the left of the component.
 void setScrollBarY(int newValue)
          Sets the position of the vertical scroll bar, in pixels offset from the top of the component.
 void setVerticalAlignment(int newValue)
          Sets the vertical alignment of the contents of this ScrollableContainer.
 void setWidth(int newValue)
          Sets the width of the component
 
Methods inherited from class echopoint.ScrollablePanel
clearPositioning, getBottom, getClipRect, getLeft, getPositioning, getRight, getScreenHeight, getScreenWidth, getTop, getzIndex, isPositioned, setBottom, setClipRect, setClipRect, setClipRect, setLeft, setPositioning, setRight, setTop, setzIndex
 
Methods inherited from class echopoint.Panel
add, add, add, add, addImpl, getBorderColor, getBorderSize, getBorderStyle, getBottomBorderColor, getBottomBorderSize, getBottomBorderStyle, getLayoutManager, getLeftBorderColor, getLeftBorderSize, getLeftBorderStyle, getMouseCursor, getMouseCursorURI, getRightBorderColor, getRightBorderSize, getRightBorderStyle, getTopBorderColor, getTopBorderSize, getTopBorderStyle, remove, remove, setBorderColor, setBorderSize, setBorderStyle, setBottomBorderColor, setBottomBorderSize, setBottomBorderStyle, setLeftBorderColor, setLeftBorderSize, setLeftBorderStyle, setMouseCursor, setMouseCursorURI, setRightBorderColor, setRightBorderSize, setRightBorderStyle, setTopBorderColor, setTopBorderSize, setTopBorderStyle
 
Methods inherited from class nextapp.echo.Component
addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, removeAll, 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
 
Methods inherited from interface echopoint.positionable.Borderable
getBorderColor, getBorderSize, getBorderStyle, getBottomBorderColor, getBottomBorderSize, getBottomBorderStyle, getLeftBorderColor, getLeftBorderSize, getLeftBorderStyle, getRightBorderColor, getRightBorderSize, getRightBorderStyle, getTopBorderColor, getTopBorderSize, getTopBorderStyle, setBorderColor, setBorderSize, setBorderStyle, setBottomBorderColor, setBottomBorderSize, setBottomBorderStyle, setLeftBorderColor, setLeftBorderSize, setLeftBorderStyle, setRightBorderColor, setRightBorderSize, setRightBorderStyle, setTopBorderColor, setTopBorderSize, setTopBorderStyle
 
Methods inherited from interface echopoint.layout.LayoutManageable
add, add, add, add, getLayoutManager, remove, remove
 

Field Detail

CELL_SPACING_CHANGED_PROPERTY

public static final java.lang.String CELL_SPACING_CHANGED_PROPERTY
See Also:
Constant Field Values

STYLE_CELL_SPACING

public static final java.lang.String STYLE_CELL_SPACING
See Also:
Constant Field Values
Constructor Detail

HorizontalPanel

public HorizontalPanel()
Constructs a HorizontalPanel, which will of course have an underlying HorizontalLayoutManager.

Method Detail

applyStyle

public void applyStyle(nextapp.echo.Style style)
Description copied from class: ScrollablePanel
Applies the provided style to the component. The base nextapp.echo.Component style names can be used as well.

Specified by:
applyStyle in interface Scrollable
Overrides:
applyStyle in class ScrollablePanel
See Also:
Component.applyStyle(nextapp.echo.Style)

getCellSpacing

public int getCellSpacing()
Returns the cell spacing

Returns:
the cell spacing

getHeight

public int getHeight()
Returns the height of the component

Specified by:
getHeight in interface Scrollable
Overrides:
getHeight in class ScrollablePanel

getHorizontalAlignment

public int getHorizontalAlignment()
Description copied from interface: ScrollableContainer
Returns the horizontal alignment of the contents of this ScrollableContainer.

See Also:
Panel.getHorizontalAlignment()

getInsets

public nextapp.echo.Insets getInsets()
Description copied from interface: ScrollableContainer
Returns the insets of the ScrollableContainer.

See Also:
Panel.getInsets()

getScrollBarPolicy

public int getScrollBarPolicy()
Returns the ScrollBarPolicy in place This can be one of :

Specified by:
getScrollBarPolicy in interface Scrollable
Overrides:
getScrollBarPolicy in class ScrollablePanel

getScrollBarX

public int getScrollBarX()
Returns the position of the horizontal scroll bar, in pixels offset from the left of the component.

Specified by:
getScrollBarX in interface Scrollable
Overrides:
getScrollBarX in class ScrollablePanel
Returns:
The position of the horizontal scroll bar.

getScrollBarY

public int getScrollBarY()
Returns the position of the vertical scroll bar, in pixels offset from the top the component.

Specified by:
getScrollBarY in interface Scrollable
Overrides:
getScrollBarY in class ScrollablePanel
Returns:
The position of the vertical scroll bar.

getVerticalAlignment

public int getVerticalAlignment()
Description copied from interface: ScrollableContainer
Returns the vertical alignment of the contents of this ScrollableContainer.

See Also:
Panel.getVerticalAlignment()

getWidth

public int getWidth()
Returns the width of the component

Specified by:
getWidth in interface Scrollable
Overrides:
getWidth in class ScrollablePanel

setCellSpacing

public void setCellSpacing(int newValue)
Sets the cell spacing

Parameters:
newValue -

setHeight

public void setHeight(int newValue)
Sets the height of the component

Specified by:
setHeight in interface Scrollable
Overrides:
setHeight in class ScrollablePanel

setHorizontalAlignment

public void setHorizontalAlignment(int newValue)
Description copied from interface: ScrollableContainer
Sets the horizontal alignment of the contents of this ScrollableContainer.

See Also:
Panel.setHorizontalAlignment(int)

setInsets

public void setInsets(nextapp.echo.Insets newValue)
Description copied from interface: ScrollableContainer
Sets the insets (margins) of the pane.

See Also:
Panel.setInsets(nextapp.echo.Insets)

setLayoutManager

public void setLayoutManager(LayoutManager newLayoutManager)
Description copied from interface: LayoutManageable
Sets a new LayoutManager into the LayoutManageable container.

Specified by:
setLayoutManager in interface LayoutManageable
Overrides:
setLayoutManager in class Panel
See Also:
LayoutManageable.setLayoutManager(echopoint.layout.LayoutManager)

setScrollBarPolicy

public void setScrollBarPolicy(int newScrollBarPolicy)
This sets the scroll bar policy to use. This can be one of :

Specified by:
setScrollBarPolicy in interface Scrollable
Overrides:
setScrollBarPolicy in class ScrollablePanel

setScrollBarX

public void setScrollBarX(int newValue)
Sets the position of the horizontal scroll bar, in pixels offset from the left of the component.

Specified by:
setScrollBarX in interface Scrollable
Overrides:
setScrollBarX in class ScrollablePanel
Parameters:
newValue - The new position of the horizontal scroll bar, in pixels.

setScrollBarY

public void setScrollBarY(int newValue)
Sets the position of the vertical scroll bar, in pixels offset from the top of the component.

Specified by:
setScrollBarY in interface Scrollable
Overrides:
setScrollBarY in class ScrollablePanel
Parameters:
newValue - The new position of the vertical scroll bar, in pixels.

setVerticalAlignment

public void setVerticalAlignment(int newValue)
Description copied from interface: ScrollableContainer
Sets the vertical alignment of the contents of this ScrollableContainer.

See Also:
Panel.setVerticalAlignment(int)

setWidth

public void setWidth(int newValue)
Sets the width of the component

Specified by:
setWidth in interface Scrollable
Overrides:
setWidth in class ScrollablePanel

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Specified by:
set in interface ReflectionSetter
Overrides:
set in class ScrollablePanel
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0