EchoPoint
1.0

echopoint
Class ListSection

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.EchoPointComponent
              extended byechopoint.ListSection
All Implemented Interfaces:
MouseCursorable, ReflectionSetter, java.io.Serializable, ToolTipPopUpSupport, nextapp.echo.ToolTipSupport

public class ListSection
extends EchoPointComponent

The ListSection class provides a Component that can contain other Components or objects in a list.
The list can be ordered or unordered. The default is unordered.
The class uses the ListModel interface to keep of its contents.

Author:
Brad Baker
See Also:
Serialized Form

Nested Class Summary
static class ListSection.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String BORDER_COLOR_CHANGED_PROPERTY
          Property Change Names
static java.lang.String BORDER_SIZE_CHANGED_PROPERTY
           
static java.lang.String BULLETS_CHANGED_PROPERTY
           
static int BULLETS_CIRCLE
           
static int BULLETS_DECIMAL
           
static int BULLETS_DECIMAL_LEADING_ZERO
           
static int BULLETS_DEFAULT
          default bullets
static int BULLETS_DISC
           
static java.lang.String BULLETS_IMAGE_CHANGED_PROPERTY
           
static int BULLETS_LOWER_ALPHA
           
static int BULLETS_LOWER_GREEK
           
static int BULLETS_LOWER_LATIN
           
static int BULLETS_LOWER_ROMAN
           
static int BULLETS_NONE
          Determines what type of bullet points are used
static int BULLETS_SQUARE
           
static int BULLETS_UPPER_ALPHA
           
static int BULLETS_UPPER_LATIN
           
static int BULLETS_UPPER_ROMAN
           
static SymbolicValue[] bulletSymbolics
          Helper static SymbolicValue[] - Bullet Symbolics
static nextapp.echo.Insets DEFAULT_INSETS
           
static java.lang.String INSETS_CHANGED_PROPERTY
           
static java.lang.String LIST_DATA_CHANGED_PROPERTY
           
static java.lang.String MODEL_CHANGED_PROPERTY
           
static int ORDERED
          Determines whether the list is ordered or not
static java.lang.String ORDERING_CHANGED_PROPERTY
           
static SymbolicValue[] orderingSymbolics
          Helper static SymbolicValue[] - List Ordering
static java.lang.String STYLE_BORDER_COLOR
          A style constant for the Border Color property.
static java.lang.String STYLE_BORDER_SIZE
          A style constant for the Border Size property.
static java.lang.String STYLE_BULLETS
          A style constant for the Bullets property.
static java.lang.String STYLE_BULLETS_IMAGE
          A style constant for the Bullets Image property.
static java.lang.String STYLE_INSETS
          A style constant for the Insets property.
static java.lang.String STYLE_ORDERING
          A style constant for the Ordering property.
static int UNORDERED
           
 
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, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_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
ListSection()
          Constructs a ListSection with nothing in it
ListSection(int ordering)
          Constructs a ListSection Ordering can be one of the following values.
ListSection(int ordering, java.util.List newList)
          Constructs a ListSection with the objects supplied in the provided list.
ListSection(int ordering, java.lang.Object[] arrList)
          Constructs a ListSection with the objects supplied in the provided array.
ListSection(java.lang.Object[] arrList)
          Constructs a ListSection with the list contents as arrList.
 
Method Summary
 void add(nextapp.echo.Component c)
          Adds a Component to the ListSection Note that this will only be performed if the underlying model is derived from DefaultListModel.
 void add(nextapp.echo.Component c, int index)
          Adds a Component to the ListSectionat the specified index Note that this will only be performed if the underlying model is derived from DefaultListModel.
 void add(java.lang.String s)
          Adds a String to the ListSection Note that this will only be performed if the underlying model is derived from DefaultListModel.
 void add(java.lang.String s, int index)
          Adds a String to the ListSectionat the specified index Note that this will only be performed if the underlying model is derived from DefaultListModel.
 void addListDataListener(nextapp.echo.event.ListDataListener l)
          Adds a ListDataListener to the section
 void applyStyle(nextapp.echo.Style style)
          Applies the provided style to the component.
 nextapp.echo.Color getBorderColor()
           
 int getBorderSize()
           
 int getBullets()
           
 nextapp.echo.ImageReference getBulletsImage()
           
 nextapp.echo.Insets getInsets()
           
 java.lang.Object[] getList()
           
 nextapp.echo.ListModel getModel()
           
 int getOrdering()
           
 void remove(nextapp.echo.Component c)
          Removes a Component from the ListSection Note that this will only be performed if the underlying model is derived from DefaultListModel.
 void remove(java.lang.String s)
          Removes a String from the ListSection Note that this will only be performed if the underlying model is derived from DefaultListModel.
 void removeListDataListener(nextapp.echo.event.ListDataListener l)
          Removes a ListDataListener from this 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 setBorderColor(nextapp.echo.Color newBorderColor)
          Sets the border Color of the ListSection.
 void setBorderSize(int newBorderSize)
          Sets the border size of the ListSection.
 void setBullets(int newBullets)
          Sets the bullets in use for the ListSection.
 void setBulletsImage(nextapp.echo.ImageReference newBulletsImage)
          Sets the ImageReference of the ListSection's bullets.
 void setInsets(nextapp.echo.Insets newValue)
          Sets the Insets used by the ListSection
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.INSETS_CHANGED_PROPERTY
 void setList(java.util.List newList)
          Sets the contents of the ListModel of the ListSection.
 void setList(java.lang.Object[] newList)
          Sets the contents of the ListModel of the ListSection.
 void setModel(nextapp.echo.ListModel newModel)
          Sets the ListModel of the ListSection.
 void setOrdering(int newOrdering)
          Sets the ordering in use for the ListSection.
 
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, remove, 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
 

