com.arsdigita.toolbox.rebop
Class GenericList

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended bycom.arsdigita.toolbox.rebop.GenericComponent
              extended bycom.arsdigita.toolbox.rebop.GenericList
All Implemented Interfaces:
ActionListener, AdjustmentListener, EventListener, GenericDrawable, ImageObserver, ItemSelectable, MenuContainer, MouseListener, Serializable

public class GenericList
extends GenericComponent
implements AdjustmentListener, ActionListener, ItemSelectable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.arsdigita.toolbox.rebop.GenericDrawable
versionId
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GenericList()
           
GenericList(int bevelSize)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void add(Image icon, String itemLabel, String itemText, Object userData)
           
 void add(String itemLabel)
           
 void add(String itemLabel, String itemText, Object userData)
           
 void addItemListener(ItemListener l)
          Add a listener to recieve item events when the state of an item changes.
 void addNotify()
          Called when the native peer is available, Double-buffer image is automatically created if required.
 void adjustmentValueChanged(AdjustmentEvent e)
           
 void clear()
           
protected  void draw(Graphics g)
          Draw this component to a Graphics context.
 Image getDefaultItemIcon()
           
 Font getFont()
           
 GenericListItem getItemAt(int index)
           
 int getItemCount()
           
 GenericDrawable getItemDownDrawable()
           
 GenericDrawable getItemOverDrawable()
           
 GenericDrawable getItemUpDrawable()
           
 GenericListItem getLastComponent()
           
 int getMaxItems()
           
 int getSelectedIndex()
           
 Object[] getSelectedObjects()
          Returns the selected items or null if no items are selected.
 Object getUserDataAt(int itemIndex)
           
 int getUserDataIndex(Object userData)
           
protected  GenericListItem makeListItem(Image icon, String itemLabel, String itemText, Object userData)
           
protected  void processItemStateChanged(ItemEvent e)
           
 void remove(int itemIndexParam)
           
 void removeElementAtUserData(Object userData)
           
 void removeItemListener(ItemListener l)
           
 void reshape(int x, int y, int width, int height)
          Called whenever a component is resized.
 void resize(Dimension size)
           
 void setBounds(int x, int y, int width, int height)
          Called whenever a component is resized.
 void setColors(Color unselectedColor, Color selectedColor)
           
 void setDefaultItemIcon(Image icon)
           
 void setFont(Font itemFont)
           
 void setItemDownDrawable(GenericDrawable downDrawable)
           
 void setItemOverDrawable(GenericDrawable overDrawable)
           
 void setItemUpDrawable(GenericDrawable upDrawable)
           
 void setLabelColor(Color color)
           
 void setMaxItems(int max)
           
 void setRolloverLabelColor(Color color)
           
 void setRolloverTextColor(Color color)
           
 void setSelectedLabelColor(Color color)
           
 void setSelectedTextColor(Color color)
           
 void setTextColor(Color color)
           
 void showVerticalScrollbar(boolean visible, int pageIncrement)
           
 void update(Graphics g)
           
 
Methods inherited from class com.arsdigita.toolbox.rebop.GenericComponent
componentReshape, draw, drawDebug, forceInvalid, getDebugPaint, getDoubleBuffered, getDrawable, getXOffset, getYOffset, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, setDebugPaint, setDoubleBuffered, setDrawable, setXOffset, setYOffset, validateTree
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericList

public GenericList()

GenericList

public GenericList(int bevelSize)
Method Detail

draw

protected void draw(Graphics g)
Description copied from class: GenericComponent
Draw this component to a Graphics context. Subclasses should override this method rather than paint() for custom drawing.

Overrides:
draw in class GenericComponent
Parameters:
g - Graphics to draw in

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
Description copied from class: GenericComponent
Called whenever a component is resized. Recreate the back buffer if necessary. This is a deprecated method, but it is the "root" method of all the awt component methods that change the size of a component (at least up through the JDK 1.3.1x) and overriding this method prevents having to override many others. Whenever this changes, this method can be removed as setBounds() will take care of things.

Overrides:
reshape in class GenericComponent
Parameters:
x - new x coordinate
y - new y coordinate
width - new width
height - new height

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Description copied from class: GenericComponent
Called whenever a component is resized. Recreate the back buffer if necessary.

Overrides:
setBounds in class GenericComponent
Parameters:
x - new x coordinate
y - new y coordinate
width - new width
height - new height

setFont

public void setFont(Font itemFont)

getFont

public Font getFont()
Specified by:
getFont in interface MenuContainer

setTextColor

public void setTextColor(Color color)

setSelectedTextColor

public void setSelectedTextColor(Color color)

setRolloverTextColor

public void setRolloverTextColor(Color color)

setLabelColor

public void setLabelColor(Color color)

setSelectedLabelColor

public void setSelectedLabelColor(Color color)

setRolloverLabelColor

public void setRolloverLabelColor(Color color)

setItemUpDrawable

public void setItemUpDrawable(GenericDrawable upDrawable)

getItemUpDrawable

public GenericDrawable getItemUpDrawable()

setItemDownDrawable

public void setItemDownDrawable(GenericDrawable downDrawable)

getItemDownDrawable

public GenericDrawable getItemDownDrawable()

setItemOverDrawable

public void setItemOverDrawable(GenericDrawable overDrawable)

getItemOverDrawable

public GenericDrawable getItemOverDrawable()

addNotify

public void addNotify()
Description copied from class: GenericComponent
Called when the native peer is available, Double-buffer image is automatically created if required.

Overrides:
addNotify in class GenericComponent

resize

public void resize(Dimension size)

update

public void update(Graphics g)

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

adjustmentValueChanged

public void adjustmentValueChanged(AdjustmentEvent e)
Specified by:
adjustmentValueChanged in interface AdjustmentListener

setDefaultItemIcon

public void setDefaultItemIcon(Image icon)

getDefaultItemIcon

public Image getDefaultItemIcon()

setMaxItems

public void setMaxItems(int max)

getMaxItems

public int getMaxItems()

clear

public void clear()

removeElementAtUserData

public void removeElementAtUserData(Object userData)

getUserDataIndex

public int getUserDataIndex(Object userData)

getUserDataAt

public Object getUserDataAt(int itemIndex)

remove

public void remove(int itemIndexParam)

getSelectedIndex

public int getSelectedIndex()

setColors

public void setColors(Color unselectedColor,
                      Color selectedColor)

add

public void add(String itemLabel)

add

public void add(String itemLabel,
                String itemText,
                Object userData)

makeListItem

protected GenericListItem makeListItem(Image icon,
                                       String itemLabel,
                                       String itemText,
                                       Object userData)

add

public void add(Image icon,
                String itemLabel,
                String itemText,
                Object userData)

getItemAt

public GenericListItem getItemAt(int index)

getLastComponent

public GenericListItem getLastComponent()

showVerticalScrollbar

public void showVerticalScrollbar(boolean visible,
                                  int pageIncrement)

addItemListener

public void addItemListener(ItemListener l)
Add a listener to recieve item events when the state of an item changes.

Specified by:
addItemListener in interface ItemSelectable

getSelectedObjects

public Object[] getSelectedObjects()
Returns the selected items or null if no items are selected.

Specified by:
getSelectedObjects in interface ItemSelectable

removeItemListener

public void removeItemListener(ItemListener l)
Specified by:
removeItemListener in interface ItemSelectable

getItemCount

public int getItemCount()

processItemStateChanged

protected void processItemStateChanged(ItemEvent e)


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC