Class ColumnItem
java.lang.Object
org.eclipse.nebula.widgets.opal.commons.OpalItem
org.eclipse.nebula.widgets.opal.columnbrowser.ColumnItem
public class ColumnItem
extends org.eclipse.nebula.widgets.opal.commons.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 boolean
equals(java.lang.Object obj)
ColumnItem
getItem(int index)
Returns an item located at a given positionint
getItemCount()
ColumnItem[]
getItems()
ColumnBrowserWidget
getParent()
ColumnItem
getParentItem()
int
hashCode()
int
indexOf(ColumnItem item)
Return the position of a given item in children's listvoid
remove(int index)
Remove a children in a given position of this objectvoid
remove(ColumnItem item)
Remove a given children of this objectvoid
removeAll()
Remove all children of this object
-
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
null
if 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
item
is 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:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-