Field Detail

STYLE_BORDER_COLOR

public static final java.lang.String STYLE_BORDER_COLOR
A style constant for the Border Color property. Values of this key must be of type nextapp.echo.Color.

See Also:
Constant Field Values

STYLE_BORDER_SIZE

public static final java.lang.String STYLE_BORDER_SIZE
A style constant for the Border Size property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_ORDERING

public static final java.lang.String STYLE_ORDERING
A style constant for the Ordering property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_BULLETS

public static final java.lang.String STYLE_BULLETS
A style constant for the Bullets property. Values of this key must be of type Integer.

See Also:
Constant Field Values

STYLE_BULLETS_IMAGE

public static final java.lang.String STYLE_BULLETS_IMAGE
A style constant for the Bullets Image property. Values of this key must be of type nextapp.echo.ImageRef.

See Also:
Constant Field Values

STYLE_INSETS

public static final java.lang.String STYLE_INSETS
A style constant for the Insets property. Values of this key must be of type nextapp.echo.Insets.

See Also:
Constant Field Values

BULLETS_NONE

public static final int BULLETS_NONE
Determines what type of bullet points are used

See Also:
Constant Field Values

BULLETS_DISC

public static final int BULLETS_DISC
See Also:
Constant Field Values

BULLETS_CIRCLE

public static final int BULLETS_CIRCLE
See Also:
Constant Field Values

BULLETS_SQUARE

public static final int BULLETS_SQUARE
See Also:
Constant Field Values

BULLETS_DECIMAL

public static final int BULLETS_DECIMAL
See Also:
Constant Field Values

BULLETS_DECIMAL_LEADING_ZERO

public static final int BULLETS_DECIMAL_LEADING_ZERO
See Also:
Constant Field Values

BULLETS_LOWER_ROMAN

public static final int BULLETS_LOWER_ROMAN
See Also:
Constant Field Values

BULLETS_UPPER_ROMAN

public static final int BULLETS_UPPER_ROMAN
See Also:
Constant Field Values

BULLETS_LOWER_ALPHA

public static final int BULLETS_LOWER_ALPHA
See Also:
Constant Field Values

BULLETS_UPPER_ALPHA

public static final int BULLETS_UPPER_ALPHA
See Also:
Constant Field Values

BULLETS_LOWER_GREEK

public static final int BULLETS_LOWER_GREEK
See Also:
Constant Field Values

BULLETS_LOWER_LATIN

public static final int BULLETS_LOWER_LATIN
See Also:
Constant Field Values

BULLETS_UPPER_LATIN

public static final int BULLETS_UPPER_LATIN
See Also:
Constant Field Values

BULLETS_DEFAULT

public static final int BULLETS_DEFAULT
default bullets

See Also:
Constant Field Values

ORDERED

public static final int ORDERED
Determines whether the list is ordered or not

See Also:
Constant Field Values

UNORDERED

public static final int UNORDERED
See Also:
Constant Field Values

bulletSymbolics

public static SymbolicValue[] bulletSymbolics
Helper static SymbolicValue[] - Bullet Symbolics


orderingSymbolics

public static SymbolicValue[] orderingSymbolics
Helper static SymbolicValue[] - List Ordering


BORDER_COLOR_CHANGED_PROPERTY

public static final java.lang.String BORDER_COLOR_CHANGED_PROPERTY
Property Change Names

See Also:
Constant Field Values

BORDER_SIZE_CHANGED_PROPERTY

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

INSETS_CHANGED_PROPERTY

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

ORDERING_CHANGED_PROPERTY

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

BULLETS_CHANGED_PROPERTY

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

BULLETS_IMAGE_CHANGED_PROPERTY

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

MODEL_CHANGED_PROPERTY

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

LIST_DATA_CHANGED_PROPERTY

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

DEFAULT_INSETS

public static final nextapp.echo.Insets DEFAULT_INSETS
Constructor Detail

ListSection

public ListSection()
Constructs a ListSection with nothing in it


ListSection

public ListSection(java.lang.Object[] arrList)
Constructs a ListSection with the list contents as arrList.


ListSection

public ListSection(int ordering)
Constructs a ListSection Ordering can be one of the following values.


