public class GalleryItem
extends org.eclipse.swt.widgets.Item
Instances of this class represent a selectable user interface object that represents an item in a gallery.
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT.
Gallery
Constructor | Description |
---|---|
GalleryItem(GalleryItem parent,
int style) |
|
GalleryItem(GalleryItem parent,
int style,
int index) |
|
GalleryItem(Gallery parent,
int style) |
|
GalleryItem(Gallery parent,
int style,
int index) |
Modifier and Type | Method | Description |
---|---|---|
void |
_setExpanded(boolean expanded,
boolean redraw) |
|
void |
clear() |
Reset item values to defaults.
|
void |
clearAll() |
|
void |
clearAll(boolean all) |
|
void |
deselectAll() |
Deselect all children of this item
|
void |
dispose() |
|
org.eclipse.swt.graphics.Color |
getBackground() |
Returns the receiver's background color.
|
org.eclipse.swt.graphics.Color |
getBackground(boolean itemOnly) |
Returns the receiver's background color.
|
org.eclipse.swt.graphics.Rectangle |
getBounds() |
Return the current bounds of the item.
|
java.lang.String |
getDescription() |
Deprecated.
|
org.eclipse.swt.graphics.Font |
getFont() |
|
org.eclipse.swt.graphics.Font |
getFont(boolean itemOnly) |
|
org.eclipse.swt.graphics.Color |
getForeground() |
Returns the receiver's foreground color.
|
org.eclipse.swt.graphics.Color |
getForeground(boolean itemOnly) |
Returns the receiver's foreground color.
|
GalleryItem |
getItem(int index) |
Searches the receiver's list starting at the first item (index 0) until
an item is found that is equal to the argument, and returns the index of
that item.
|
int |
getItemCount() |
Returns the number of items contained in the receiver that are direct
item children of the receiver.
|
GalleryItem[] |
getItems() |
|
Gallery |
getParent() |
|
GalleryItem |
getParentItem() |
|
java.lang.String |
getText() |
|
java.lang.String |
getText(int index) |
|
int |
indexOf(GalleryItem childItem) |
Returns the index of childItem within this item or -1 if childItem is not
found.
|
boolean |
isExpanded() |
Returns true if the receiver is expanded, and false otherwise.
|
void |
remove(int index) |
|
void |
remove(GalleryItem item) |
|
void |
selectAll() |
Selects all of the items in the receiver.
|
void |
setBackground(org.eclipse.swt.graphics.Color background) |
Sets the receiver's background color to the color specified by the
argument, or to the default system color for the item if the argument is
null.
|
void |
setDescription(java.lang.String description) |
Deprecated.
|
void |
setExpanded(boolean expanded) |
Sets the expanded state of the receiver.
|
void |
setFont(org.eclipse.swt.graphics.Font font) |
|
void |
setForeground(org.eclipse.swt.graphics.Color foreground) |
Sets the receiver's foreground color to the color specified by the
argument, or to the default system color for the item if the argument is
null.
|
void |
setImage(org.eclipse.swt.graphics.Image image) |
|
void |
setItemCount(int count) |
Only work when the table was created with SWT.VIRTUAL
|
void |
setText(int index,
java.lang.String string) |
|
void |
setText(java.lang.String string) |
public GalleryItem(Gallery parent, int style)
public GalleryItem(Gallery parent, int style, int index)
public GalleryItem(GalleryItem parent, int style)
public GalleryItem(GalleryItem parent, int style, int index)
public Gallery getParent()
public GalleryItem getParentItem()
public int getItemCount()
public void setItemCount(int count)
itemCount
- public GalleryItem getItem(int index)
index
- : index of the item.public GalleryItem[] getItems()
public int indexOf(GalleryItem childItem)
childItem
- public void setImage(org.eclipse.swt.graphics.Image image)
setImage
in class org.eclipse.swt.widgets.Item
public boolean isExpanded()
public void setExpanded(boolean expanded)
expanded
- public void _setExpanded(boolean expanded, boolean redraw)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- public void deselectAll()
public org.eclipse.swt.graphics.Rectangle getBounds()
public org.eclipse.swt.graphics.Font getFont()
public org.eclipse.swt.graphics.Font getFont(boolean itemOnly)
public void setFont(org.eclipse.swt.graphics.Font font)
public org.eclipse.swt.graphics.Color getForeground()
org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Color getForeground(boolean itemOnly)
itemOnly
- If TRUE, does not try to use renderer or parent widget to
guess the real foreground color. Note : FALSE is the default
behavior.org.eclipse.swt.SWTException
- public void setForeground(org.eclipse.swt.graphics.Color foreground)
color
- The new color (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Color getBackground()
org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Color getBackground(boolean itemOnly)
itemOnly
- If TRUE, does not try to use renderer or parent widget to
guess the real background color. Note : FALSE is the default
behavior.org.eclipse.swt.SWTException
- public void setBackground(org.eclipse.swt.graphics.Color background)
color
- The new color (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void clear()
public void clearAll()
public void clearAll(boolean all)
public void selectAll()
public void remove(int index)
public void remove(GalleryItem item)
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public void setText(java.lang.String string)
setText
in class org.eclipse.swt.widgets.Item
public void setText(int index, java.lang.String string)
public java.lang.String getText()
getText
in class org.eclipse.swt.widgets.Item
public java.lang.String getText(int index)