|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.IconView
public class IconView
Constructor Summary | |
---|---|
IconView()
Create a new IconView |
|
IconView(org.gnu.glib.Handle handle)
Create a new IconView with a handle to a native resource returned from a call to the native libraries. |
|
IconView(TreeModel model)
Create a new IconView specifying the model. |
Method Summary | |
---|---|
void |
addListener(IconViewListener listener)
Register an object to handle IconView events. |
CellRenderer |
getCellRendererAtPosition(int x,
int y)
Finds the cell at the point (x,y), relative to widget coordinates. |
int |
getColumns()
Returns the number of columns for this IconView. |
int |
getColumnSpacing()
|
CellRenderer |
getCursorCellRenderer()
Returns the current cursor cell. |
TreePath |
getCursorPath()
Returns the current cursor path. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
static IconView |
getIconView(org.gnu.glib.Handle handle)
Internal static factory method to be used by Java-Gnome only. |
int |
getItemWidth()
Returns the width of each item. |
int |
getMargin()
|
int |
getMarkupColumn()
Returns the column with markup text for this IconView. |
TreeModel |
getModel()
Returns the model that the IconView is using. |
Orientation |
getOrientation()
Returns the Orientation for this IconView. |
TreePath |
getPathAtPosition(int x,
int y)
Find the path at the point (x,y) relative to widget coordinates. |
int |
getPixbufColumn()
Returns the column with Pixbufs for this IconView. |
boolean |
getReorderable()
Retrieves whether the user can reorder the list via drag-and-drop. |
int |
getRowSpacing()
|
TreePath[] |
getSelectedItems()
Returns an array of all selected paths. |
SelectionMode |
getSelectionMode()
Returns the selection mode for this IconView. |
int |
getSpacing()
|
int |
getTextColumn()
Returns the column with text fro this IconView. |
void |
itemActivated(TreePath path)
Activate the item specified by path. |
boolean |
pathIsSelected(TreePath path)
returns true if the path is currently selected. |
void |
removeListener(IconViewListener listener)
Removes a listener. |
void |
selectAll()
Selects all of the icons. |
void |
selectPath(TreePath path)
Selects the row at the specified path. |
void |
setColumns(int columns)
Set the number of columns for this IconView. |
void |
setColumnSpacing(int columnSpacing)
|
void |
setCursor(TreePath path,
CellRenderer renderer,
boolean startEditing)
Sets the current keyboard focus to be at path, and selects it. |
void |
setItemWidth(int width)
Sets the width of each item. |
void |
setMargin(int margin)
|
void |
setMarkupColumn(int column)
Sets the column with markup information for this IconView to be the specified column. |
void |
setModel(TreeModel model)
Sets the model for this IconView. |
void |
setOrientation(Orientation orientation)
Sets the orientation of this IconView which determines whether the labels are drawn beside instead of below the icons. |
void |
setPixbufColumn(int column)
Sets the column with Pixbufs for this IconView to be the specified column. |
void |
setReorderable(boolean reorderable)
Convenience method that allows the caller to set whether models that support TreeDragSource and TreeDragDest should be
reorderable by the users. |
void |
setRowSpacing(int rowSpacing)
|
void |
setSelectionMode(SelectionMode mode)
Sets the selection mode for this IconView. |
void |
setSpacing(int spacing)
|
void |
setTextColumn(int column)
Sets the column with text for this IconView to be the specified column. |
void |
unselectAll()
Unselects all of the icons. |
void |
unselectPath(TreePath path)
Unselects the row at the specified path. |
Methods inherited from class org.gnu.gtk.Container |
---|
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getIntChildProperty, getResizeMode, getType, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IconView()
public IconView(TreeModel model)
model
- public IconView(org.gnu.glib.Handle handle)
handle
- The handle that represents a pointer to a native resource.Method Detail |
---|
public static IconView getIconView(org.gnu.glib.Handle handle)
public void setModel(TreeModel model)
model
- public TreeModel getModel()
public void setTextColumn(int column)
column
- public int getTextColumn()
public void setMarkupColumn(int column)
setTextColumn
column
- public int getMarkupColumn()
public void setPixbufColumn(int column)
column
- public int getPixbufColumn()
public void setOrientation(Orientation orientation)
orientation
- public Orientation getOrientation()
public void setColumns(int columns)
columns
- public int getColumns()
public void setItemWidth(int width)
width
- public int getItemWidth()
public void setSpacing(int spacing)
spacing
- public int getSpacing()
public void setRowSpacing(int rowSpacing)
rowSpacing
- public int getRowSpacing()
public void setColumnSpacing(int columnSpacing)
columnSpacing
- public int getColumnSpacing()
public void setMargin(int margin)
margin
- public int getMargin()
public void setReorderable(boolean reorderable)
TreeDragSource
and TreeDragDest
should be
reorderable by the users. Both TreeStore
and ListStore
support these.
If reorderable
is true
, then the user can
reorder the model by dragging and dropping rows. Those interested in
notification when these changes take place should add a TreeModelListener
to the model, and listen to TreeModelEvents of type ROW_INSERTED and
ROW_DELETED.
This method does not give any degree of control over the order -- any reordering is allowed. If more control is needed, drag and drop should be handled manually.
reorderable
- if the list of items can be reordered.public boolean getReorderable()
true
if the list can be reordered.public TreePath getPathAtPosition(int x, int y)
x
- y
- public void setSelectionMode(SelectionMode mode)
mode
- public SelectionMode getSelectionMode()
public void selectPath(TreePath path)
path
- public void unselectPath(TreePath path)
path
- public boolean pathIsSelected(TreePath path)
path
- public TreePath[] getSelectedItems()
public void selectAll()
public void unselectAll()
public void itemActivated(TreePath path)
path
- public void setCursor(TreePath path, CellRenderer renderer, boolean startEditing)
Due to a bug in gtk+, calling this method will cause the virtual machine to crash (because of a segmentation fault) if the CellRenderer is not a part of this IconView and startEditing is set to true. This issue is fixed in gtk+ 2.8.17 and higher and will cause an assertion failure instead (which does not crash the virtual machine).
path
- A TreePathrenderer
- A CellRenderer of this IconView or nullstartEditing
- true if the specified cell should start being edited.
java.lang.IllegalArgumentException
- If renderer is null and startEditing is truepublic TreePath getCursorPath()
public CellRenderer getCursorCellRenderer()
public CellRenderer getCellRendererAtPosition(int x, int y)
x
- The x position to be identified.y
- The y position to be identified.
public void addListener(IconViewListener listener)
IconViewListener
public void removeListener(IconViewListener listener)
addListener(IconViewListener)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Container
public EventType getEventType(java.lang.String signal)
getEventType
in class Container
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |