public class FlexListBase extends FlexScrollBase
Items are supplied using the dataProvider property and displayed via item renderers.
In a model/view architecture, the ListBase-derived class represents the view, and the dataProvider object represents the model.
Modifier | Constructor and Description |
---|---|
protected |
FlexListBase(JtfObjectHandle handle,
Desktop desktop)
Creates a new FlexListBase with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
deselect(String itemRenderer)
Defines the value of the type property of the event object for an event that is dispatched when a previously selected item is deselected.
|
void |
deselect(String itemRenderer,
FlexTriggerEvent triggerEvent)
Defines the value of the type property of the event object for an event that is dispatched when a previously selected item is deselected.
|
void |
deselect(String itemRenderer,
FlexTriggerEvent triggerEvent,
ModifierKey keyModifier)
Defines the value of the type property of the event object for an event that is dispatched when a previously selected item is deselected.
|
void |
doubleSelect(String itemRenderer)
Defines the value of the type property of the ListEvent object for an itemDoubleClick event, which indicates that the user double-clicked the mouse over a visual item in the control.
|
void |
dragCancel()
Defines the value of the type property of the event object for a dragComplete event.
|
void |
dragCancel(ModifierKey keyModifier)
Defines the value of the type property of the event object for a dragComplete event.
|
void |
dragDrop(String action)
Defines the value of the type property of the event object for a dragDrop event.
|
void |
dragDrop(String action,
String draggedItem)
Defines the value of the type property of the event object for a dragDrop event.
|
void |
dragDrop(String action,
String draggedItem,
ModifierKey keyModifier)
Defines the value of the type property of the event object for a dragDrop event.
|
void |
dragStart(String draggedItem)
Defines the value of the type property of the event object for a dragStart event.
|
void |
dragStart(String draggedItem,
ModifierKey keyModifier)
Defines the value of the type property of the event object for a dragStart event.
|
List<Color> |
getAlternatingItemColors()
Gets the colors to use for the backgrounds of the items in the list.
|
Color |
getBackgroundDisabledColor()
Gets the color of text in the component if it is disabled.
|
int |
getColumnCount()
Gets the number of columns to be displayed in a TileList control or items in a HorizontalList control.
|
List<String> |
getColumnNames()
Gets a list containing the names of all columns in the data.
|
double |
getColumnWidth()
Gets the width of the control's columns.
|
String |
getDataTipField()
Gets the name of the field in the data provider items to display as the data tip.
|
int |
getFirstVisibleRow()
Gets the index of the first visible child.
|
double |
getFocusAlpha()
Gets the alpha transparency value of the focus skin.
|
String |
getIconField()
Gets the name of the field in the data provider object that determines what to display as the icon.
|
String |
getLabelField()
Gets the name of the field in the data provider items to display as the label.
|
int |
getLastVisibleRow()
Gets the index of the last visible child.
|
int |
getLockedColumnCount()
Gets the index of the first column in the control that scrolls.
|
int |
getLockedRowCount()
Gets the index of the first row in the control that scrolls.
|
int |
getNumColumns()
Gets the total number of columns in the data available.
|
int |
getNumRows()
Gets the total number of rows of data available.
|
Color |
getRollOverColor()
Gets the color of the background of a renderer when the user rolls over it.
|
int |
getRowCount()
Gets the number of rows to be displayed.
|
double |
getRowHeight()
Gets the height of the rows in pixels.
|
int |
getSelectedIndex()
Gets the index in the data provider of the selected item.
|
List<Integer> |
getSelectedIndices()
Gets an array of indices in the data provider of the selected items.
|
String |
getSelectedItem()
Gets a reference to the selected item in the data provider.
|
List<String> |
getSelectedItems()
Gets an array of references to the selected items in the data provider.
|
Color |
getSelectionColor()
Gets the color of the background of a renderer when the user selects it.
|
Color |
getSelectionDisabledColor()
Gets the color of the background of a renderer when the component is disabled.
|
Color |
getTextRollOverColor()
Gets the text color of the label as the user moves the mouse pointer over the button.
|
Color |
getTextSelectedColor()
Gets the color of the text of a renderer when the user selects it.
|
List<List<String>> |
getValues(int start,
int end)
Returns a matrix containing the automation values of all parts of the components.
|
String |
getVerticalAlign()
Gets the vertical alignment of a renderer in a row.
|
boolean |
isAllowMultipleSelection()
Gets whether you can allow more than one item to be selected at the same time.
|
boolean |
isSelectable()
Gets whether the list shows selected items as selected.
|
boolean |
isShowDataTips()
Gets whether dataTips are displayed for text in the rows.
|
boolean |
isUseRollOver()
Gets whether items are highlighted as the mouse rolls over them.
|
boolean |
isVariableRowHeight()
Gets whether the individual rows can have different height.
|
boolean |
isWordWrap()
Gets whether text in the row should be word wrapped.
|
void |
multiSelect(String itemRenderer)
Defines the value of the type property of the event object for an event that is dispatched when an item is selected as part of an action that selects multiple items.
|
void |
multiSelect(String itemRenderer,
FlexTriggerEvent triggerEvent)
Defines the value of the type property of the event object for an event that is dispatched when an item is selected as part of an action that selects multiple items.
|
void |
multiSelect(String itemRenderer,
FlexTriggerEvent triggerEvent,
ModifierKey keyModifier)
Defines the value of the type property of the event object for an event that is dispatched when an item is selected as part of an action that selects multiple items.
|
void |
scroll(int position,
FlexScrollDirection direction,
FlexScrollDetail detail)
Defines the value of the type property of the event object for a scroll event.
|
boolean |
scrollToIndex(int index)
Ensures that the data provider item at the given index is visible.
|
void |
select(String itemRenderer)
Defines the value of the type property of the event object for an event that is dispatched when a single item is selected.
|
void |
select(String itemRenderer,
FlexTriggerEvent triggerEvent)
Defines the value of the type property of the event object for an event that is dispatched when a single item is selected.
|
void |
select(String itemRenderer,
FlexTriggerEvent triggerEvent,
ModifierKey keyModifier)
Defines the value of the type property of the event object for an event that is dispatched when a single item is selected.
|
void |
selectIndex(int itemIndex)
Defines the value of the type property of the event object for an event that is dispatched when a single item is selected.
|
void |
selectIndex(int itemIndex,
FlexTriggerEvent triggerEvent)
Defines the value of the type property of the event object for an event that is dispatched when a single item is selected.
|
void |
selectIndex(int itemIndex,
FlexTriggerEvent triggerEvent,
ModifierKey keyModifier)
Defines the value of the type property of the event object for an event that is dispatched when a single item is selected.
|
void |
type(String keyCode)
Dispatched when the user presses a key.
|
void |
type(String keyCode,
ModifierKey keyModifier)
Dispatched when the user presses a key.
|
mouseScroll, mouseScroll
changeFocus, changeFocus, changeFocus, getAutomationClassName, getAutomationIndex, getAutomationName, getClassName, getCurrentState, getErrorColor, getErrorString, getId, getNumAutomationChildren, getPercentHeight, getPercentWidth, getScaleX, getScaleY, getThemeColor, getToolTip, isEnabled, isFocusEnabled, isUseHandCursor, move, move, move, setFocus
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAlpha, getHeight, getStyle, getTabIndex, getWidth, getX, getY, isMouseEnabled, isTabChildren, isTabEnabled, isVisible, mouseMove, mouseMove, nativeToString, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected FlexListBase(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the FlexListBasedesktop
- the desktop on which this object livespublic void deselect(String itemRenderer)
itemRenderer
- the item renderer object for the itempublic void deselect(String itemRenderer, FlexTriggerEvent triggerEvent)
itemRenderer
- the item renderer object for the itemtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionpublic void deselect(String itemRenderer, FlexTriggerEvent triggerEvent, ModifierKey keyModifier)
itemRenderer
- the item renderer object for the itemtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionkeyModifier
- the key modifiers (for example, the Ctrl key) to use when clicking the controlspublic void doubleSelect(String itemRenderer)
To receive itemDoubleClick events, you must set the component's doubleClickEnabled property to true.
itemRenderer
- the item renderer that was double-clickedpublic void dragCancel()
public void dragCancel(ModifierKey keyModifier)
keyModifier
- the key modifiers (for example, the Ctrl key) to use when completing the droppublic void dragDrop(String action)
action
- the action that caused the event: DragManager.COPY, DragManager.LINK, DragManager.MOVE, or DragManager.NONE.public void dragDrop(String action, String draggedItem)
action
- the action that caused the event: DragManager.COPY, DragManager.LINK, DragManager.MOVE, or DragManager.NONE.draggedItem
- the item being draggedpublic void dragDrop(String action, String draggedItem, ModifierKey keyModifier)
action
- the action that caused the event: DragManager.COPY, DragManager.LINK, DragManager.MOVE, or DragManager.NONE.draggedItem
- the item being draggedkeyModifier
- the key modifiers (for example, the Ctrl key) to use when dropping the controlpublic void dragStart(String draggedItem)
draggedItem
- the item being draggedpublic void dragStart(String draggedItem, ModifierKey keyModifier)
draggedItem
- the item being draggedkeyModifier
- the key modifiers (for example, the Ctrl key) to use when dragging the controlpublic List<List<String>> getValues(int start, int end)
The return value is an array of rows, each of which is an array of items.
start
- the index of the starting child. The default value is 0.end
- the index of the ending child. The default value is 0.public void multiSelect(String itemRenderer)
itemRenderer
- the item renderer object for the itempublic void multiSelect(String itemRenderer, FlexTriggerEvent triggerEvent)
itemRenderer
- the item renderer object for the itemtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionpublic void multiSelect(String itemRenderer, FlexTriggerEvent triggerEvent, ModifierKey keyModifier)
itemRenderer
- the item renderer object for the itemtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionkeyModifier
- the key modifiers (for example, the Ctrl key) to use when clicking the controlspublic void scroll(int position, FlexScrollDirection direction, FlexScrollDetail detail)
position
- contains the new scroll positiondirection
- contains the scroll direction, either ScrollEventDirection.HORIZONTAL or ScrollEventDirection.VERTICAL.detail
- provides the specifics of the type of scroll activity. Constants for the possible values are provided in the ScrollEventDetail class.public boolean scrollToIndex(int index)
If the item is visible, the verticalScrollPosition property is left unchanged even if the item is not the first visible item. If the item is not currently visible, the verticalScrollPosition property is changed to make the item the first visible item, unless there are not enough rows to do so because the verticalScrollPosition value is limited by the maxVerticalScrollPosition property.
index
- the index of the item in the data providerpublic void select(String itemRenderer)
itemRenderer
- the item renderer object for the itempublic void select(String itemRenderer, FlexTriggerEvent triggerEvent)
itemRenderer
- the item renderer object for the itemtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionpublic void select(String itemRenderer, FlexTriggerEvent triggerEvent, ModifierKey keyModifier)
itemRenderer
- the item renderer object for the itemtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionkeyModifier
- the key modifiers (for example, the Ctrl key) to use when selecting the controlpublic void selectIndex(int itemIndex)
itemIndex
- the data provider index of the item to be selectedpublic void selectIndex(int itemIndex, FlexTriggerEvent triggerEvent)
itemIndex
- the data provider index of the item to be selectedtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionpublic void selectIndex(int itemIndex, FlexTriggerEvent triggerEvent, ModifierKey keyModifier)
itemIndex
- the data provider index of the item to be selectedtriggerEvent
- the event, such as a mouse or keyboard event, that triggered the actionkeyModifier
- the key modifiers (for example, the Ctrl key) to use when clicking the indexpublic void type(String keyCode)
Mappings between keys and specific characters vary by device and operating system. This event type is generated after such a mapping occurs but before the processing of an input method editor (IME). IMEs are used to enter characters, such as Chinese ideographs, that the standard QWERTY keyboard is ill-equipped to produce.
keyCode
- the key code value of the key pressed or releasedpublic void type(String keyCode, ModifierKey keyModifier)
Mappings between keys and specific characters vary by device and operating system. This event type is generated after such a mapping occurs but before the processing of an input method editor (IME). IMEs are used to enter characters, such as Chinese ideographs, that the standard QWERTY keyboard is ill-equipped to produce.
keyCode
- the key code value of the key pressed or releasedkeyModifier
- the key modifiers (for example, the Ctrl key) to use when clicking the controlspublic boolean isAllowMultipleSelection()
If true, users can select multiple items. There is no option to disallow noncontiguous selection. Standard complex selection options are always in effect (Shift-click, Ctrl-click).
The default value is false.
public List<Color> getAlternatingItemColors()
The value is an array of two or more colors. The backgrounds of the list items alternate among the colors in the array. Used only if the backgroundColor property is not specified. The default value is undefined.
public Color getBackgroundDisabledColor()
public int getColumnCount()
For the DataGrid it is the number of visible columns. Note: Setting this property has no effect on a DataGrid control, which bases the number of columns on the control width and the individual column widths.
The default value is 4.
public List<String> getColumnNames()
public double getColumnWidth()
This property is used by TileList and HorizontalList controls. It has no effect on DataGrid controls, where you set the individual DataGridColumn widths.
The default value is 50.
public String getDataTipField()
By default, the list looks for a property named label on each item and displays it. However, if the data objects do not contain a label property, you can set the dataTipField property to use a different property in the data object.
The default value is null.
public int getFirstVisibleRow()
public double getFocusAlpha()
public String getIconField()
By default, the list class does not try to display icons with the text in the rows. However, by specifying an icon field, you can specify a graphic that is created and displayed as an icon in the row. This property is ignored by DataGrid.
The default value is null.
public String getLabelField()
By default the list looks for a property named label on each item and displays it. However, if the data objects do not contain a label property, you can set the labelField property to use a different property in the data object.
The default value is label
.
public int getLastVisibleRow()
public int getLockedColumnCount()
public int getLockedRowCount()
public int getNumColumns()
public int getNumRows()
public Color getRollOverColor()
public int getRowCount()
If the height of the component has been explicitly set, this property might not have any effect.
For a DataGrid control, the rowCount property includes the header row. So, for a DataGrid control with 3 body rows and a header row, the rowCount property is 4.
The default value is 4.
public double getRowHeight()
Unless the variableRowHeight property is true, all rows are the same height. If not specified, the row height is based on the font size and other properties of the renderer.
public boolean isSelectable()
If true, the control supports selection. The Menu class, which subclasses ListBase, sets this property to false by default, because it does not show the chosen menu item as selected.
The default value is true.
public int getSelectedIndex()
The default value is -1 (no selected item).
public List<Integer> getSelectedIndices()
The items are in the reverse order that the user selected the items.
The default value is [ ].
public String getSelectedItem()
The default value is null.
public List<String> getSelectedItems()
The items are in the reverse order that the user selected the items.
The default value is [ ].
public Color getSelectionColor()
public Color getSelectionDisabledColor()
public boolean isShowDataTips()
If true, dataTips are displayed. DataTips are tooltips designed to show the text that is too long for the row. If you set a dataTipFunction, dataTips are shown regardless of whether the text is too long for the row.
The default value is false.
public Color getTextRollOverColor()
public Color getTextSelectedColor()
public boolean isUseRollOver()
If true, rows are highlighted as the mouse rolls over them. If false, rows are highlighted only when selected.
The default value is true.
public boolean isVariableRowHeight()
This property is ignored by TileList and HorizontalList. If true, individual rows can have different height values.
The default value is false.
public String getVerticalAlign()
Possible values are: top, middle, and bottom. The DataGrid positions the renderers in a row based on this style and the paddingTop and paddingBottom styles.
The default value is top
.
public boolean isWordWrap()
If true, enables word wrapping for text in the rows. Only takes effect if the variableRowHeight property is also true.
The default value is false.
Copyright 2009-2012 Micro Focus. All Rights Reserved.