EchoPoint
1.0

echopoint
Class ScrollableBox

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.EchoPointComponent
              extended byechopoint.positionable.AbstractScrollableComponent
                  extended byechopoint.ScrollableBox
All Implemented Interfaces:
Borderable, Clippable, LayoutManageable, MouseCursorable, Positionable, ReflectionSetter, Scrollable, ScrollableContainer, java.io.Serializable, ToolTipPopUpSupport, nextapp.echo.ToolTipSupport
Direct Known Subclasses:
DropDownBox, HidingSlidingPanel

public class ScrollableBox
extends AbstractScrollableComponent
implements ScrollableContainer

The ScrollableBox, which extends AbstractScrollableComponent is a generic lightweight container that implements Scrollable, Positionable and Clippable.

This differs from ScrollablePanel in that it will only be sized to the dimensions of its contents, where as ScrollablePanel will fill its parent container.

See Also:
Positionable, Scrollable, Clippable, AbstractScrollableComponent, Serialized Form

Nested Class Summary
 
Nested classes inherited from class echopoint.EchoPointComponent
EchoPointComponent.NestedStyleInfo
 
Nested classes inherited from class echopoint.positionable.ScrollableContainer
ScrollableContainer.NestedStyleInfo
 
Field Summary
static nextapp.echo.Insets DEFAULT_INSETS
          the default Insets are size 0
static int DEFAULT_POSITONABLE_POLICY
          the default positioning is POSITIONING_FLOW
static int DEFAULT_SCROLLBAR_POLICY
          the default scrollbar policy is SCROLLBARS_AUTO
 
Fields inherited from class echopoint.EchoPointComponent
STYLE_TOOL_TIP_TEXT, TOOL_TIP_TEXT_CHANGED_PROPERTY, toolTipPopUp
 
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
ScrollableBox()
          Construct a ScrollableBox with no direct positioning in affect at all.
ScrollableBox(int left, int top)
          Constructs a ScrollableBox with to right and bottom properties set to Integer.MAX_VALUE, a zIndex of 0 and with POSITIONING_ABSOLUTE, SCROLLBARS_NEVER and no clipping rectangle.
ScrollableBox(int left, int top, int right, int bottom)
          Constructs a ScrollableBox with a zIndex of 0 and with POSITIONING_ABSOLUTE, SCROLLBARS_NEVER and no clipping rectangle.
ScrollableBox(int left, int top, int right, int bottom, int zIndex)
          Constructs a ScrollableBox with POSITIONING_ABSOLUTE, SCROLLBARS_NEVER and no clipping rectangle.
ScrollableBox(int left, int top, int right, int bottom, int zIndex, int positioning)
          Constructs a ScrollableBox with SCROLLBARS_NEVER and no clipping rectangle.
ScrollableBox(int left, int top, int right, int bottom, int zIndex, int positioning, int scrollBarPolicy)
          Constructs a ScrollableBox with no clipping rectangle.
ScrollableBox(int left, int top, int right, int bottom, int zIndex, int positioning, int scrollBarPolicy, int[] clipRect)
          Constructs a ScrollableBox with all the properties
ScrollableBox(LayoutManager layoutManager)
          Constructs a ScrollableBox with a LayoutManager with no direct positioning in affect at all.
 
Method Summary
 void applyStyle(nextapp.echo.Style style)
          This will apply the borderColor, borderWidth and borderStyle properties first followed by the left, top, right and bottom borer properties.
 int getHorizontalAlignment()
          Returns the horizontal alignment of the contents of this panel.
 nextapp.echo.Insets getInsets()
          Returns the insets (margins) of the panel.
 int getVerticalAlignment()
          Returns the vertical alignment of the contents of this panel.
 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 setHorizontalAlignment(int newValue)
          Sets the horizontal alignment of the contents of this panel.
 void setInsets(nextapp.echo.Insets newValue)
          Sets the insets (margins) of the pane.
 void setVerticalAlignment(int newValue)
          Sets the vertical alignment of the contents of this panel.
 
Methods inherited from class echopoint.positionable.AbstractScrollableComponent
add, add, add, add, addImpl, clearPositioning, getBorderColor, getBorderSize, getBorderStyle, getBottom, getBottomBorderColor, getBottomBorderSize, getBottomBorderStyle, getClipRect, getHeight, getLayoutManager, getLeft, getLeftBorderColor, getLeftBorderSize, getLeftBorderStyle, getPositioning, getRight, getRightBorderColor, getRightBorderSize, getRightBorderStyle, getScreenHeight, getScreenHeight, getScreenWidth, getScreenWidth, getScrollBarPolicy, getScrollBarX, getScrollBarY, getTop, getTopBorderColor, getTopBorderSize, getTopBorderStyle, getWidth, getzIndex, isPositioned, remove, remove, setBorderColor, setBorderSize, setBorderStyle, setBottom, setBottomBorderColor, setBottomBorderSize, setBottomBorderStyle, setClipRect, setClipRect, setClipRect, setHeight, setLayoutManager, setLeft, setLeftBorderColor, setLeftBorderSize, setLeftBorderStyle, setPositioning, setRight, setRightBorderColor, setRightBorderSize, setRightBorderStyle, setScrollBarPolicy, setScrollBarX, setScrollBarY, setTop, setTopBorderColor, setTopBorderSize, setTopBorderStyle, setWidth, setzIndex
 
