List of usage examples for com.google.gwt.gen2.complexpanel.client FastTreeItem FastTreeItem
public FastTreeItem()
From source file:com.google.gwt.gen2.demo.fasttree.client.FastTreeDemo.java
License:Apache License
private void verboseTreeItem(HasFastTreeItems parent, int children) { for (int i = 0; i < children; i++) { final int index = i; FastTreeItem item = new FastTreeItem(); item.setText("item " + index); parent.addItem(item);/* w ww .j a va2 s .c o m*/ verboseTreeItem(item, children - (i + 1)); } }
From source file:org.pentaho.pat.client.ui.widgets.DimensionTreeWidget.java
License:Open Source License
private FastTreeItem createChildLabel(String name, String caption, ObjectType objecttype, boolean isuniquename, SimplePanelDragControllerImpl controller, boolean draggable) { FastTreeItem fti = new FastTreeItem(); MeasureLabel label = new MeasureLabel(name, caption, objecttype, fti, isuniquename); label.setDragController(controller); if (draggable) { label.makeDraggable();/*from w w w.java 2 s. c o m*/ } if (objecttype.equals(ObjectType.MEASURE) || objecttype.equals(ObjectType.MEMBER)) { fti.becomeLeaf(); } else { fti.becomeInteriorNode(); } fti.setWidget(label); return fti; }
From source file:org.pentaho.pat.client.ui.widgets.DimensionTreeWidget.java
License:Open Source License
private void lazyCreateChild(final FastTreeItem parent, final int index, final int children) { for (IAxis.Standard axis : IAxis.Standard.values()) { ServiceFactory.getDiscoveryInstance().getDimensions(Pat.getSessionID(), Pat.getCurrQuery(), axis, new AsyncCallback<String[]>() { public void onFailure(Throwable arg0) { // TODO Auto-generated method stub }/* w w w .j ava 2s . c om*/ public void onSuccess(String[] arg0) { for (int i = 0; i < arg0.length; i++) { dimensionLocations.put(arg0[i], IAxis.UNUSED); ArrayList<String> path = new ArrayList<String>(); path.add(arg0[i]); MeasureLabel label; final FastTreeItem item = new FastTreeItem(); if (arg0[i].equals("Measures")) { label = new MeasureLabel(arg0[i], arg0[i], ObjectType.MEASURE, item, parentPanel.isUniqueNameLabel()); } else { label = new MeasureLabel(arg0[i], arg0[i], ObjectType.DIMENSION, item, parentPanel.isUniqueNameLabel()); } label.setDragController(dragController); label.makeDraggable(); item.setWidget(label); item.becomeInteriorNode(); parent.addItem(item); } } }); } }