All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xworker.swt.widgets.Tree.xer.txt Maven / Gradle / Ivy

^1417744802112
@
sname
Tree
slabel
Tree
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.swt.widgets.Control
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
sicon
icons/org/eclipse/swt/widgets/Tree.gif
Sdescription
#$@text#$@

Instances of this class provide a selectable user interface object that displays a hierarchy of items and issues notification when an item in the hierarchy is selected.

The item children that may be added to instances of this class must be of type TreeItem.

Style VIRTUAL is used to create a Tree whose TreeItems are to be populated by the client on an on-demand basis instead of up-front. This can provide significant performance improvements for trees that are very large or for which TreeItem population is expensive (for example, retrieving values from an external source).

Here is an example of using a Tree with style VIRTUAL:

  final Tree tree = new Tree(parent, SWT.VIRTUAL | SWT.BORDER);
  tree.setItemCount(20);
  tree.addListener(SWT.SetData, new Listener() {
      public void handleEvent(Event event) {
          TreeItem item = (TreeItem)event.item;
          TreeItem parentItem = item.getParentItem();
          String text = null;
          if (parentItem == null) {
              text = "node " + tree.indexOf(item);
          } else {
              text = parentItem.getText() + " - " + parentItem.indexOf(item);
          }
          item.setText(text);
          System.out.println(text);
          item.setItemCount(10);
      }
  });
 

 

Note that although this class is a subclass of Composite, it does not normally make sense to add Control children to it, or set a layout on it, unless implementing something like a cell editor.

 

Styles:

SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL

Events:

Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem

 

Note: Only one of the styles SINGLE and MULTI may be specified.

