EchoPoint
1.0

echopoint
Class RecallComboBox

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.text.TextComponent
          extended bynextapp.echo.TextField
              extended byechopoint.TextField
                  extended byechopoint.ComboBox
                      extended byechopoint.RecallComboBox
All Implemented Interfaces:
Borderable, MouseCursorable, ReflectionSetter, java.io.Serializable, ToolTipPopUpSupport, nextapp.echo.ToolTipSupport, Validateable

public class RecallComboBox
extends ComboBox

The RecallComboBox class is a ComboBox that can remember what has been entered into it before.

By default the RecallComboBox will remember which values have been entered and add them to its internal ListModel. This can happen if the ListModel is an instanceof DefaultListModel and hence has an add() method.

You can turn this behaviour off via the setAutoRecall() method.

Author:
Brad Baker
See Also:
Serialized Form

Nested Class Summary
static class RecallComboBox.NestedStyleInfo
          Nested public static StyleInfo class.
 
Field Summary
static java.lang.String AUTO_RECALL_CHANGED_PROPERTY
          Auto Recall Property
static java.lang.String AUTO_RECALL_LIMIT_CHANGED_PROPERTY
          Auto Recall Limit Property
 
Fields inherited from class echopoint.ComboBox
ACTION_ON_SELECTION_CHANGED_PROPERTY, CELL_RENDERER_CHANGED_PROPERTY, DROP_DOWN_BACKGROUND_CHANGED_PROPERTY, DROP_DOWN_BUTTON_BACKGROUND_CHANGED_PROPERTY, DROP_DOWN_FONT_CHANGED_PROPERTY, DROP_DOWN_FOREGROUND_CHANGED_PROPERTY, LIST_DATA_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_DROP_DOWN_BACKGROUND, STYLE_DROP_DOWN_BUTTON_BACKGROUND, STYLE_DROP_DOWN_FONT, STYLE_DROP_DOWN_FOREGROUND, STYLE_WIDTH, STYLE_WIDTH_UNITS, TEXT_MATCHING_PEFORMED_CHANGED_PROPERTY, VISIBLE_ROW_COUNT_CHANGED_PROPERTY, WIDTH_CHANGED_PROPERTY, WIDTH_UNITS_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo.TextField
ACTION_COMMAND_CHANGED_PROPERTY, COLUMN_UNITS_CHANGED_PROPERTY, COLUMNS_CHANGED_PROPERTY, MAXIMUM_LENGTH_CHANGED_PROPERTY, STYLE_MAXIMUM_LENGTH
 
Fields inherited from class nextapp.echo.text.TextComponent
BORDER_COLOR_CHANGED_PROPERTY, BORDER_DEFAULT, BORDER_INSET, BORDER_NONE, BORDER_SIZE_CHANGED_PROPERTY, BORDER_SOLID, BORDER_STYLE_CHANGED_PROPERTY, CHARACTER_UNITS, DOCUMENT_CHANGED_PROPERTY, EDITABLE_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, PERCENT_UNITS, PIXEL_UNITS, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_COLUMNS, STYLE_HORIZONTAL_ALIGNMENT, STYLE_LINE_WRAP, STYLE_ROWS, TEXT_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, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
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.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
 
Fields inherited from interface nextapp.echo.ToolTipSupport
TOOL_TIP_TEXT_CHANGED_PROPERTY
 
Constructor Summary
RecallComboBox()
          Creates a RecallTextField
RecallComboBox(int columns)
           
RecallComboBox(java.lang.Object[] list)
           
RecallComboBox(java.lang.String text)
           
RecallComboBox(java.lang.String text, int columns)
           
RecallComboBox(java.lang.String text, int columns, java.lang.Object[] list)
           
RecallComboBox(java.lang.String text, java.lang.Object[] list)
           
 
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 getAutoRecallLimit()
          Returns the auto recall limit
 boolean isAutoRecall()
          Returns true if auto recall is in effect
 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 setAutoRecall(boolean b)
          Controls whether auto recall is in effect
 void setAutoRecall(int newValue)
          Sets how many entries will be automatically recalled.
 
