public class extend.awt.DataContainer extends java.awt.Panel implements extend.awt.ItemProcessor { public static final int Details_View public static final int List_View public static final int Tree_View public static final int Icon_View public static final int Left_Justify public static final int Center_Justify public static final int Right_Justify public static final int No_Vertical_Line public static final int Vertical_Line public static final int Single_Selection public static final int Forced_Single_Selection public static final int Multiple_Selection public static final int No_Split_Bar public DataContainer(int) public void setView(int) public void setRoot(ContainerItem) public void setTitle(String) public void setColumnData(Object, int, int) public void setSelectionType(int) public void setSplitBar(int, int) public ContainerItem getSelected()[] public void setAllSelection(boolean) public ContainerItem getRoot() public void refresh() }The DataContainer class provides a container control for managing lists and trees of data items.
public final static int Details_View
public final static int List_View
public final static int Tree_View
public final static int Icon_View
public final static int Left_Justify
public final static int Center_Justify
public final static int Right_Justify
public final static int No_Vertical_Line
public final static int Vertical_Line
public final static int Single_Selection
public final static int Forced_Single_Selection
public final static int Multiple_Selection
public final static int No_Split_Bar
public DataContainer (int newView)
newView -
The view to set the container to. It must be
one of Details_View, List_View, Tree_View or Icon_View.
public void setView (int newView)
newView -
The view to set the container to. It must be
one of Details_View, List_View, Tree_View or Icon_View.
public void setRoot (ContainerItem baseItem)
baseItem -
This is the item to set as the base item.
public void setTitle (String title)
title -
This is the title text.
public void setColumnData (Object title, int justify, int vertLines)
title -
This is the title for the column. If it is a
java.awt.Image, it will be rendered as such. Otherwise, its toString ()
method will be used to determine the text to draw.
justify -
This is the justification of the column and
must be one of Left_Justif, Center_Justify or Right_Justify.
vertLines -
This indicates whether a vertical separator
line should follow the column and must be either No_Vertical_Line or
Vertical_Line.
public setSelectionType (int newSetting)
newSetting -
The selection style the container is to
use. It must be one of Single_Selection, Forced_Single_Selection or
Multiple_Selection.
public void setSplitBar (int, afterColumn, int windowPos)
afterColumn -
The number of the column (zero-based)
after which the split bar will be placed. All columns up to and
including afterColumn will be displayed in the left-hand pane. All
columns after afterColumn will be displayed in the right-hand pane.
Valid values are any number between 0 and n-1 where n is the total
number of columns or the No_Split_Bar constant.
windowPos -
This number defines where (horizontally)
the split bar is to be drawn. It is treated as a percentage of the
container's width. Valid values are any number between 10-90.
public ContainerItem [] getSelected ()
public void setAllSelection (boolean newState)
newState -
The 'selected' state to set for all the
items.
public ContainerItem getRoot ()
public void refresh ()
Event.id | Event.arg | Event posting trigger |
ACTION_EVENT | A reference to the ContainerItem which was double-clicked on. | The user double-clicked on an item in the container. |
LIST_SELECT | A reference to the ContainerItem which was selected. | The user clicked on an item to select it. |
LIST_DESELECT | A reference to the ContainerItem which was deselected. | The user clicked on an item to deselect it. |