|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.ListBox
public class ListBox
A component that allows the selection of one or more displayed items.
Field Summary | |
---|---|
static java.lang.String |
CELL_RENDERER_CHANGED_PROPERTY
|
static java.lang.String |
CSS_CLASS_CHANGED_PROPERTY
|
static java.lang.String |
LIST_DATA_CHANGED_PROPERTY
|
static java.lang.String |
LIST_SELECTION_CHANGED_PROPERTY
|
static int |
PERCENT_UNITS
A constant for units-defining properties that represent percent-based units. |
static int |
PIXEL_UNITS
A constant for units-defining properties that represent pixel-based units. |
static java.lang.String |
SELECTION_MODE_CHANGED_PROPERTY
|
static java.lang.String |
SELECTION_MODEL_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_VISIBLE_ROW_COUNT
A style constant for the Visible Row Count property. |
static java.lang.String |
STYLE_WIDTH
A style constant for the Width property. |
static java.lang.String |
STYLE_WIDTH_UNITS
A style constant for the Width Units property. |
static java.lang.String |
VISIBLE_ROW_COUNT_CHANGED_PROPERTY
|
static java.lang.String |
WIDTH_CHANGED_PROPERTY
|
static java.lang.String |
WIDTH_UNITS_CHANGED_PROPERTY
|
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
ListBox()
Creates an empty ListBox. |
|
ListBox(ListModel model)
Creates a ListBox with the given data model. |
|
ListBox(java.lang.Object[] elements)
Creates a ListBox with a default model populated with the given array of elements. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener l)
Adds an ActionListener to the button. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
void |
clearSelection()
Deselects all items. |
void |
doAction(boolean doubleClick)
|
void |
fireActionPerformed(ActionEvent e)
Notifies all listeners that have registered for this event type. |
ListCellRenderer |
getCellRenderer()
Returns the renderer for items. |
java.lang.String |
getCssClass()
|
int |
getMaxSelectedIndex()
Returns the maximum selected index. |
int |
getMinSelectedIndex()
Returns the minimum selected index. |
ListModel |
getModel()
Returns the model. |
int |
getSelectedIndex()
Returns the selected index. |
int[] |
getSelectedIndices()
Returns all selected indices. |
java.lang.Object |
getSelectedValue()
Returns the selected item. |
java.lang.Object[] |
getSelectedValues()
Returns all selected items. |
int |
getSelectionMode()
Returns the selection mode. |
ListSelectionModel |
getSelectionModel()
Returns the selection model. |
java.lang.String |
getToolTipText()
Returns the default tool tip text. |
int |
getVisibleRowCount()
Returns the number of rows that will be simultaneously displayed. |
int |
getWidth()
Returns the width of the ListBox . |
int |
getWidthUnits()
Returns the width units of the ListBox . |
boolean |
hasActionListeners()
|
boolean |
isAsync()
|
boolean |
isDoubleClickActionListeners()
|
boolean |
isNoTabStop()
|
boolean |
isSelectedIndex(int index)
Determines whether an index is selected. |
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the button. |
void |
setAsync(boolean async)
|
void |
setCellRenderer(ListCellRenderer newValue)
Sets the renderer for items. |
void |
setCssClass(java.lang.String newValue)
|
void |
setDoubleClickActionListeners(boolean doubleClickActionListeners)
|
void |
setModel(ListModel newValue)
Sets the model. |
void |
setNoTabStop(boolean noTabStop)
|
void |
setSelectedIndex(int index)
Selects only the given index. |
void |
setSelectedIndex(int index,
boolean selected)
Sets the selection state of the given index. |
void |
setSelectedIndices(int[] indices)
Selects an array of indices. |
void |
setSelectionMode(int newValue)
Sets the selection mode. |
void |
setSelectionModel(ListSelectionModel newValue)
Sets the selection model. |
void |
setToolTipText(java.lang.String newValue)
Sets the default tool tip text. |
void |
setVisibleRowCount(int newValue)
Sets the number of rows that will be simultaneously displayed. |
void |
setWidth(int newValue)
Sets the width of the ListBox . |
void |
setWidthUnits(int newValue)
Sets the width units of the ListBox . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PIXEL_UNITS
public static final int PERCENT_UNITS
public static final java.lang.String STYLE_WIDTH
public static final java.lang.String STYLE_WIDTH_UNITS
public static final java.lang.String STYLE_VISIBLE_ROW_COUNT
public static final java.lang.String CELL_RENDERER_CHANGED_PROPERTY
public static final java.lang.String LIST_DATA_CHANGED_PROPERTY
public static final java.lang.String LIST_SELECTION_CHANGED_PROPERTY
public static final java.lang.String SELECTION_MODEL_CHANGED_PROPERTY
public static final java.lang.String VISIBLE_ROW_COUNT_CHANGED_PROPERTY
public static final java.lang.String WIDTH_CHANGED_PROPERTY
public static final java.lang.String WIDTH_UNITS_CHANGED_PROPERTY
public static final java.lang.String SELECTION_MODE_CHANGED_PROPERTY
public static final java.lang.String CSS_CLASS_CHANGED_PROPERTY
Constructor Detail |
---|
public ListBox()
public ListBox(ListModel model)
model
- The ListModel for this ListBox.public ListBox(java.lang.Object[] elements)
elements
- An array of elements that will initially populate this
ListBox.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 Component
applyStyle
in class AbstractComponent
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(Style)
public void clearSelection()
public ListCellRenderer getCellRenderer()
public int getMaxSelectedIndex()
public int getMinSelectedIndex()
public ListModel getModel()
public int getSelectedIndex()
public java.lang.Object getSelectedValue()
public int[] getSelectedIndices()
public java.lang.Object[] getSelectedValues()
public int getSelectionMode()
public ListSelectionModel getSelectionModel()
public java.lang.String getToolTipText()
ToolTipSupport
getToolTipText
in interface ToolTipSupport
ToolTipSupport.getToolTipText()
public int getVisibleRowCount()
public int getWidth()
ListBox
.
ListBox
.public int getWidthUnits()
ListBox
.
ListBox
, one of the
following values:
PIXEL_UNITS
(the default)PERCENT_UNITS
public boolean isSelectedIndex(int index)
index
- The index to test for selection.
public void setCellRenderer(ListCellRenderer newValue)
newValue
- The new renderer for items.public void setModel(ListModel newValue)
newValue
- The new model.public void setSelectedIndex(int index)
index
- The index to select.public void setSelectedIndex(int index, boolean selected)
index
- The index to select.public void setSelectedIndices(int[] indices)
indices
- The indices to be selected.public void setSelectionMode(int newValue)
newValue
- The selection mode, one of the following values:
public void setSelectionModel(ListSelectionModel newValue)
newValue
- The new selection model.public void setToolTipText(java.lang.String newValue)
ToolTipSupport
setToolTipText
in interface ToolTipSupport
newValue
- The new tool tip text.ToolTipSupport.setToolTipText(String)
public void setVisibleRowCount(int newValue)
newValue
- The number of rows that will be simultaneously displayed.public void setWidth(int newValue)
ListBox
.
newValue
- The new width.public void setWidthUnits(int newValue)
ListBox
.
newValue
- The new width units, one of the following values:
PIXEL_UNITS
(the default)PERCENT_UNITS
public boolean hasActionListeners()
public void addActionListener(ActionListener l)
ActionListener
to the button.
l
- The ActionListener
to be added.public void removeActionListener(ActionListener l)
ActionListener
from the button.
l
- The ActionListener
to be removed.public void fireActionPerformed(ActionEvent e)
e
- The ActionEvent
to send.public void doAction(boolean doubleClick)
public boolean isDoubleClickActionListeners()
public void setDoubleClickActionListeners(boolean doubleClickActionListeners)
public boolean isAsync()
public void setAsync(boolean async)
public boolean isNoTabStop()
public void setNoTabStop(boolean noTabStop)
public java.lang.String getCssClass()
public void setCssClass(java.lang.String newValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |