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
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.swt.graphics.Color |
background |
protected org.eclipse.swt.graphics.Font |
font |
protected org.eclipse.swt.graphics.Color |
foreground |
protected int |
hCount |
protected int |
height |
protected GalleryItem[] |
items
Children of this item.
|
protected int |
lastIndexOf
Last result of indexOf( GalleryItem).
|
protected int |
marginBottom |
protected int[] |
selectionFlags
Selection bit flags.
|
protected int |
vCount |
protected int |
width
Size of the group, including its title.
|
protected int |
x
Bounds of this items in the current Gallery.
|
protected int |
y |
Modifier | Constructor and Description |
---|---|
|
GalleryItem(Gallery parent,
int style) |
|
GalleryItem(Gallery parent,
int style,
int index) |
protected |
GalleryItem(Gallery parent,
int style,
int index,
boolean create) |
|
GalleryItem(GalleryItem parent,
int style) |
|
GalleryItem(GalleryItem parent,
int style,
int index) |
protected |
GalleryItem(GalleryItem parent,
int style,
int index,
boolean create) |
Modifier and Type | Method and Description |
---|---|
protected void |
_addSelection(GalleryItem item) |
protected void |
_deselectAll() |
protected void |
_dispose()
Disposes the gallery Item.
|
protected void |
_disposeChildren() |
protected void |
_selectAll() |
void |
_setExpanded(boolean expanded,
boolean redraw) |
protected void |
addItem(GalleryItem item,
int position) |
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.
|
protected boolean |
isSelected(GalleryItem item) |
protected boolean |
isUltraLazyDummy() |
void |
remove(GalleryItem item) |
void |
remove(int index) |
protected void |
removeFromParent() |
protected void |
select(int from,
int to) |
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
|
protected void |
setParent(Gallery parent) |
protected void |
setParentItem(GalleryItem parentItem) |
void |
setText(int index,
java.lang.String string) |
void |
setText(java.lang.String string) |
protected void |
setUltraLazyDummy(boolean ultraLazyDummy) |
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
protected GalleryItem[] items
protected int x
protected int y
protected int width
protected int height
protected int marginBottom
protected int hCount
protected int vCount
protected int lastIndexOf
protected int[] selectionFlags
protected org.eclipse.swt.graphics.Font font
protected org.eclipse.swt.graphics.Color foreground
protected org.eclipse.swt.graphics.Color background
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)
protected GalleryItem(GalleryItem parent, int style, int index, boolean create)
protected GalleryItem(Gallery parent, int style, int index, boolean create)
protected boolean isUltraLazyDummy()
protected void setUltraLazyDummy(boolean ultraLazyDummy)
public Gallery getParent()
protected void setParent(Gallery parent)
public GalleryItem getParentItem()
protected void setParentItem(GalleryItem parentItem)
protected void addItem(GalleryItem item, int position)
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()
protected void _deselectAll()
protected void _addSelection(GalleryItem item)
protected boolean isSelected(GalleryItem item)
protected void select(int from, int to)
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()
protected void _selectAll()
public void remove(int index)
public void remove(GalleryItem item)
protected void _dispose()
protected void _disposeChildren()
protected void removeFromParent()
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)