All Packages Class Hierarchy This Package Previous Next Index
Interface jclass.bwt.JCListInterface
- public interface JCListInterface
- extends JCItemSelectable
An interface which defines the API for components which have a list-like
behavior.
- See Also:
- JCList, JCMultiColumnList
-
addItem(Object)
- Adds a item to the end of the list.
-
addItem(Object, int)
- Adds the specified item to the end of the list.
-
allowsMultipleSelections()
- Returns true if this list allows multiple selections.
-
clear()
- Clears the list.
-
countItems()
- Returns the number of items in the list.
-
deleteItem(int)
- Deletes an item from the list.
-
deleteItems(int, int)
- Deletes multiple items from the list.
-
deselect(int)
- Deselects the item at the specified row.
-
getAutoSelect()
- Gets the AutoSelect value.
-
getItem(int)
- Gets the item associated with the specified row.
-
getItems()
- Gets the list's values.
-
getRows()
- Returns the number of visible lines in the list.
-
getSelectedBackground()
- Gets the list's SelectedBackground value.
-
getSelectedForeground()
- Gets the list's SelectedForeground value.
-
getSelectedIndex()
- Get the selected item on the list or BWTEnum.NOTFOUND
if no item is selected.
-
getSelectedIndexes()
- Returns the selected indexes on the list, or null if no item is selected.
-
getSelectedItem()
- Returns the selected item on the list, or null if no item is selected.
-
getSelectedObjects()
- Returns the selected items on the list, or null if no items are selected.
-
getSpacing()
- Gets the spacing between items.
-
getTopRow()
- Gets the current top-most visible row.
-
getVisibleIndex()
- Gets the row of the item that was last made visible by the method
makeVisible.
-
isSelected(int)
- Returns true if the item at the specified row has been selected;
otherwise false.
-
makeVisible(int)
- Forces the item at the specified row to be visible.
-
replaceItem(Object, int)
- Replaces the item at the given row.
-
select(int)
- Selects the item at the specified row.
-
setAllowMultipleSelections(boolean)
- Sets whether this list should allow multiple selections or not.
-
setAutoSelect(boolean)
- If true, the item which currently has focus is also selected.
-
setItems(JCVector)
- Sets the list's values.
-
setRowHeight(int)
- Sets the height of each row (pixels).
The value may be any int, or one of the following:
If set to BWTEnum.VARIABLE, the height will be calculated individually
for each row.
If set to BWTEnum.FONT_HEIGHT (default), the height will be set to the
height of the current font.
-
setSelectedBackground(Color)
- Sets the background color of selected rows.
-
setSelectedForeground(Color)
- Sets the foreground color of selected rows.
-
setSpacing(int)
- Sets the spacing between items.
-
setTopRow(int)
- Sets the top-most visible row.
-
setVisibleRows(int)
- Sets the number of visible rows.
countItems
public abstract int countItems()
- Returns the number of items in the list.
- See Also:
- getItem
getItems
public abstract JCVector getItems()
- Gets the list's values.
- See Also:
- setItems
setItems
public abstract void setItems(JCVector items)
- Sets the list's values.
getItem
public abstract Object getItem(int row)
- Gets the item associated with the specified row.
- Parameters:
- row - the position of the item
- See Also:
- countItems
addItem
public abstract void addItem(Object item)
- Adds a item to the end of the list.
- Parameters:
- item - the item to be added
addItem
public abstract void addItem(Object item,
int row)
- Adds the specified item to the end of the list.
- Parameters:
- item - the item to be added
- row - the position at which to put in the item;
if row is -1, or greater than the number of items
in the list, the item is added to the end
replaceItem
public abstract void replaceItem(Object item,
int row)
- Replaces the item at the given row.
- Parameters:
- item - the new value to replace the existing item
- row - the position of the item to replace
clear
public abstract void clear()
- Clears the list.
- See Also:
- deleteItem, deleteItems
deleteItem
public abstract void deleteItem(int position)
- Deletes an item from the list.
deleteItems
public abstract void deleteItems(int start,
int end)
- Deletes multiple items from the list.
getSelectedIndex
public abstract int getSelectedIndex()
- Get the selected item on the list or BWTEnum.NOTFOUND
if no item is selected.
- See Also:
- select, deselect, isSelected
getSelectedIndexes
public abstract int[] getSelectedIndexes()
- Returns the selected indexes on the list, or null if no item is selected.
- See Also:
- select, deselect, isSelected
getSelectedItem
public abstract Object getSelectedItem()
- Returns the selected item on the list, or null if no item is selected.
- See Also:
- select, deselect, isSelected
getSelectedObjects
public abstract Object[] getSelectedObjects()
- Returns the selected items on the list, or null if no items are selected.
- See Also:
- select, deselect, isSelected
select
public abstract void select(int row)
- Selects the item at the specified row.
- Parameters:
- row - the position of the item to select
- See Also:
- getSelectedObjects, deselect, isSelected
getAutoSelect
public abstract boolean getAutoSelect()
- Gets the AutoSelect value.
- See Also:
- setAutoSelect
setAutoSelect
public abstract void setAutoSelect(boolean v)
- If true, the item which currently has focus is also selected.
- See Also:
- select
deselect
public abstract void deselect(int row)
- Deselects the item at the specified row.
- Parameters:
- row - the position of the item to deselect
- See Also:
- select, getSelectedItem, isSelected
isSelected
public abstract boolean isSelected(int row)
- Returns true if the item at the specified row has been selected;
otherwise false.
- Parameters:
- row - the item to be checked
- See Also:
- select, deselect, isSelected
getSelectedBackground
public abstract Color getSelectedBackground()
- Gets the list's SelectedBackground value.
- See Also:
- setSelectedBackground
setSelectedBackground
public abstract void setSelectedBackground(Color v)
- Sets the background color of selected rows.
getSelectedForeground
public abstract Color getSelectedForeground()
- Gets the list's SelectedForeground value.
- See Also:
- setSelectedForeground
setSelectedForeground
public abstract void setSelectedForeground(Color v)
- Sets the foreground color of selected rows.
getRows
public abstract int getRows()
- Returns the number of visible lines in the list.
setVisibleRows
public abstract void setVisibleRows(int v)
- Sets the number of visible rows. If set to 0 (default), the list
will attempt to resize itself so that all its items are visible.
- See Also:
- setItems
allowsMultipleSelections
public abstract boolean allowsMultipleSelections()
- Returns true if this list allows multiple selections.
- See Also:
- setAllowMultipleSelections
setAllowMultipleSelections
public abstract void setAllowMultipleSelections(boolean v)
- Sets whether this list should allow multiple selections or not.
- Parameters:
- v - the boolean to allow multiple selections
- See Also:
- allowsMultipleSelections
getVisibleIndex
public abstract int getVisibleIndex()
- Gets the row of the item that was last made visible by the method
makeVisible.
makeVisible
public abstract void makeVisible(int row)
- Forces the item at the specified row to be visible.
- Parameters:
- row - the position of the item
- See Also:
- getVisibleIndex
getTopRow
public abstract int getTopRow()
- Gets the current top-most visible row.
- See Also:
- setTopRow
setTopRow
public abstract void setTopRow(int row)
- Sets the top-most visible row.
- See Also:
- makeVisible
setRowHeight
public abstract void setRowHeight(int h)
- Sets the height of each row (pixels).
The value may be any int, or one of the following:
If set to BWTEnum.VARIABLE, the height will be calculated individually
for each row.
If set to BWTEnum.FONT_HEIGHT (default), the height will be set to the
height of the current font.
getSpacing
public abstract int getSpacing()
- Gets the spacing between items.
- See Also:
- setSpacing
setSpacing
public abstract void setSpacing(int v)
- Sets the spacing between items.
This value increases the HighlightThickness value.
- See Also:
- setHighlightThickness
All Packages Class Hierarchy This Package Previous Next Index