Class ColumnItem
java.lang.Object
org.eclipse.nebula.widgets.opal.commons.OpalItem
org.eclipse.nebula.widgets.opal.columnbrowser.ColumnItem
public class ColumnItem extends OpalItem
Instances of this object are items manipulated by the ColumnBrowser widget.
ColumnItems are part of a tree structure .
- See Also:
OpalItem
-
Constructor Summary
Constructors Constructor Description ColumnItem(ColumnBrowserWidget widget)Constructs a new instance of this class given its parent.ColumnItem(ColumnBrowserWidget widget, int index)Constructs a new instance of this class given its parent.ColumnItem(ColumnItem parent)Constructs a new instance of this class given its parent.ColumnItem(ColumnItem parent, int index)Constructs a new instance of this class given its parent. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)ColumnItemgetItem(int index)Returns an item located at a given positionintgetItemCount()ColumnItem[]getItems()ColumnBrowserWidgetgetParent()ColumnItemgetParentItem()inthashCode()intindexOf(ColumnItem item)Return the position of a given item in children's listvoidremove(int index)Remove a children in a given position of this objectvoidremove(ColumnItem item)Remove a given children of this objectvoidremoveAll()Remove all children of this objectMethods inherited from class org.eclipse.nebula.widgets.opal.commons.OpalItem
getBackground, getData, getData, getFont, getForeground, getHeight, getImage, getText, setBackground, setData, setData, setFont, setForeground, setHeight, setImage, setText
-
Constructor Details
-
ColumnItem
Constructs a new instance of this class given its parent. The item is added to the end of the items maintained by its parent.- Parameters:
widget- the widget that will contain this item (can not be null)- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
ColumnItem
Constructs a new instance of this class given its parent. The item is added at a given position in the items'list maintained by its parent.- Parameters:
widget- the widget that will contain this item (can not be null)index- the position- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
ColumnItem
Constructs a new instance of this class given its parent. The item is added to the end of the items maintained by its parent.- Parameters:
widget- the widget that will contain this item (can not be null)- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
ColumnItem
Constructs a new instance of this class given its parent. The item is added at a given position in the items'list maintained by its parent.- Parameters:
widget- the widget that will contain this item (can not be null)index- the position- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
-
Method Details
-
remove
Remove a given children of this object- Parameters:
item- the item to remove (can not be null)- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
remove
public void remove(int index)Remove a children in a given position of this object- Parameters:
index- position of the children in the items'list- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
removeAll
public void removeAll()Remove all children of this object- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
getItem
Returns an item located at a given position- Parameters:
index- position- Returns:
- the item located at the index position
- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
getItemCount
public int getItemCount()- Returns:
- the number of children
- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
getItems
- Returns:
- all children of this item
- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
getParent
- Returns:
- the widget that holds this item
- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
getParentItem
- Returns:
- the parent item, of
nullif this item is the root node - Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
indexOf
Return the position of a given item in children's list- Parameters:
item- item to find- Returns:
- the position of the children, or -1 if
itemis a not a children of this object - Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-