org.gnu.gnome
Class IconList

java.lang.Object
  |
  +--org.gnu.glib.GObject
        |
        +--org.gnu.gtk.GtkObject
              |
              +--org.gnu.gtk.Widget
                    |
                    +--org.gnu.gtk.Container
                          |
                          +--org.gnu.gtk.Layout
                                |
                                +--org.gnu.gnome.Canvas
                                      |
                                      +--org.gnu.gnome.IconList

public class IconList
extends Canvas


Constructor Summary
IconList(int handle)
          Construct a new IconList from a handle to a native resource.
IconList(int iconWidth, Adjustment adj, boolean isEditable, boolean isStaticText)
          Construct a new IconList object.
 
Method Summary
 void append(java.lang.String iconFilename, java.lang.String text)
          Append an icon to the end of the list.
 void clear()
          Remove all icons from this list.
 void freeze()
          Avoid excessive recomputes during insertion and deletion.
 java.lang.String getIconFilename(int pos)
          Retrieve the filename for an icon in the list.
 int getNumIcons()
          Get the number of icons in this list
 SelectionMode getSelectionMode()
          Retrieve the selection mode for this icon list.
static Type getType()
          Retrieve the runtime type used by the GLib library.
 void insert(int pos, java.lang.String iconFilename, java.lang.String text)
          Insert an icon into this list.
 void remove(int pos)
          Remove an icon from this list.
 void selectIcon(int pos)
          Select an icon in the list.
 void setColumnSpacing(int pixels)
          Set the column spacing for the list.
 void setIconBorderWidth(int pixels)
          Set the icon border for the list.
 void setIconWidth(int width)
          Set the icon width for the list.
 void setRowSpacing(int pixels)
          Set the row spacing for the list.
 void setSelectionMode(SelectionMode mode)
          Set the selection mode for this icon list.
 void setSeparators(java.lang.String sep)
          Set the text that serves as the separator for this list.
 void setTextSpacing(int pixels)
          Set the text spacing for the list.
 void thaw()
          Thaw a previous frozen list.
 void unselectAll()
          Unselect all icons in the list.
 void unselectIcon(int pos)
          Unselect an icon in the list.
 
Methods inherited from class org.gnu.gnome.Canvas
getColor, getColorPixel, getCurrentCanvasItem, getDither, getFocusedCanvasItem, getGrabbedCanvasItem, getItemAt, getPixelsPerUnit, getRoot, getScrollOffsetX, getScrollOffsetY, getScrollX1, getScrollX2, getScrollY1, getScrollY2, scrollTo, setDither, setPixelsPerUnit, setScrollRegion, setScrollX1, setScrollX2, setScrollY1, setScrollY2, update
 
Methods inherited from class org.gnu.gtk.Layout
addChild, getHorizontalAdjustment, getSize, getVerticalAdjustment, moveChild, setHorizontalAdjustment, setSize, setVerticalAdjustment
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBorderWidth, getEventListenerClass, getEventType, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addListener, addListener, addListener, addListener, addListener, addListener, createContext, createLayout, destroy, draw, drawArea, drawArea, getAccessible, getColormap, getContext, getModifierStyle, getName, getParent, getParentWindow, getPointer, getSensitive, getStyle, getToplevel, grabDefault, grabFocus, hasFocus, hide, hideAll, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragSource, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconList

public IconList(int iconWidth,
                Adjustment adj,
                boolean isEditable,
                boolean isStaticText)
Construct a new IconList object.


IconList

public IconList(int handle)
Construct a new IconList from a handle to a native resource.

Method Detail

freeze

public void freeze()
Avoid excessive recomputes during insertion and deletion. You should call thaw once the activity is complete.


thaw

public void thaw()
Thaw a previous frozen list.


insert

public void insert(int pos,
                   java.lang.String iconFilename,
                   java.lang.String text)
Insert an icon into this list.

Parameters:
pos - The position for the insertion.
iconFilename - The file name for the icon to insert.
text - The text to display below the icon.

append

public void append(java.lang.String iconFilename,
                   java.lang.String text)
Append an icon to the end of the list.

Parameters:
iconFilename - The file name for the icon to insert.
text - The text to display below the icon.

remove

public void remove(int pos)
Remove an icon from this list.

Parameters:
pos - The position of the icon to remove

clear

public void clear()
Remove all icons from this list.


getNumIcons

public int getNumIcons()
Get the number of icons in this list

Returns:
The number of icons in this list.

setSelectionMode

public void setSelectionMode(SelectionMode mode)
Set the selection mode for this icon list.

Parameters:
mode - The selection mode for this list.

getSelectionMode

public SelectionMode getSelectionMode()
Retrieve the selection mode for this icon list.

Returns:
The selection mode for this list.

selectIcon

public void selectIcon(int pos)
Select an icon in the list.

Parameters:
pos - The position of the icon to select.

unselectIcon

public void unselectIcon(int pos)
Unselect an icon in the list.

Parameters:
pos - The position of the icon to unselect.

unselectAll

public void unselectAll()
Unselect all icons in the list.


setIconWidth

public void setIconWidth(int width)
Set the icon width for the list.

Parameters:
width - The width for icons in the list.

setRowSpacing

public void setRowSpacing(int pixels)
Set the row spacing for the list.

Parameters:
pixels - The row spacing for the list.

setColumnSpacing

public void setColumnSpacing(int pixels)
Set the column spacing for the list.

Parameters:
pixels - The column spacing for the list.

setTextSpacing

public void setTextSpacing(int pixels)
Set the text spacing for the list.

Parameters:
pixels - The text spacing for the list

setIconBorderWidth

public void setIconBorderWidth(int pixels)
Set the icon border for the list.

Parameters:
pixels - The amount of pixels that surround the icons in the list.

setSeparators

public void setSeparators(java.lang.String sep)
Set the text that serves as the separator for this list. TODO: I don't completely understand this method. Better javadocs are needed.


getIconFilename

public java.lang.String getIconFilename(int pos)
Retrieve the filename for an icon in the list.

Parameters:
pos - The position of the icon to retrieve the filename.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.


Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net