#$@text#$@ sid Tree @/@scripts sname scripts sid scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@actions @/@scripts/@create sname create slabel create sisSynchronized false sthrowException false suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeCreator smethodName create sdisableGlobalContext false sid create sdescriptors xworker.lang.actions.JavaAction @/@scripts/@toJavaCode sname toJavaCode slabel toJavaCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeCreator smethodName toJavaCode sid toJavaCode sdescriptors xworker.lang.actions.JavaAction @/@scripts/@toEditEventCode sname toEditEventCode slabel toEditEventCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeCreator smethodName toEditEventCode sid toEditEventCode sdescriptors xworker.lang.actions.JavaAction @/@scripts/@toEditorDisposeCode sname toEditorDisposeCode slabel toEditorDisposeCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeCreator smethodName toEditorDisposeCode sid toEditorDisposeCode sdescriptors xworker.lang.actions.JavaAction @/@scripts/@toEditorResetCode sname toEditorResetCode slabel toEditorResetCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeCreator smethodName toEditorResetCode sid toEditorResetCode sdescriptors xworker.lang.actions.JavaAction @/@TreeColumn sname TreeColumn slabel TreeColumn sdescriptors xworker.lang.MetaDescriptor3/@thing smany true seditCols 2 sinitialization false smodifier public sinheritDescription false sicon icons/org/eclipse/swt/widgets/TreeColumn.gif sid TreeColumn @/@TreeColumn/@scripts sname scripts sid scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@actions @/@TreeColumn/@scripts/@create sname create slabel create sisSynchronized false sthrowException false suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeColumnCreator smethodName create sdisableGlobalContext false sid create sdescriptors xworker.lang.actions.JavaAction @/@TreeColumn/@name sname name slabel name LvalidateOnBlur false LallowDecimals false LallowNegative false sid name sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@text sname text slabel text ssize 60 scolspan 2 LvalidateOnBlur false LallowDecimals false LallowNegative false sid text sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@toolTipText sname toolTipText slabel toolTipText ssize 60 scolspan 2 LvalidateOnBlur false LallowDecimals false LallowNegative false sid toolTipText sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@image sname image slabel image LvalidateOnBlur false LallowDecimals false LallowNegative false sid image sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@width sname width slabel width sdefault -1 LvalidateOnBlur false LallowDecimals false LallowNegative false sid width sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor sname TreeEditor slabel TreeEditor sdescriptors xworker.lang.MetaDescriptor3/@thing smany true seditCols 2 sinitialization false sid TableEditor @/@TreeColumn/@TableEditor/@name sname name slabel name LvalidateOnBlur false LallowDecimals false LallowNegative false sid name sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@horizontalAlignment sname horizontalAlignment slabel horizontalAlignment sinputtype select sdefault LEFT LvalidateOnBlur false LallowDecimals false LallowNegative false sid horizontalAlignment sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@horizontalAlignment/@LEFT sname LEFT slabel LEFT svalue LEFT sid LEFT sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@TreeColumn/@TableEditor/@horizontalAlignment/@CENTER sname CENTER slabel CENTER svalue CENTER sid CENTER sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@TreeColumn/@TableEditor/@horizontalAlignment/@RIGHT sname RIGHT slabel RIGHT svalue RIGHT sid RIGHT sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@TreeColumn/@TableEditor/@grabHorizontal sname grabHorizontal slabel grabHorizontal sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid grabHorizontal sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@verticalAlignment sname verticalAlignment slabel verticalAlignment sinputtype select sdefault CENTER LvalidateOnBlur false LallowDecimals false LallowNegative false sid verticalAlignment sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@verticalAlignment/@TOP sname TOP slabel TOP svalue TOP sid TOP sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@TreeColumn/@TableEditor/@verticalAlignment/@CENTER sname CENTER slabel CENTER svalue CENTER sid CENTER sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@TreeColumn/@TableEditor/@verticalAlignment/@BOTTOM sname BOTTOM slabel BOTTOM svalue BOTTOM sid BOTTOM sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@TreeColumn/@TableEditor/@grabVertical sname grabVertical slabel grabVertical sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid grabVertical sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@minimumWidth sname minimumWidth slabel minimumWidth sdefault 0 LvalidateOnBlur false LallowDecimals false LallowNegative false sid minimumWidth sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@minimumHeight sname minimumHeight slabel minimumHeight sdefault 0 LvalidateOnBlur false LallowDecimals false LallowNegative false sid minimumHeight sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeColumn/@TableEditor/@Button sname Button slabel Button sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.widgets.Button smany true seditCols 2 sinitialization false sid Button @/@TreeColumn/@TableEditor/@CCombo sname CCombo slabel CCombo sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.custom.CCombo smany true seditCols 2 sinitialization false sid CCombo @/@TreeColumn/@TableEditor/@Combo sname Combo slabel Combo sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.widgets.Combo smany true seditCols 2 sinitialization false sid Combo @/@TreeColumn/@TableEditor/@Composite sname Composite slabel Composite sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.widgets.Composite smany true seditCols 2 sinitialization false sid Composite @/@TreeColumn/@TableEditor/@DateTime sname DateTime slabel DateTime sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.widgets.DateTime smany true seditCols 2 sinitialization false sid DateTime @/@TreeColumn/@TableEditor/@Link sname Link slabel Link sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.widgets.Link smany true seditCols 2 sinitialization false sid Link @/@TreeColumn/@TableEditor/@Text sname Text slabel Text sdescriptors xworker.lang.MetaDescriptor3/@thing sextends view.objects.swt.widgets.Text smany true seditCols 2 sinitialization false sid Text @/@TreeColumn/@TableEditor/@scripts sname scripts sid scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@actions @/@TreeColumn/@TableEditor/@scripts/@toJavaCode sname toJavaCode slabel toJavaCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeEditorCreator smethodName toJavaCode sid toJavaCode sdescriptors xworker.lang.actions.JavaAction @/@TreeColumn/@TableEditor/@scripts/@toEditorCode sname toEditorCode slabel toEditorCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeEditorCreator smethodName toEditorCode sid toEditorCode sdescriptors xworker.lang.actions.JavaAction @/@TreeColumn/@TableEditor/@scripts/@toEditorDisposeCode sname toEditorDisposeCode slabel toEditorDisposeCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeEditorCreator smethodName toEditorDisposeCode sid toEditorDisposeCode sdescriptors xworker.lang.actions.JavaAction @/@TreeColumn/@TableEditor/@scripts/@toEditorResetCode sname toEditorResetCode slabel toEditorResetCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeEditorCreator smethodName toEditorResetCode sid toEditorResetCode sdescriptors xworker.lang.actions.JavaAction @/@TreeColumn/@TableEditor/@scripts1 sname scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@thing sextends core.objects.lang._CoreStructure3/@scripts smany true seditCols 2 sinitialization false Sdescription #$@text#$@

