org.gnu.gnome

Class IconList


public class IconList
extends Canvas

See Also:
org.gnu.gtk.IconView

Constructor Summary

IconList(Handle 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(String iconFilename, 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.
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, String iconFilename, String text)
Insert an icon into this list.
void
remove(int pos)
Remove an icon from this list.
void
selectAll()
Select all icons in the 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(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

getCanvas, getCenterScrollRegion, getColor, getColorPixel, getCurrentCanvasItem, getDither, getFocusedCanvasItem, getGrabbedCanvasItem, getItemAt, getPixelsPerUnit, getRoot, getScrollOffsetX, getScrollOffsetY, getScrollX1, getScrollX2, getScrollY1, getScrollY2, getType, requestRedraw, scrollTo, setCenterScrollRegion, setDither, setPixelsPerUnit, setScrollRegion, setScrollX1, setScrollX2, setScrollY1, setScrollY2, update, windowToWorldX, windowToWorldY, worldToWindowX, worldToWindowY

Constructor Details

IconList

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

IconList

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

Method Details

append

public void append(String iconFilename,
                   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.

clear

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

freeze

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

getIconFilename

public String getIconFilename(int pos)
Retrieve the filename for an icon in the list.
Parameters:
pos - The position of the icon to retrieve the filename.

getNumIcons

public int getNumIcons()
Get the number of icons in this list
Returns:
The number of icons in this list.

getSelectionMode

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

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.
Overrides:
getType in interface Canvas

insert

public void insert(int pos,
                   String iconFilename,
                   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.

remove

public void remove(int pos)
Remove an icon from this list.
Parameters:
pos - The position of the icon to remove

selectAll

public void selectAll()
Select all icons in the list.

selectIcon

public void selectIcon(int pos)
Select an icon in the list.
Parameters:
pos - The position of the icon to select.

setColumnSpacing

public void setColumnSpacing(int pixels)
Set the column spacing for the list.
Parameters:
pixels - The column 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.

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.

setSelectionMode

public void setSelectionMode(SelectionMode mode)
Set the selection mode for this icon list.
Parameters:
mode - The selection mode for this list.

setSeparators

public void setSeparators(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.

setTextSpacing

public void setTextSpacing(int pixels)
Set the text spacing for the list.
Parameters:
pixels - The text spacing for the list

thaw

public void thaw()
Thaw a previous frozen list.

unselectAll

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

unselectIcon

public void unselectIcon(int pos)
Unselect an icon in the list.
Parameters:
pos - The position of the icon to unselect.