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.


Constructor Index

 o ScrollGadgetGadget()
Creates a new scrolling list initialized with no visible Lines or multiple selections.
 o 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.
 o 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.

Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from this list.
 o addGadget(Gadget)
Adds the specified gadget to the end of scrolling list.
 o addGadget(Gadget, int)
Adds the specified item to the scrolling list at the specified position.
 o addItemListener(ItemListener)
Adds the specified listener to be notified when component events occur on this component.
 o adjustmentValueChanged(AdjustmentEvent)
adjustmentValueChanged
 o deselect(int)
Deselects the item at the specified index.
 o doLayout()
doLayout
 o getGadgetIndex(Gadget)
getGadgetIndex
 o getIgnoreDefaultAction()
getIgnoreDefaultAction
 o getListGadget(int)
getListGadget
 o getListGadgetCount()
Gets the number of gadgets in the list.
 o getListGadgets()
Returns the gadgets in the list.
 o getMinimumSize(int)
Returns the minimum dimensions needed for the amount of rows in the list.
 o getNumSelected()
getNumSelected
 o getPreferredSize()
getPreferredSize
 o getPreferredSize(int)
Returns the preferred dimensions needed for the list with the specified amount of rows.
 o getRows()
Returns the number of visible rows in this list.
 o getScrolledPreferredSize()
getScrolledPreferredSize
 o getSelectedGadget()
Gets the selected gadget on the list or null if no item is selected.
 o getSelectedIndex()
Get the selected gadget on the list or -1 if no gadget is selected.
 o getSelectedIndexes()
Gets the selected indexes on the list.
 o getSelectedItems()
Gets the selected items on the list.
 o getTopIndex()
Gets the index of the top item.
 o getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.
 o isIndexSelected(int)
Returns true if the item at the specified index has been selected; false otherwise.
 o isMultipleMode()
Returns true if this list allows multiple selections.
 o makeVisible(int)
Forces the item at the specified index to be visible.
 o moveLeft(InputEvent)
moveLeft
 o moveRight(InputEvent)
moveRight
 o processEvent(AWTEvent)
processEvent
 o processItemEvent(ItemEvent)
 o remove(int)
Removes an gadget from the list.
 o removeActionListener(ActionListener)
Removes the specified action listener so it no longer receives action events from this list.
 o removeAll()
Removes all gadgets from the list.
 o removeGadget(Gadget)
Remove the first occurrence of item from the list.
 o removeItemListener(ItemListener)
Removes the specified listener so it no longer receives item events on this item.
 o replaceGadget(Gadget, int)
Replaces the item at the given index.
 o select(int)
Selects the item at the specified index.
 o selectionChanged(AWTEvent, boolean)
selectionChanged
 o setChoiceList(boolean)
setChoiceList
 o setFocusTraversable(boolean)
setFocusTraversable
 o setIgnoreDefaultAction(boolean)
setIgnoreDefaultAction
 o setMultipleMode(boolean)
Sets whether this list should allow multiple selections or not.
 o setPrefWidth(int)
setPrefWidth
 o topChanged(int)
topChanged

Constructors

 o ScrollGadgetGadget
 public ScrollGadgetGadget()
Creates a new scrolling list initialized with no visible Lines or multiple selections.

 o 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.
 o 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.

Methods

 o setChoiceList
 protected void setChoiceList(boolean flag)
setChoiceList

Parameters:
flag - description
 o getGadgetIndex
 public int getGadgetIndex(Gadget gadget)
getGadgetIndex

Parameters:
gadget - description
Returns:
int
Overrides:
getGadgetIndex in class ContainerGadget
 o getListGadgetCount
 public final int getListGadgetCount()
Gets the number of gadgets in the list.

Returns:
int
See Also:
getItem
 o getListGadget
 public Gadget getListGadget(int row)
getListGadget

Parameters:
row - description
Returns:
Gadget
See Also:
getItemCount
 o getListGadgets
 public Gadget[] getListGadgets()
Returns the gadgets in the list.

Returns:
Gadget[]
See Also:
select, deselect, isIndexSelected
 o removeAll
 public void removeAll()
Removes all gadgets from the list.

Overrides:
removeAll in class ContainerGadget
See Also:
remove, delItems
 o remove
 public void remove(int position)
Removes an gadget from the list.

Parameters:
position - description
Overrides:
remove in class ContainerGadget
 o getIgnoreDefaultAction
 public boolean getIgnoreDefaultAction()
getIgnoreDefaultAction

Returns:
boolean
 o setIgnoreDefaultAction
 public void setIgnoreDefaultAction(boolean ignoreDefaultAction)
setIgnoreDefaultAction

Parameters:
ignoreDefaultAction - description
 o 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
 o getSelectedIndexes
 public final int[] getSelectedIndexes()
Gets the selected indexes on the list.

Returns:
int[]
See Also:
select, deselect, isIndexSelected
 o getNumSelected
 public final int getNumSelected()
getNumSelected

Returns:
numSelected
 o 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
 o getSelectedItems
 public String[] getSelectedItems()
Gets the selected items on the list.

Returns:
String[]
See Also:
select, deselect, isIndexSelected
 o 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
 o 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
 o 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
 o getRows
 public int getRows()
Returns the number of visible rows in this list.

Returns:
int
 o isMultipleMode
 public boolean isMultipleMode()
Returns true if this list allows multiple selections.

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

Returns:
int
 o getTopIndex
 public int getTopIndex()
Gets the index of the top item.

Returns:
int
 o 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
 o addGadget
 public void addGadget(Gadget gadget)
Adds the specified gadget to the end of scrolling list.

Parameters:
gadget - - the gadget to be added
 o 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.
 o 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
 o 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
 o 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
 o 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
 o getPreferredSize
 public Dimension getPreferredSize()
getPreferredSize

Returns:
Dimension
Overrides:
getPreferredSize in class ScrollPaneGadget
 o getScrolledPreferredSize
 public Dimension getScrolledPreferredSize()
getScrolledPreferredSize

Returns:
Dimension
Overrides:
getScrolledPreferredSize in class ScrollPaneGadget
 o setPrefWidth
 public void setPrefWidth(int prefWidth)
setPrefWidth

Parameters:
prefWidth - description
 o doLayout
 public void doLayout()
doLayout

Overrides:
doLayout in class ScrollPaneGadget
 o adjustmentValueChanged
 public void adjustmentValueChanged(AdjustmentEvent e)
adjustmentValueChanged

Parameters:
e - description
Overrides:
adjustmentValueChanged in class ScrollPaneGadget
 o 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
 o 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
 o 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
 o 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
 o processEvent
 protected void processEvent(AWTEvent e)
processEvent

Parameters:
e - a ItemEvent
Returns:
boolean result
Overrides:
processEvent in class ContainerGadget
 o processItemEvent
 protected void processItemEvent(ItemEvent e)
 o selectionChanged
 public void selectionChanged(AWTEvent event,
                              boolean selected)
selectionChanged

Parameters:
event - description
selected - description
 o moveLeft
 public void moveLeft(InputEvent event)
moveLeft

Parameters:
event - description
 o moveRight
 public void moveRight(InputEvent event)
moveRight

Parameters:
event - description
 o topChanged
 public void topChanged(int topIndex)
topChanged

Parameters:
topIndex - description
 o setFocusTraversable
 public void setFocusTraversable(boolean in)
setFocusTraversable

Parameters:
in - description

All Packages  Class Hierarchy  This Package  Previous  Next  Index