|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.text.TextComponent
nextapp.echo.TextField
echopoint.TextField
echopoint.ComboBox
public class ComboBox
The ComboBox
component is a TextField that
acts like a SelectField as well. It will present a list
of choices to the user (like a SelectField)
that can be auto-matched as the user types in key strokes.
The ComboBox
has a drop down button that
presents all choices in a list, which the user can then
select.
Nested Class Summary | |
---|---|
static class |
ComboBox.NestedStyleInfo
Nested public static StyleInfo class. |
Field Summary | |
---|---|
static java.lang.String |
ACTION_ON_SELECTION_CHANGED_PROPERTY
List Width Units Property |
static java.lang.String |
CELL_RENDERER_CHANGED_PROPERTY
List Cell Renderer Property |
static java.lang.String |
DROP_DOWN_BACKGROUND_CHANGED_PROPERTY
|
static java.lang.String |
DROP_DOWN_BUTTON_BACKGROUND_CHANGED_PROPERTY
|
static java.lang.String |
DROP_DOWN_FONT_CHANGED_PROPERTY
|
static java.lang.String |
DROP_DOWN_FOREGROUND_CHANGED_PROPERTY
|
static java.lang.String |
LIST_DATA_CHANGED_PROPERTY
List Data Handler Property |
static java.lang.String |
MODEL_CHANGED_PROPERTY
Model Property |
static java.lang.String |
STYLE_DROP_DOWN_BACKGROUND
Drop Down Background Property |
static java.lang.String |
STYLE_DROP_DOWN_BUTTON_BACKGROUND
Drop Down Button Background Color Property |
static java.lang.String |
STYLE_DROP_DOWN_FONT
Drop Down Font Property |
static java.lang.String |
STYLE_DROP_DOWN_FOREGROUND
Drop Down Foreground Property |
static java.lang.String |
STYLE_WIDTH
List Width Property |
static java.lang.String |
STYLE_WIDTH_UNITS
List Width Units Property |
static java.lang.String |
TEXT_MATCHING_PEFORMED_CHANGED_PROPERTY
Text Matching Performed Property |
static java.lang.String |
VISIBLE_ROW_COUNT_CHANGED_PROPERTY
Visible Row Count Property |
static java.lang.String |
WIDTH_CHANGED_PROPERTY
|
static java.lang.String |
WIDTH_UNITS_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 |
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
ComboBox()
Creates a ComboBox |
|
ComboBox(int columns)
Creates a ComboBox that is columns wide. |
|
ComboBox(java.lang.Object[] list)
Creates a ComboBox with list as the initial
list contents. |
|
ComboBox(java.lang.String text)
Creates a ComboBox with text as the initial
value. |
|
ComboBox(java.lang.String text,
int columns,
java.lang.Object[] list)
Creates a ComboBox with text as the initial
value and that is columns wide and list as
the initial list contents. |
|
ComboBox(java.lang.String text,
java.lang.Object[] list)
Creates a ComboBox with text as the initial
value and list as the initial list contents. |
Method Summary | |
---|---|
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
ListCellRenderer |
getCellRenderer()
Returns the renderer for items. |
Color |
getDropDownBackground()
Returns the drop down background |
Color |
getDropDownButtonBackground()
Returns the background Color of the drop down button |
Font |
getDropDownFont()
Returns the drop down font |
Color |
getDropDownForeground()
Returns the drop down foreground |
ListModel |
getModel()
Returns the model. |
int |
getVisibleRowCount()
Returns the number of rows that will be simultaneously displayed. |
int |
getWidth()
Returns the list width of the ComboBox . |
int |
getWidthUnits()
Returns the list width units of the ComboBox . |
boolean |
isActionOnSelection()
Indicates whether a server action is done when the list selection changes. |
boolean |
isTextMatchingPerformed()
Returns true if text matching is performed |
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 |
setActionOnSelection(boolean newValue)
Controls whether a server action is done when the list selection changes. |
void |
setCellRenderer(ListCellRenderer newValue)
Sets the renderer for items. |
void |
setDropDownBackground(Color color)
Sets the drop down background |
void |
setDropDownButtonBackground(Color newValue)
Sets the background Color of the drop down button |
void |
setDropDownFont(Font font)
Sets the drop down font |
void |
setDropDownForeground(Color color)
Sets the drop down foreground |
void |
setModel(ListModel newValue)
Sets the model. |
void |
setTextMatchingPerformed(boolean newValue)
Controls whether text matching is performed as the user types in the text field. |
void |
setVisibleRowCount(int newValue)
Sets the number of rows that will be simultaneously displayed. |
void |
setWidth(int newValue)
Sets the list width of the ComboBox . |
void |
setWidthUnits(int newValue)
Sets the list width units of the ComboBox . |
Methods inherited from class nextapp.echo.text.TextComponent |
---|
getCssClass, getDocument, getHorizontalAlignment, getText, isEditable, setCssClass, setDocument, setEditable, setHorizontalAlignment, setText |
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 |
---|
public static final java.lang.String STYLE_DROP_DOWN_BACKGROUND
public static final java.lang.String DROP_DOWN_BACKGROUND_CHANGED_PROPERTY
public static final java.lang.String STYLE_DROP_DOWN_FOREGROUND
public static final java.lang.String DROP_DOWN_FOREGROUND_CHANGED_PROPERTY
public static final java.lang.String STYLE_DROP_DOWN_FONT
public static final java.lang.String DROP_DOWN_FONT_CHANGED_PROPERTY
public static final java.lang.String STYLE_DROP_DOWN_BUTTON_BACKGROUND
public static final java.lang.String DROP_DOWN_BUTTON_BACKGROUND_CHANGED_PROPERTY
public static final java.lang.String CELL_RENDERER_CHANGED_PROPERTY
public static final java.lang.String MODEL_CHANGED_PROPERTY
public static final java.lang.String LIST_DATA_CHANGED_PROPERTY
public static final java.lang.String VISIBLE_ROW_COUNT_CHANGED_PROPERTY
public static final java.lang.String TEXT_MATCHING_PEFORMED_CHANGED_PROPERTY
public static final java.lang.String STYLE_WIDTH
public static final java.lang.String WIDTH_CHANGED_PROPERTY
public static final java.lang.String STYLE_WIDTH_UNITS
public static final java.lang.String WIDTH_UNITS_CHANGED_PROPERTY
public static final java.lang.String ACTION_ON_SELECTION_CHANGED_PROPERTY
Constructor Detail |
---|
public ComboBox()
ComboBox
public ComboBox(int columns)
ComboBox
that is columns wide.
public ComboBox(java.lang.String text)
ComboBox
with text
as the initial
value.
public ComboBox(java.lang.Object[] list)
ComboBox
with list
as the initial
list contents.
public ComboBox(java.lang.String text, java.lang.Object[] list)
ComboBox
with text
as the initial
value and list
as the initial list contents.
public ComboBox(java.lang.String text, int columns, java.lang.Object[] list)
ComboBox
with text
as the initial
value and that is columns
wide and list
as
the initial list contents.
Method Detail |
---|
public void applyStyle(Style style)
Component
Style
object. The version of this method in Component
will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle
in interface Borderable
applyStyle
in interface MouseCursorable
applyStyle
in interface Component
applyStyle
in class TextField
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(nextapp.echo.Style)
public Color getDropDownButtonBackground()
public void setDropDownButtonBackground(Color newValue)
newValue
- - the new background colorpublic ListCellRenderer getCellRenderer()
public ListModel getModel()
public void setCellRenderer(ListCellRenderer newValue)
newValue
- The new renderer for items.public void setModel(ListModel newValue)
newValue
- The new model.public Color getDropDownBackground()
public Font getDropDownFont()
public Color getDropDownForeground()
public void setDropDownBackground(Color color)
color
- - the drop down backgroundpublic void setDropDownFont(Font font)
font
- - the drop down fontpublic void setDropDownForeground(Color color)
color
- - the drop down foregroundpublic int getVisibleRowCount()
public void setVisibleRowCount(int newValue)
newValue
- The number of rows that will be simultaneously displayed.public int getWidth()
ComboBox
.
ComboBox
.public int getWidthUnits()
ComboBox
.
ComboBox
,
one of the following values:
PIXEL_UNITS
(the default)PERCENT_UNITS
public void setWidth(int newValue)
ComboBox
. The property is
not used if it is 0 or less.
newValue
- The new width.public void setWidthUnits(int newValue)
ComboBox
.
newValue
- The new width units, one of the following values:
PIXEL_UNITS
(the default)PERCENT_UNITS
public boolean isTextMatchingPerformed()
public void setTextMatchingPerformed(boolean newValue)
newValue
- - boolean true if text matching is to be performedpublic boolean isActionOnSelection()
public void setActionOnSelection(boolean newValue)
newValue
- - true of falsepublic java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
set
in class TextField
field
- - the field to be setnewValue
- - the new value to be set
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |