All Packages Class Hierarchy This Package Previous Next Index
Class dtai.gwt.ScrollGadgetGadget
java.lang.Object
|
+----dtai.gwt.Gadget
|
+----dtai.gwt.ContainerGadget
|
+----dtai.gwt.PanelGadget
|
+----dtai.gwt.BorderGadget
|
+----dtai.gwt.ScrollPaneGadget
|
+----dtai.gwt.ScrollGadgetGadget
- public class ScrollGadgetGadget
- extends ScrollPaneGadget
- implements ItemSelectable, ListManager
A scrolling list of text items.
-
ScrollGadgetGadget()
- Creates a new scrolling list initialized with no visible Lines or multiple selections.
-
ScrollGadgetGadget(int)
- Creates a new scrolling list initialized with the specified
number of visible lines and a boolean stating whether multiple selections are allowed or not.
-
ScrollGadgetGadget(int, boolean)
- Creates a new scrolling list prefized with the specified number
of visible lines and a boolean stating whether multiple selections
are allowed or not.
-
addActionListener(ActionListener)
- Adds the specified action listener to receive action
events from this list.
-
addGadget(Gadget)
- Adds the specified gadget to the end of scrolling list.
-
addGadget(Gadget, int)
- Adds the specified item to the scrolling list at the specified position.
-
addItemListener(ItemListener)
- Adds the specified listener to be notified when component
events occur on this component.
-
adjustmentValueChanged(AdjustmentEvent)
- adjustmentValueChanged
-
deselect(int)
- Deselects the item at the specified index.
-
doLayout()
- doLayout
-
getGadgetIndex(Gadget)
- getGadgetIndex
-
getIgnoreDefaultAction()
- getIgnoreDefaultAction
-
getListGadget(int)
- getListGadget
-
getListGadgetCount()
- Gets the number of gadgets in the list.
-
getListGadgets()
- Returns the gadgets in the list.
-
getMinimumSize(int)
- Returns the minimum dimensions needed for the amount of rows in the list.
-
getNumSelected()
- getNumSelected
-
getPreferredSize()
- getPreferredSize
-
getPreferredSize(int)
- Returns the preferred dimensions needed for the list with the specified amount of rows.
-
getRows()
- Returns the number of visible rows in this list.
-
getScrolledPreferredSize()
- getScrolledPreferredSize
-
getSelectedGadget()
- Gets the selected gadget on the list or null if no item is selected.
-
getSelectedIndex()
- Get the selected gadget on the list or -1 if no gadget is selected.
-
getSelectedIndexes()
- Gets the selected indexes on the list.
-
getSelectedItems()
- Gets the selected items on the list.
-
getTopIndex()
- Gets the index of the top item.
-
getVisibleIndex()
- Gets the index of the item that was last made visible by the method makeVisible.
-
isIndexSelected(int)
- Returns true if the item at the specified index has been selected; false otherwise.
-
isMultipleMode()
- Returns true if this list allows multiple selections.
-
makeVisible(int)
- Forces the item at the specified index to be visible.
-
moveLeft(InputEvent)
- moveLeft
-
moveRight(InputEvent)
- moveRight
-
processEvent(AWTEvent)
- processEvent
-
processItemEvent(ItemEvent)
-
-
remove(int)
- Removes an gadget from the list.
-
removeActionListener(ActionListener)
- Removes the specified action listener so it no longer
receives action events from this list.
-
removeAll()
- Removes all gadgets from the list.
-
removeGadget(Gadget)
- Remove the first occurrence of item from the list.
-
removeItemListener(ItemListener)
- Removes the specified listener so it no longer receives
item events on this item.
-
replaceGadget(Gadget, int)
- Replaces the item at the given index.
-
select(int)
- Selects the item at the specified index.
-
selectionChanged(AWTEvent, boolean)
- selectionChanged
-
setChoiceList(boolean)
- setChoiceList
-
setFocusTraversable(boolean)
- setFocusTraversable
-
setIgnoreDefaultAction(boolean)
- setIgnoreDefaultAction
-
setMultipleMode(boolean)
- Sets whether this list should allow multiple selections or not.
-
setPrefWidth(int)
- setPrefWidth
-
topChanged(int)
- topChanged
ScrollGadgetGadget
public ScrollGadgetGadget()
- Creates a new scrolling list initialized with no visible Lines or multiple selections.
ScrollGadgetGadget
public ScrollGadgetGadget(int rows)
- Creates a new scrolling list initialized with the specified
number of visible lines and a boolean stating whether multiple selections are allowed or not.
- Parameters:
- rows - - the number of items to show.
ScrollGadgetGadget
public ScrollGadgetGadget(int rows,
boolean multipleMode)
- Creates a new scrolling list prefized with the specified number
of visible lines and a boolean stating whether multiple selections
are allowed or not.
- Parameters:
- rows - - the number of items to show.
- multipleMode - - if true then multiple selections are allowed.
setChoiceList
protected void setChoiceList(boolean flag)
- setChoiceList
- Parameters:
- flag - description
getGadgetIndex
public int getGadgetIndex(Gadget gadget)
- getGadgetIndex
- Parameters:
- gadget - description
- Returns:
- int
- Overrides:
- getGadgetIndex in class ContainerGadget
getListGadgetCount
public final int getListGadgetCount()
- Gets the number of gadgets in the list.
- Returns:
- int
- See Also:
- getItem
getListGadget
public Gadget getListGadget(int row)
- getListGadget
- Parameters:
- row - description
- Returns:
- Gadget
- See Also:
- getItemCount
getListGadgets
public Gadget[] getListGadgets()
- Returns the gadgets in the list.
- Returns:
- Gadget[]
- See Also:
- select, deselect, isIndexSelected
removeAll
public void removeAll()
- Removes all gadgets from the list.
- Overrides:
- removeAll in class ContainerGadget
- See Also:
- remove, delItems
remove
public void remove(int position)
- Removes an gadget from the list.
- Parameters:
- position - description
- Overrides:
- remove in class ContainerGadget
getIgnoreDefaultAction
public boolean getIgnoreDefaultAction()
- getIgnoreDefaultAction
- Returns:
- boolean
setIgnoreDefaultAction
public void setIgnoreDefaultAction(boolean ignoreDefaultAction)
- setIgnoreDefaultAction
- Parameters:
- ignoreDefaultAction - description
getSelectedIndex
public final int getSelectedIndex()
- Get the selected gadget on the list or -1 if no gadget is selected.
- Returns:
- int
- See Also:
- select, deselect, isIndexSelected
getSelectedIndexes
public final int[] getSelectedIndexes()
- Gets the selected indexes on the list.
- Returns:
- int[]
- See Also:
- select, deselect, isIndexSelected
getNumSelected
public final int getNumSelected()
- getNumSelected
- Returns:
- numSelected
getSelectedGadget
public Gadget getSelectedGadget()
- Gets the selected gadget on the list or null if no item is selected.
- Returns:
- Gadget
- See Also:
- select, deselect, isIndexSelected
getSelectedItems
public String[] getSelectedItems()
- Gets the selected items on the list.
- Returns:
- String[]
- See Also:
- select, deselect, isIndexSelected
select
public void select(int index)
- Selects the item at the specified index.
- Parameters:
- index - - the position of the item to select
- See Also:
- getSelectedItem, deselect, isIndexSelected
deselect
public void deselect(int index)
- Deselects the item at the specified index.
- Parameters:
- index - - the position of the item to deselect
- See Also:
- select, getSelectedItem, isIndexSelected
isIndexSelected
public boolean isIndexSelected(int index)
- Returns true if the item at the specified index has been selected; false otherwise.
- Parameters:
- index - - the item to be checked
- Returns:
- boolean
- See Also:
- select, deselect
getRows
public int getRows()
- Returns the number of visible rows in this list.
- Returns:
- int
isMultipleMode
public boolean isMultipleMode()
- Returns true if this list allows multiple selections.
- Returns:
- boolean
- See Also:
- setMultipleMode
setMultipleMode
public void setMultipleMode(boolean b)
- Sets whether this list should allow multiple selections or not.
- Parameters:
- b - - the boolean to allow multiple selections
- See Also:
- isMultipleMode
getVisibleIndex
public int getVisibleIndex()
- Gets the index of the item that was last made visible by the method makeVisible.
- Returns:
- int
getTopIndex
public int getTopIndex()
- Gets the index of the top item.
- Returns:
- int
makeVisible
public void makeVisible(int index)
- Forces the item at the specified index to be visible.
- Parameters:
- index - - the position of the item
- See Also:
- getVisibleIndex
addGadget
public void addGadget(Gadget gadget)
- Adds the specified gadget to the end of scrolling list.
- Parameters:
- gadget - - the gadget to be added
addGadget
public void addGadget(Gadget gadget,
int index)
- Adds the specified item to the scrolling list at the specified position.
- Parameters:
- gadget - - the item to be added
- index - - the position at which to put in the item. The index is zero-based.
If index is -1 then the item is added to the end.
replaceGadget
public void replaceGadget(Gadget newValue,
int index)
- Replaces the item at the given index.
- Parameters:
- newValue - - the new value to replace the existing item
- index - - the position of the item to replace
removeGadget
public void removeGadget(Gadget gadget)
- Remove the first occurrence of item from the list.
Throws: IllegalArgumentException
If the item doesn't exist in the list.
- Parameters:
- gadget - - the gadget to remove from the list
getPreferredSize
public Dimension getPreferredSize(int rows)
- Returns the preferred dimensions needed for the list with the specified amount of rows.
- Parameters:
- rows - - amount of rows in list.
- Returns:
- Dimension
getMinimumSize
public Dimension getMinimumSize(int rows)
- Returns the minimum dimensions needed for the amount of rows in the list.
- Parameters:
- rows - - minimum amount of rows in the list
- Returns:
- Dimension
getPreferredSize
public Dimension getPreferredSize()
- getPreferredSize
- Returns:
- Dimension
- Overrides:
- getPreferredSize in class ScrollPaneGadget
getScrolledPreferredSize
public Dimension getScrolledPreferredSize()
- getScrolledPreferredSize
- Returns:
- Dimension
- Overrides:
- getScrolledPreferredSize in class ScrollPaneGadget
setPrefWidth
public void setPrefWidth(int prefWidth)
- setPrefWidth
- Parameters:
- prefWidth - description
doLayout
public void doLayout()
- doLayout
- Overrides:
- doLayout in class ScrollPaneGadget
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent e)
- adjustmentValueChanged
- Parameters:
- e - description
- Overrides:
- adjustmentValueChanged in class ScrollPaneGadget
addActionListener
public void addActionListener(ActionListener l)
- Adds the specified action listener to receive action
events from this list. Action events occur when a list item is double-clicked.
- Parameters:
- l - - the action listener
removeActionListener
public void removeActionListener(ActionListener l)
- Removes the specified action listener so it no longer
receives action events from this list.
- Parameters:
- l - - the action listener
addItemListener
public synchronized void addItemListener(ItemListener l)
- Adds the specified listener to be notified when component
events occur on this component.
- Parameters:
- l - the listener to receive the events
removeItemListener
public synchronized void removeItemListener(ItemListener l)
- Removes the specified listener so it no longer receives
item events on this item.
- Parameters:
- l - the listener to remove
processEvent
protected void processEvent(AWTEvent e)
- processEvent
- Parameters:
- e - a ItemEvent
- Returns:
- boolean result
- Overrides:
- processEvent in class ContainerGadget
processItemEvent
protected void processItemEvent(ItemEvent e)
selectionChanged
public void selectionChanged(AWTEvent event,
boolean selected)
- selectionChanged
- Parameters:
- event - description
- selected - description
moveLeft
public void moveLeft(InputEvent event)
- moveLeft
- Parameters:
- event - description
moveRight
public void moveRight(InputEvent event)
- moveRight
- Parameters:
- event - description
topChanged
public void topChanged(int topIndex)
- topChanged
- Parameters:
- topIndex - description
setFocusTraversable
public void setFocusTraversable(boolean in)
- setFocusTraversable
- Parameters:
- in - description
All Packages Class Hierarchy This Package Previous Next Index