Diamond Control Suite 3.0

diamondedge.swing
Class DsIconList

java.lang.Object
  extended by java.awt.Component
      extended by diamondedge.swing.DsIconList
All Implemented Interfaces:
IconList, ImageObserver, MenuContainer, Serializable

public class DsIconList
extends Component
implements IconList

Contains a collection of Icon objects, each of which can be referred to by its index or key.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, 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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DsIconList()
           
 
Method Summary
 void add(Icon icon)
          Appends the Icon to the list.
 void add(int index, String key, Icon icon)
          Adds the Icon to the list at the given position and set its key.
 void add(int index, String key, Image image)
          Adds an ImageIcon for the Image to the list at the given position and set its key.
 void add(String key, Icon icon)
          Appends the Icon to the list and set its key.
 void clear()
          Removes all Icons from the list.
 Icon getIcon(int index)
          Returns the Icon at the given position in the list.
static Icon getIcon(Object indexOrKeyOrIcon, IconList iconList)
          Returns an Icon from the icons loaded into the IconList.
 Icon getIcon(String key)
          Returns the Icon for the given key.
 int getIconCount()
          Returns the number Icons in the list.
 void remove(int index)
          Removes the Icon at the given position from the list.
 void remove(String key)
          Removes the Icon with the given key from the list.
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DsIconList

public DsIconList()
Method Detail

getIcon

public Icon getIcon(int index)
Returns the Icon at the given position in the list.

Specified by:
getIcon in interface IconList

getIcon

public Icon getIcon(String key)
Returns the Icon for the given key.

Specified by:
getIcon in interface IconList

getIcon

public static Icon getIcon(Object indexOrKeyOrIcon,
                           IconList iconList)
Returns an Icon from the icons loaded into the IconList. The indexOrKeyOrIcon can be a Number, String, Icon or Image. If the argument indexOrKeyOrIcon is an instanceof Number then is used as the index in icons loaded in iconList. If indexOrKeyOrIcon is a String then it is used as the key into the iconList.


getIconCount

public int getIconCount()
Returns the number Icons in the list.


add

public void add(Icon icon)
         throws IndexOutOfBoundsException
Appends the Icon to the list.

Throws:
IndexOutOfBoundsException

add

public void add(String key,
                Icon icon)
         throws IndexOutOfBoundsException
Appends the Icon to the list and set its key.

Throws:
IndexOutOfBoundsException

add

public void add(int index,
                String key,
                Icon icon)
         throws IndexOutOfBoundsException
Adds the Icon to the list at the given position and set its key.

Throws:
IndexOutOfBoundsException

add

public void add(int index,
                String key,
                Image image)
         throws IndexOutOfBoundsException
Adds an ImageIcon for the Image to the list at the given position and set its key.

Throws:
IndexOutOfBoundsException

remove

public void remove(int index)
Removes the Icon at the given position from the list.


remove

public void remove(String key)
Removes the Icon with the given key from the list.


clear

public void clear()
Removes all Icons from the list.


Diamond Control Suite 3.0

Diamond Edge and Diamond Control Suite are trademarks or registered trademarks of Diamond Edge, Inc. Copyright 1999-2005 Diamond Edge, Inc. All Rights Reserved.