Diamond Control Suite 3.0

diamondedge.swing
Class DsListViewItem

java.lang.Object
  extended by diamondedge.swing.DsListItem
      extended by diamondedge.swing.DsListViewItem

public class DsListViewItem
extends DsListItem

An item in a DsListView control that contains the index of icons associated with it, text, and an array of strings representing subitems that are displayed in the details view.


Field Summary
 
Fields inherited from class diamondedge.swing.DsListItem
lastItemAdded, smallIcon, values
 
Method Summary
 boolean ensureVisible()
          Ensures a ListItem object is visible, scrolling the control if necessary.
 int getColumnCount()
          Returns the number of columns of values in the DsListItem.
 int getIndex()
          Returns the index of this DsListItem with in the DsListView
 Object getLargeIcon()
          Returns the icon or the index/key of the icon that is used in the LARGE_ICON view.
 Icon getLargeIcon(IconList iconList)
          Returns the icon that is used in the LARGE_ICON view.
 boolean isChecked()
          Returns a value that determines whether a DsListItem object is checked.
 boolean isSelected()
          Returns a value which determines if a DsListItem object is selected.
 void loadData()
          Load data from the object stored in setData() into each cell.
 void setChecked(boolean checked)
          Sets a value that determines whether a DsListItem object is checked.
 void setLargeIcon(Object indexOrKeyOrIcon)
          Sets the index (Integer) or key (String) of an icon used in the LARGE_ICON view.
 void setSelected(boolean selected)
          Sets a value which determines if a DsListItem object is selected.
 
Methods inherited from class diamondedge.swing.DsListItem
addCell, createListCell, getCell, getCell, getCellValue, getData, getForeground, getKey, getSmallIcon, getSmallIcon, getText, getValue, indexOf, indexOf, isFontBold, removeCell, setCellValue, setData, setFontBold, setForeground, setKey, setSmallIcon, setText, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

loadData

public void loadData()
Load data from the object stored in setData() into each cell. If the object is an instanceof DsListViewObject then all columns and icons are populated. Otherwise just the first cell (label) is set.

Overrides:
loadData in class DsListItem

getLargeIcon

public Icon getLargeIcon(IconList iconList)
Returns the icon that is used in the LARGE_ICON view.

Parameters:
iconList - List of icons used if the stored value was actually a String or Integer which represents the index into the icon list

getLargeIcon

public Object getLargeIcon()
Returns the icon or the index/key of the icon that is used in the LARGE_ICON view. The small icon is used in all views except the LARGE_ICON view.

See Also:
DsListItem.getSmallIcon(diamondedge.swing.IconList)

setLargeIcon

public void setLargeIcon(Object indexOrKeyOrIcon)
Sets the index (Integer) or key (String) of an icon used in the LARGE_ICON view. Can also be an Icon or Image. The small icon is used in all views except the LARGE_ICON view.

See Also:
DsListItem.setSmallIcon(java.lang.Object)

getIndex

public int getIndex()
Returns the index of this DsListItem with in the DsListView


isSelected

public boolean isSelected()
Returns a value which determines if a DsListItem object is selected.


setSelected

public void setSelected(boolean selected)
Sets a value which determines if a DsListItem object is selected.


isChecked

public boolean isChecked()
Returns a value that determines whether a DsListItem object is checked.


setChecked

public void setChecked(boolean checked)
Sets a value that determines whether a DsListItem object is checked.


getColumnCount

public int getColumnCount()
Returns the number of columns of values in the DsListItem.


ensureVisible

public boolean ensureVisible()
Ensures a ListItem object is visible, scrolling the control if necessary.


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.