Methods inherited from class echopoint.ComboBox
getCellRenderer, getDropDownBackground, getDropDownButtonBackground, getDropDownFont, getDropDownForeground, getModel, getVisibleRowCount, getWidth, getWidthUnits, isActionOnSelection, isTextMatchingPerformed, setActionOnSelection, setCellRenderer, setDropDownBackground, setDropDownButtonBackground, setDropDownFont, setDropDownForeground, setModel, setTextMatchingPerformed, setVisibleRowCount, setWidth, setWidthUnits
 
Methods inherited from class echopoint.TextField
getBorderColor, getBorderSize, getBorderStyle, getBottomBorderColor, getBottomBorderSize, getBottomBorderStyle, getLeftBorderColor, getLeftBorderSize, getLeftBorderStyle, getMouseCursor, getMouseCursorURI, getRightBorderColor, getRightBorderSize, getRightBorderStyle, getRuleSet, getToolTipPopUp, getToolTipText, getTopBorderColor, getTopBorderSize, getTopBorderStyle, setBorderColor, setBorderSize, setBorderStyle, setBottomBorderColor, setBottomBorderSize, setBottomBorderStyle, setLeftBorderColor, setLeftBorderSize, setLeftBorderStyle, setMouseCursor, setMouseCursorURI, setRightBorderColor, setRightBorderSize, setRightBorderStyle, setRuleSet, setToolTipText, setTopBorderColor, setTopBorderSize, setTopBorderStyle, validate
 
Methods inherited from class nextapp.echo.TextField
addActionListener, fireActionEvent, getActionCommand, getColumns, getColumnUnits, getMaximumLength, hasActionListeners, removeActionListener, setActionCommand, setColumns, setColumnUnits, setMaximumLength
 
Methods inherited from class nextapp.echo.text.TextComponent
getDocument, getHorizontalAlignment, getText, isEditable, setDocument, setEditable, setHorizontalAlignment, setText
 
Methods inherited from class nextapp.echo.Component
add, add, 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, 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
 
Methods inherited from interface echopoint.validation.Validateable
getIdentifier, getLocale, getText
 

Field Detail

AUTO_RECALL_CHANGED_PROPERTY

public static final java.lang.String AUTO_RECALL_CHANGED_PROPERTY
Auto Recall Property

See Also:
Constant Field Values

AUTO_RECALL_LIMIT_CHANGED_PROPERTY

public static final java.lang.String AUTO_RECALL_LIMIT_CHANGED_PROPERTY
Auto Recall Limit Property

See Also:
Constant Field Values
Constructor Detail

RecallComboBox

public RecallComboBox()
Creates a RecallTextField


RecallComboBox

public RecallComboBox(int columns)
See Also:
ComboBox.ComboBox(int)

RecallComboBox

public RecallComboBox(java.lang.String text)
See Also:
ComboBox.ComboBox(String)

RecallComboBox

public RecallComboBox(java.lang.Object[] list)
See Also:
ComboBox.ComboBox(Object[])

RecallComboBox

public RecallComboBox(java.lang.String text,
                      java.lang.Object[] list)
See Also:
ComboBox.ComboBox(String, Object[])

RecallComboBox

public RecallComboBox(java.lang.String text,
                      int columns)
See Also:
ComboBox.ComboBox(String, int, Object[])

RecallComboBox

public RecallComboBox(java.lang.String text,
                      int columns,
                      java.lang.Object[] list)
See Also:
ComboBox.ComboBox(String, int, Object[])
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 Borderable
Overrides:
applyStyle in class ComboBox
See Also:
Component.applyStyle(nextapp.echo.Style)

isAutoRecall

public boolean isAutoRecall()
Returns true if auto recall is in effect

Returns:
true if auto recall is in effect

getAutoRecallLimit

public int getAutoRecallLimit()
Returns the auto recall limit

Returns:
the auto recall limit

setAutoRecall

public void setAutoRecall(boolean b)
Controls whether auto recall is in effect

Parameters:
b - - boolean

setAutoRecall

public void setAutoRecall(int newValue)
Sets how many entries will be automatically recalled. If this value is < 0 then no entries will be remembered

Parameters:
newValue - - int - the new limit

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

EchoPoint
1.0