Methods inherited from class echopoint.EchoPointComponent
getMouseCursor, getMouseCursorURI, getToolTipPopUp, getToolTipText, set, set, set, set, set, set, set, set, set, setEnabledAllChildren, setMouseCursor, setMouseCursorURI, setToolTipText, validate
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopoint.positionable.Scrollable
getHeight, getScrollBarPolicy, getScrollBarX, getScrollBarY, getWidth, setHeight, setScrollBarPolicy, setScrollBarX, setScrollBarY, setWidth
 
Methods inherited from interface echopoint.positionable.Positionable
clearPositioning, getBottom, getLeft, getPositioning, getRight, getTop, getzIndex, isPositioned, setBottom, setLeft, setPositioning, setRight, setTop, setzIndex
 
Methods inherited from interface echopoint.positionable.Clippable
getClipRect, setClipRect, setClipRect, setClipRect
 
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, setLayoutManager
 

Field Detail

DEFAULT_INSETS

public static final nextapp.echo.Insets DEFAULT_INSETS
the default Insets are size 0


DEFAULT_POSITONABLE_POLICY

public static final int DEFAULT_POSITONABLE_POLICY
the default positioning is POSITIONING_FLOW

See Also:
Constant Field Values

DEFAULT_SCROLLBAR_POLICY

public static final int DEFAULT_SCROLLBAR_POLICY
the default scrollbar policy is SCROLLBARS_AUTO

See Also:
Constant Field Values
Constructor Detail

ScrollableBox

public ScrollableBox()
Construct a ScrollableBox with no direct positioning in affect at all.


ScrollableBox

public ScrollableBox(int left,
                     int top)
Constructs a ScrollableBox with to right and bottom properties set to Integer.MAX_VALUE, a zIndex of 0 and with POSITIONING_ABSOLUTE, SCROLLBARS_NEVER and no clipping rectangle.


ScrollableBox

public ScrollableBox(int left,
                     int top,
                     int right,
                     int bottom)
Constructs a ScrollableBox with a zIndex of 0 and with POSITIONING_ABSOLUTE, SCROLLBARS_NEVER and no clipping rectangle.


ScrollableBox

public ScrollableBox(int left,
                     int top,
                     int right,
                     int bottom,
                     int zIndex)
Constructs a ScrollableBox with POSITIONING_ABSOLUTE, SCROLLBARS_NEVER and no clipping rectangle.


ScrollableBox

public ScrollableBox(int left,
                     int top,
                     int right,
                     int bottom,
                     int zIndex,
                     int positioning)
Constructs a ScrollableBox with SCROLLBARS_NEVER and no clipping rectangle.


ScrollableBox

public ScrollableBox(int left,
                     int top,
                     int right,
                     int bottom,
                     int zIndex,
                     int positioning,
                     int scrollBarPolicy)
Constructs a ScrollableBox with no clipping rectangle.


ScrollableBox

public ScrollableBox(int left,
                     int top,
                     int right,
                     int bottom,
                     int zIndex,
                     int positioning,
                     int scrollBarPolicy,
                     int[] clipRect)
Constructs a ScrollableBox with all the properties


ScrollableBox

public ScrollableBox(LayoutManager layoutManager)
Constructs a ScrollableBox with a LayoutManager with no direct positioning in affect at all.

Method Detail

applyStyle

public void applyStyle(nextapp.echo.Style style)
Description copied from interface: Borderable
This will apply the borderColor, borderWidth and borderStyle properties first followed by the left, top, right and bottom borer properties.

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

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment of the contents of this panel.

Specified by:
getHorizontalAlignment in interface ScrollableContainer
Overrides:
getHorizontalAlignment in class AbstractScrollableComponent
Returns:
The horizontal alignment of the contents of this panel, one of the following values:
  • EchoConstants.LEFT (the default)
  • EchoConstants.CENTER
  • EchoConstants.RIGHT

getInsets

public nextapp.echo.Insets getInsets()
Returns the insets (margins) of the panel.

Specified by:
getInsets in interface ScrollableContainer
Returns:
The insets of the panel.

getVerticalAlignment

public int getVerticalAlignment()
Returns the vertical alignment of the contents of this panel.

Specified by:
getVerticalAlignment in interface ScrollableContainer
Overrides:
getVerticalAlignment in class AbstractScrollableComponent
Returns:
The vertical alignment of the contents of this panel, one of the following values:
  • EchoConstants.TOP (the default)
  • EchoConstants.CENTER
  • EchoConstants.BOTTOM

setHorizontalAlignment

public void setHorizontalAlignment(int newValue)
Sets the horizontal alignment of the contents of this panel.

Specified by:
setHorizontalAlignment in interface ScrollableContainer
Overrides:
setHorizontalAlignment in class AbstractScrollableComponent
Parameters:
newValue - The horizontal alignment of the contents of this panel, one of the following values.
  • EchoConstants.LEFT (the default)
  • EchoConstants.CENTER
  • EchoConstants.RIGHT

setInsets

public void setInsets(nextapp.echo.Insets newValue)
Sets the insets (margins) of the pane.

Specified by:
setInsets in interface ScrollableContainer
Parameters:
newValue - An insets object that specifies the size of each margin of this pane.

setVerticalAlignment

public void setVerticalAlignment(int newValue)
Sets the vertical alignment of the contents of this panel.

Specified by:
setVerticalAlignment in interface ScrollableContainer
Overrides:
setVerticalAlignment in class AbstractScrollableComponent
Parameters:
newValue - The vertical alignment of the contents of this panel, one of the following values.
  • EchoConstants.TOP (the default)
  • EchoConstants.CENTER
  • EchoConstants.BOTTOM

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 AbstractScrollableComponent
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0