TableEditor应有两个方法setData, getData分别对应表格的编辑时设置值和编辑完毕后回复值。

如果没有这两个方法,则按照默认的读取和设置值的方法。

#$@text#$@ sid scripts1 @/@TreeColumn/@scripts1 sname scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@thing sextends core.objects.lang._CoreStructure3/@scripts smany true seditCols 2 sinitialization false sdescription setRowColor方法是默认的设置颜色的方法,会自动调用。 sid scripts1 @/@TreeColumn/@cls sname cls ssize 60 scolspan 2 LvalidateOnBlur false LallowDecimals false LallowNegative false sid cls sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@name sname name slabel name LvalidateOnBlur false LallowDecimals false LallowNegative false sid name sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@selectStyle sname selectStyle slabel selectStyle sinputtype select sdefault SINGLE LvalidateOnBlur false LallowDecimals false LallowNegative false sid selectStyle sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@selectStyle/@SINGLE sname SINGLE slabel SINGLE svalue SINGLE sid SINGLE sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@selectStyle/@MULTI sname MULTI slabel MULTI svalue MULTI sid MULTI sdescriptors xworker.lang.MetaDescriptor3/@attribute/@value @/@V_SCROLL sname V_SCROLL slabel V_SCROLL sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid V_SCROLL sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@H_SCROLL sname H_SCROLL slabel H_SCROLL sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid H_SCROLL sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@CHECK sname CHECK slabel CHECK sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid CHECK sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@FULL_SELECTION sname FULL_SELECTION slabel FULL_SELECTION sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid FULL_SELECTION sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@HIDE_SELECTION sname HIDE_SELECTION slabel HIDE_SELECTION sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid HIDE_SELECTION sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@BORDER sname BORDER slabel BORDER sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid BORDER sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@lineVisible sname lineVisible slabel lineVisible sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid lineVisible sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@multipleColumns sname multipleColumns slabel multipleColumns sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid multipleColumns sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@headerVisible sname headerVisible slabel headerVisible sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid headerVisible sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@sortIndicator sname sortIndicator slabel sortIndicator sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid sortIndicator sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@moveableColumns sname moveableColumns slabel moveableColumns sinputtype truefalse sdefault true LvalidateOnBlur false LallowDecimals false LallowNegative false sid moveableColumns sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@headImages sname headImages slabel headImages sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid headImages sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@subImages sname subImages slabel subImages sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid subImages sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@checkSelection sname checkSelection sinputtype truefalse sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid checkSelection sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeItem sname TreeItem slabel TreeItem sdescriptors xworker.lang.MetaDescriptor3/@thing smany true seditCols 2 sinitialization false smodifier public sinheritDescription false sicon icons/org/eclipse/swt/widgets/TreeItem.gif sid TreeItem @/@TreeItem/@name sname name slabel name LvalidateOnBlur false LallowDecimals false LallowNegative false sid name sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeItem/@text sname text slabel text ssize 60 scolspan 2 LvalidateOnBlur false LallowDecimals false LallowNegative false sid text sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeItem/@checked sname checked slabel checked sextends core.objects.data.constants/@truefalse sinputtype select sdefault false LvalidateOnBlur false LallowDecimals false LallowNegative false sid checked sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@TreeItem/@TreeItem sname TreeItem slabel TreeItem sdescriptors xworker.lang.MetaDescriptor3/@thing sextends xworker.swt.widgets.Tree/@TreeItem smany true seditCols 2 sinitialization false smodifier public sid TreeItem @/@TreeItem/@scripts sname scripts sid scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@actions @/@TreeItem/@scripts/@toJavaCode sname toJavaCode slabel toJavaCode sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeItemCreator smethodName toJavaCode sid toJavaCode sdescriptors xworker.lang.actions.JavaAction @/@TreeItem/@scripts/@create sname create slabel create sisSynchronized false sthrowException false suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeItemCreator smethodName create sdisableGlobalContext false sid create sdescriptors xworker.lang.actions.JavaAction @/@TreeItem/@cls sname cls ssize 60 scolspan 2 LvalidateOnBlur false LallowDecimals false LallowNegative false sid cls sdescriptors xworker.lang.MetaDescriptor3/@attribute @/@menus sname menus sid menus slabel menus sdescriptors xworker.lang.MetaDescriptor3/@menus @/@menus/@toEditEventCode sname toEditEventCode sid toEditEventCode slabel toEditEventCode sdescriptors xworker.lang.MetaDescriptor3/@menus/@menuSetting @/@menus/@toEditEventCode/@toTableEditEventCode sname toTableEditEventCode sid toTableEditEventCode slabel toEditEventCode sdescriptors core.objects.config.projectMenu/@menuSetting/@menu @/@menus/@toEditEventCode/@toEditorResetCode sname toEditorResetCode sid toEditorResetCode slabel toEditorResetCode sdescriptors core.objects.config.projectMenu/@menuSetting/@menu @/@menus/@toEditEventCode/@toEditorDisposeCode sname toEditorDisposeCode sid toEditorDisposeCode slabel toEditorDisposeCode sdescriptors core.objects.config.projectMenu/@menuSetting/@menu @/@scripts1 sname scripts slabel scripts sdescriptors xworker.lang.MetaDescriptor3/@thing sextends core.objects.lang._CoreStructure3/@scripts smany true seditCols 2 sinitialization false sdescription setRowColor方法是默认的设置颜色的方法,会自动调用。 sid scripts1 @/@treeModels sname TreeModels sdescriptors xworker.lang.MetaDescriptor3/@thing sextends xworker.app.model.tree.TreeModels smany true seditCols 2 sinitialization false smodifier public sinheritDescription true sid treeModels @/@treeModels/@actions sname actions sid actions slabel actions sdescriptors xworker.lang.MetaDescriptor3/@actions @/@treeModels/@actions/@create sname create sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TreeTreeModelsCreator smethodName create sdisableGlobalContext false sid create sdescriptors xworker.lang.actions.JavaAction @/@DataStore sname DataStore sdescriptors xworker.lang.MetaDescriptor3/@thing sextends xworker.app.view.swt.data.DataStore smany true seditCols 2 sinitialization false sgroup Data smodifier public sinheritDescription true sid DataStore @/@DataStores sname DataStores sdescriptors xworker.lang.MetaDescriptor3/@thing sextends xworker.app.view.swt.data.DataStores smany true seditCols 2 sinitialization false sgroup Data smodifier public sinheritDescription true sid DataStores @/@DataStores/@actions sname actions sid actions slabel actions sdescriptors xworker.lang.MetaDescriptor3/@actions @/@DataStores/@actions/@create sname create sisSynchronized false sthrowException true suseOtherAction false suseOuterJava true souterClassName xworker.swt.widgets.TableDataStoresCreator smethodName create sdisableGlobalContext false sid create sdescriptors xworker.lang.actions.JavaAction




© 2015 - 2025 Weber Informatics LLC | Privacy Policy