ListSection

public ListSection(int ordering,
                   java.lang.Object[] arrList)
Constructs a ListSection with the objects supplied in the provided array. Ordering can be one of the following values.


ListSection

public ListSection(int ordering,
                   java.util.List newList)
Constructs a ListSection with the objects supplied in the provided list. Ordering can be one of the following values.

Method Detail

add

public void add(java.lang.String s)
Adds a String to the ListSection

Note that this will only be performed if the underlying model is derived from DefaultListModel.


add

public void add(java.lang.String s,
                int index)
Adds a String to the ListSectionat the specified index

Note that this will only be performed if the underlying model is derived from DefaultListModel.


add

public void add(nextapp.echo.Component c)
Adds a Component to the ListSection

Note that this will only be performed if the underlying model is derived from DefaultListModel.


add

public void add(nextapp.echo.Component c,
                int index)
Adds a Component to the ListSectionat the specified index

Note that this will only be performed if the underlying model is derived from DefaultListModel.


addListDataListener

public void addListDataListener(nextapp.echo.event.ListDataListener l)
Adds a ListDataListener to the section

Parameters:
l - The ListDataListener to be added.

applyStyle

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

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

getBorderColor

public nextapp.echo.Color getBorderColor()
Returns:
The Color of the ListSection's border.

getBorderSize

public int getBorderSize()
Returns:
The size of the ListSection's border.

getBullets

public int getBullets()
Returns:
The bullets in use by the ListSection Can be one of the following values.
  • ListSection.BULLETS_NONE
  • ListSection.BULLETS_DISC
  • ListSection.BULLETS_CIRCLE
  • ListSection.BULLETS_SQUARE
  • ListSection.BULLETS_DECIMAL
  • ListSection.BULLETS_DECIMAL_LEADING_ZERO
  • ListSection.BULLETS_LOWER_ROMAN
  • ListSection.BULLETS_UPPER_ROMAN
  • ListSection.BULLETS_LOWER_ALPHA
  • ListSection.BULLETS_UPPER_ALPHA
  • ListSection.BULLETS_LOWER_GREEK
  • ListSection.BULLETS_LOWER_LATIN
  • ListSection.BULLETS_UPPER_LATIN

getBulletsImage

public nextapp.echo.ImageReference getBulletsImage()
Returns:
The ImageReference of the ListSection's bullets.

getInsets

public nextapp.echo.Insets getInsets()
Returns:
the Insets (margins) of the ListSection.

getList

public java.lang.Object[] getList()
Returns:
The contents of the ListModel of the ListSection as an array.

getModel

public nextapp.echo.ListModel getModel()
Returns:
The ListModel of the ListSection.

getOrdering

public int getOrdering()
Returns:
The ordering in use by the ListSection Can be one of the following values.
  • ListSection.UNORDERED (the default)
  • ListSection.ORDERED

remove

public void remove(java.lang.String s)
Removes a String from the ListSection

Note that this will only be performed if the underlying model is derived from DefaultListModel.


remove

public void remove(nextapp.echo.Component c)
Removes a Component from the ListSection

Note that this will only be performed if the underlying model is derived from DefaultListModel.


removeListDataListener

public void removeListDataListener(nextapp.echo.event.ListDataListener l)
Removes a ListDataListener from this component.

Parameters:
l - the ListDataListener to remove

setBorderColor

public void setBorderColor(nextapp.echo.Color newBorderColor)
Sets the border Color of the ListSection.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.BORDER_COLOR_CHANGED_PROPERTY


setBorderSize

public void setBorderSize(int newBorderSize)
Sets the border size of the ListSection.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.BORDER_SIZE_CHANGED_PROPERTY


setBullets

public void setBullets(int newBullets)
Sets the bullets in use for the ListSection.
Can be one of the following values.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.BULLETS_CHANGED_PROPERTY


setBulletsImage

public void setBulletsImage(nextapp.echo.ImageReference newBulletsImage)
Sets the ImageReference of the ListSection's bullets.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.BULLETS_IMAGE_CHANGED_PROPERTY


setInsets

public void setInsets(nextapp.echo.Insets newValue)
Sets the Insets used by the ListSection
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.INSETS_CHANGED_PROPERTY


setList

public void setList(java.lang.Object[] newList)
Sets the contents of the ListModel of the ListSection.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.MODEL_CHANGED_PROPERTY


setList

public void setList(java.util.List newList)
Sets the contents of the ListModel of the ListSection.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.MODEL_CHANGED_PROPERTY


setModel

public void setModel(nextapp.echo.ListModel newModel)
Sets the ListModel of the ListSection.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.MODEL_CHANGED_PROPERTY


setOrdering

public void setOrdering(int newOrdering)
Sets the ordering in use for the ListSection.
Can be one of the following values.
This methods fires a PropertyChangeEvent with a getPropertyName() value of ListSection.ORDERING_CHANGED_PROPERTY


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;
 }
 

Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0