public class CTreeItem
extends org.eclipse.swt.widgets.Item
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
Modifier and Type | Field and Description |
---|---|
protected CTreeCell[] |
cells
The cells which belong to, or are contained by, this item.
|
(package private) int |
computedHeight |
protected CTree |
ctree
The container to which this item belongs.
|
protected boolean |
enabled
Whether or not this item is enabled.
|
(package private) boolean |
painted
Whether or not this item is actually painted to the screen.
|
protected boolean |
visible
Whether or not this item is visible.
|
Constructor and Description |
---|
CTreeItem(CTree parent,
int style) |
CTreeItem(CTree parent,
int style,
int index) |
CTreeItem(CTreeItem parent,
int style) |
CTreeItem(CTreeItem parent,
int style,
int index) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addItem(int index,
CTreeItem item) |
void |
addListener(int eventType,
org.eclipse.swt.widgets.Listener handler) |
protected void |
checkSubclass() |
int |
computeHeight()
Computes the size of each cell using the widthHint and heightHint with the same
index as the cell.
|
(package private) boolean |
contains(org.eclipse.swt.widgets.Control control) |
boolean |
contains(int x,
int y)
The Cells of a CTreeItem are considered contiguous and unified, therefore
the contains method is overridden
|
boolean |
contains(org.eclipse.swt.graphics.Point pt)
The Cells of a CTreeItem are considered contiguous and unified, therefore
the contains method is overridden
|
protected void |
createCell(int index,
int style)
Creates a cell of the default class, as determined by the implementation
|
void |
createCell(int index,
int style,
java.lang.Class clazz) |
protected void |
createCells(java.lang.Object parent) |
void |
dispose() |
boolean |
getAutoHeight() |
org.eclipse.swt.graphics.Color |
getBackground() |
org.eclipse.swt.graphics.Color |
getBackground(int index) |
(package private) int |
getBottom() |
org.eclipse.swt.graphics.Rectangle |
getBounds() |
org.eclipse.swt.graphics.Rectangle |
getBounds(int index) |
CTreeCell |
getCell(int cell) |
CTreeCell |
getCell(int x,
int y) |
CTreeCell |
getCell(org.eclipse.swt.graphics.Point pt) |
(package private) org.eclipse.swt.graphics.Rectangle[] |
getCellBounds() |
CTreeColumn |
getCellColumn(CTreeCell cell) |
int |
getCellIndex(CTreeCell cell) |
CTreeCell[] |
getCells() |
(package private) org.eclipse.swt.graphics.Point[] |
getCellSizes() |
protected int |
getCellStyle(int index) |
CTreeCell |
getCheckCell() |
CTree |
getContainer() |
CTree |
getCTree() |
CTreeCell |
getCTreeCell(int column) |
boolean |
getExpanded()
Returns the Tree Cell expansion state
|
org.eclipse.swt.graphics.Font |
getFont()
Get the font being used by the first cell
|
org.eclipse.swt.graphics.Font |
getFont(int index)
Get the font being used by the specified cell
|
org.eclipse.swt.graphics.Color |
getForeground() |
org.eclipse.swt.graphics.Color |
getForeground(int index) |
(package private) int |
getHeight() |
org.eclipse.swt.graphics.Image |
getImage()
If this item has a tree column, this method will return the first image from that column
|
org.eclipse.swt.graphics.Image |
getImage(int column) |
org.eclipse.swt.graphics.Image[] |
getImages(int column) |
(package private) CTreeItem |
getItem(boolean up) |
CTreeItem |
getItem(int index) |
int |
getItemCount() |
CTreeItem[] |
getItems() |
CTree |
getParent() |
int |
getParentIndent() |
CTreeItem |
getParentItem() |
org.eclipse.swt.graphics.Point |
getSize() |
java.lang.String |
getText()
If this item has a tree column, this method will return the first image from that column
|
java.lang.String |
getText(int column) |
(package private) int |
getTop() |
CTreeCell |
getTreeCell() |
int |
getTreeIndent() |
boolean |
getVisible()
Returns whether or not this CContainerItem is requesting to be visible.
|
int |
handleMouseEvent(org.eclipse.swt.widgets.Event event,
boolean selectionActive)
Give the Item a chance to handle the mouse event
|
(package private) boolean |
hasCell(int index) |
boolean |
hasCheckCell() |
boolean |
hasItems() |
(package private) boolean |
hasNext() |
boolean |
hasParentItem() |
(package private) boolean |
hasPrevious() |
boolean |
hasTreeCell() |
int |
indexOf(CTreeItem item) |
boolean |
isOpen()
This method returns true if ANY of the cells are open.
|
boolean |
isOpen(int cell) |
boolean |
isOpen(int x,
int y) |
boolean |
isSelected() |
boolean |
isToggle(int x,
int y) |
boolean |
isTreeToggle(int x,
int y) |
boolean |
isVisible()
Returns true if the receiver is visible and all parents up to and including the
root of its container are visible.
|
void |
layout(int eventType) |
(package private) CTreeItem |
next() |
(package private) CTreeItem |
nextVisible() |
void |
paint(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle ebounds) |
(package private) CTreeItem |
previous() |
(package private) CTreeItem |
previousVisible() |
void |
redraw() |
(package private) void |
removeItem(CTreeItem item) |
void |
removeListener(int eventType,
org.eclipse.swt.widgets.Listener handler) |
void |
setBackground(org.eclipse.swt.graphics.Color color) |
void |
setBackground(int index,
org.eclipse.swt.graphics.Color color) |
void |
setEnabled(boolean enabled) |
void |
setExpanded(boolean expanded)
Sets the Tree Expansion state of the Item
|
boolean |
setFocus() |
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setFont(int index,
org.eclipse.swt.graphics.Font font) |
void |
setForeground(org.eclipse.swt.graphics.Color color) |
void |
setForeground(int index,
org.eclipse.swt.graphics.Color color) |
void |
setGridLine(boolean gridLine) |
(package private) void |
setHeight(int height) |
void |
setImage(org.eclipse.swt.graphics.Image image) |
void |
setImage(int column,
org.eclipse.swt.graphics.Image image) |
void |
setImages(org.eclipse.swt.graphics.Image[] images) |
void |
setImages(int column,
org.eclipse.swt.graphics.Image[] images) |
(package private) void |
setNext(CTreeItem item) |
void |
setOpen(boolean open) |
void |
setOpen(int cell,
boolean open) |
void |
setOpen(int x,
int y,
boolean open) |
(package private) void |
setPainted(boolean painted) |
(package private) void |
setPrevious(CTreeItem item) |
void |
setSelected(boolean selected) |
void |
setText(int column,
java.lang.String string) |
void |
setText(java.lang.String string) |
void |
setText(java.lang.String[] strings) |
(package private) void |
setTop(int top) |
void |
setTreeIndent(int indent) |
void |
setVisible(boolean visible) |
void |
update() |
protected void |
updateColors() |
protected CTree ctree
protected CTreeCell[] cells
protected boolean enabled
protected boolean visible
boolean painted
int computedHeight
public CTreeItem(CTree parent, int style)
public CTreeItem(CTree parent, int style, int index)
public CTreeItem(CTreeItem parent, int style)
public CTreeItem(CTreeItem parent, int style, int index)
void addItem(int index, CTreeItem item)
public void addListener(int eventType, org.eclipse.swt.widgets.Listener handler)
addListener
in class org.eclipse.swt.widgets.Widget
protected void checkSubclass()
checkSubclass
in class org.eclipse.swt.widgets.Item
public int computeHeight()
boolean contains(org.eclipse.swt.widgets.Control control)
public boolean contains(org.eclipse.swt.graphics.Point pt)
public boolean contains(int x, int y)
protected void createCell(int index, int style)
Is used to auto-fill a cell when no specific cell class is provided for the given column
index
- the index the new cellpublic void createCell(int index, int style, java.lang.Class clazz)
protected void createCells(java.lang.Object parent)
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public boolean getAutoHeight()
public org.eclipse.swt.graphics.Color getBackground()
public org.eclipse.swt.graphics.Color getBackground(int index)
int getBottom()
public org.eclipse.swt.graphics.Rectangle getBounds()
public org.eclipse.swt.graphics.Rectangle getBounds(int index)
public CTreeCell getCell(int cell)
public CTreeCell getCell(org.eclipse.swt.graphics.Point pt)
public CTreeCell getCell(int x, int y)
org.eclipse.swt.graphics.Rectangle[] getCellBounds()
public CTreeColumn getCellColumn(CTreeCell cell)
public int getCellIndex(CTreeCell cell)
public CTreeCell[] getCells()
org.eclipse.swt.graphics.Point[] getCellSizes()
protected int getCellStyle(int index)
public CTreeCell getCheckCell()
public CTree getContainer()
public CTree getCTree()
public CTreeCell getCTreeCell(int column)
public boolean getExpanded()
If there is no Tree Cell, simply returns false
org.aspencloud.widgets.ccontainer#getExpanded(boolean)
public org.eclipse.swt.graphics.Font getFont()
public org.eclipse.swt.graphics.Font getFont(int index)
index
- an int used to specify the cell by an indexpublic org.eclipse.swt.graphics.Color getForeground()
public org.eclipse.swt.graphics.Color getForeground(int index)
int getHeight()
public org.eclipse.swt.graphics.Image getImage()
getImage
in class org.eclipse.swt.widgets.Item
public org.eclipse.swt.graphics.Image getImage(int column)
column
- the column from which to get the imagepublic org.eclipse.swt.graphics.Image[] getImages(int column)
column
- the column from which to get the imagesCTreeItem getItem(boolean up)
public CTreeItem getItem(int index)
public int getItemCount()
public CTreeItem[] getItems()
public CTree getParent()
public int getParentIndent()
public CTreeItem getParentItem()
public org.eclipse.swt.graphics.Point getSize()
public java.lang.String getText()
getText
in class org.eclipse.swt.widgets.Item
public java.lang.String getText(int column)
column
- the column from which to get the imageint getTop()
public CTreeCell getTreeCell()
public int getTreeIndent()
public boolean getVisible()
Control.getVisible()
,
isVisible()
public int handleMouseEvent(org.eclipse.swt.widgets.Event event, boolean selectionActive)
event
- the Eventboolean hasCell(int index)
public boolean hasCheckCell()
public boolean hasItems()
boolean hasNext()
public boolean hasParentItem()
boolean hasPrevious()
public boolean hasTreeCell()
public int indexOf(CTreeItem item)
public boolean isOpen()
org.aspencloud.widgets.ccontainer#getExpanded()
public boolean isOpen(int cell)
public boolean isOpen(int x, int y)
public boolean isSelected()
public boolean isToggle(int x, int y)
public boolean isTreeToggle(int x, int y)
public boolean isVisible()
getVisible()
,
Control.isVisible()
CTreeItem next()
CTreeItem nextVisible()
public void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle ebounds)
CTreeItem previous()
CTreeItem previousVisible()
public void redraw()
void removeItem(CTreeItem item)
public void removeListener(int eventType, org.eclipse.swt.widgets.Listener handler)
removeListener
in class org.eclipse.swt.widgets.Widget
public void setBackground(org.eclipse.swt.graphics.Color color)
public void setBackground(int index, org.eclipse.swt.graphics.Color color)
public void setEnabled(boolean enabled)
public void setExpanded(boolean expanded)
Does not affect the expansion state of individual expandable cells
expanded
- public void layout(int eventType)
public boolean setFocus()
public void setFont(org.eclipse.swt.graphics.Font font)
public void setFont(int index, org.eclipse.swt.graphics.Font font)
public void setForeground(org.eclipse.swt.graphics.Color color)
public void setForeground(int index, org.eclipse.swt.graphics.Color color)
public void setGridLine(boolean gridLine)
void setHeight(int height)
public void setImage(org.eclipse.swt.graphics.Image image)
setImage
in class org.eclipse.swt.widgets.Item
public void setImage(int column, org.eclipse.swt.graphics.Image image)
public void setImages(org.eclipse.swt.graphics.Image[] images)
public void setImages(int column, org.eclipse.swt.graphics.Image[] images)
void setNext(CTreeItem item)
public void setOpen(boolean open)
public void setOpen(int cell, boolean open)
public void setOpen(int x, int y, boolean open)
void setPainted(boolean painted)
void setPrevious(CTreeItem item)
public void setSelected(boolean selected)
public void setText(int column, java.lang.String string)
public void setText(java.lang.String string)
setText
in class org.eclipse.swt.widgets.Item
public void setText(java.lang.String[] strings)
void setTop(int top)
public void setTreeIndent(int indent)
public void setVisible(boolean visible)
public void update()
protected void updateColors()