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

Method Index

 o addItem(Object)
Adds a item to the end of the list.
 o addItem(Object, int)
Adds the specified item to the end of the list.
 o allowsMultipleSelections()
Returns true if this list allows multiple selections.
 o clear()
Clears the list.
 o countItems()
Returns the number of items in the list.
 o deleteItem(int)
Deletes an item from the list.
 o deleteItems(int, int)
Deletes multiple items from the list.
 o deselect(int)
Deselects the item at the specified row.
 o getAutoSelect()
Gets the AutoSelect value.
 o getItem(int)
Gets the item associated with the specified row.
 o getItems()
Gets the list's values.
 o getRows()
Returns the number of visible lines in the list.
 o getSelectedBackground()
Gets the list's SelectedBackground value.
 o getSelectedForeground()
Gets the list's SelectedForeground value.
 o getSelectedIndex()
Get the selected item on the list or BWTEnum.NOTFOUND if no item is selected.
 o getSelectedIndexes()
Returns the selected indexes on the list, or null if no item is selected.
 o getSelectedItem()
Returns the selected item on the list, or null if no item is selected.
 o getSelectedObjects()
Returns the selected items on the list, or null if no items are selected.
 o getSpacing()
Gets the spacing between items.
 o getTopRow()
Gets the current top-most visible row.
 o getVisibleIndex()
Gets the row of the item that was last made visible by the method makeVisible.
 o isSelected(int)
Returns true if the item at the specified row has been selected; otherwise false.
 o makeVisible(int)
Forces the item at the specified row to be visible.
 o replaceItem(Object, int)
Replaces the item at the given row.
 o select(int)
Selects the item at the specified row.
 o setAllowMultipleSelections(boolean)
Sets whether this list should allow multiple selections or not.
 o setAutoSelect(boolean)
If true, the item which currently has focus is also selected.
 o setItems(JCVector)
Sets the list's values.
 o 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.

 o setSelectedBackground(Color)
Sets the background color of selected rows.
 o setSelectedForeground(Color)
Sets the foreground color of selected rows.
 o setSpacing(int)
Sets the spacing between items.
 o setTopRow(int)
Sets the top-most visible row.
 o setVisibleRows(int)
Sets the number of visible rows.

Methods

 o countItems
 public abstract int countItems()
Returns the number of items in the list.

See Also:
getItem
 o getItems
 public abstract JCVector getItems()
Gets the list's values.

See Also:
setItems
 o setItems
 public abstract void setItems(JCVector items)
Sets the list's values.

 o 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
 o addItem
 public abstract void addItem(Object item)
Adds a item to the end of the list.

Parameters:
item - the item to be added
 o 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
 o 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
 o clear
 public abstract void clear()
Clears the list.

See Also:
deleteItem, deleteItems
 o deleteItem
 public abstract void deleteItem(int position)
Deletes an item from the list.

 o deleteItems
 public abstract void deleteItems(int start,
                                  int end)
Deletes multiple items from the list.

 o 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
 o getSelectedIndexes
 public abstract int[] getSelectedIndexes()
Returns the selected indexes on the list, or null if no item is selected.

See Also:
select, deselect, isSelected
 o getSelectedItem
 public abstract Object getSelectedItem()
Returns the selected item on the list, or null if no item is selected.

See Also:
select, deselect, isSelected
 o getSelectedObjects
 public abstract Object[] getSelectedObjects()
Returns the selected items on the list, or null if no items are selected.

See Also:
select, deselect, isSelected
 o 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
 o getAutoSelect
 public abstract boolean getAutoSelect()
Gets the AutoSelect value.

See Also:
setAutoSelect
 o setAutoSelect
 public abstract void setAutoSelect(boolean v)
If true, the item which currently has focus is also selected.

See Also:
select
 o 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
 o 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
 o getSelectedBackground
 public abstract Color getSelectedBackground()
Gets the list's SelectedBackground value.

See Also:
setSelectedBackground
 o setSelectedBackground
 public abstract void setSelectedBackground(Color v)
Sets the background color of selected rows.

 o getSelectedForeground
 public abstract Color getSelectedForeground()
Gets the list's SelectedForeground value.

See Also:
setSelectedForeground
 o setSelectedForeground
 public abstract void setSelectedForeground(Color v)
Sets the foreground color of selected rows.

 o getRows
 public abstract int getRows()
Returns the number of visible lines in the list.

 o 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
 o allowsMultipleSelections
 public abstract boolean allowsMultipleSelections()
Returns true if this list allows multiple selections.

See Also:
setAllowMultipleSelections
 o 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
 o getVisibleIndex
 public abstract int getVisibleIndex()
Gets the row of the item that was last made visible by the method makeVisible.

 o 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
 o getTopRow
 public abstract int getTopRow()
Gets the current top-most visible row.

See Also:
setTopRow
 o setTopRow
 public abstract void setTopRow(int row)
Sets the top-most visible row.

See Also:
makeVisible
 o 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.

 o getSpacing
 public abstract int getSpacing()
Gets the spacing between items.

See Also:
setSpacing
 o 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