本文整理汇总了Java中com.google.gwt.user.cellview.client.CellTree类的典型用法代码示例。如果您正苦于以下问题:Java CellTree类的具体用法?Java CellTree怎么用?Java CellTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CellTree类属于com.google.gwt.user.cellview.client包,在下文中一共展示了CellTree类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setTreeOfDestinations
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void setTreeOfDestinations(RefactorInfo refactorInfo, List<JavaProject> projects) {
final SingleSelectionModel<Object> selectionModel = new SingleSelectionModel<>();
selectionModel.addSelectionChangeHandler(
new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Object object = selectionModel.getSelectedObject();
if (object instanceof JavaProject) {
JavaProject project = (JavaProject) object;
delegate.setMoveDestinationPath(project.getPath(), project.getPath());
}
if (object instanceof PackageFragmentRoot) {
PackageFragmentRoot fragmentRoot = (PackageFragmentRoot) object;
delegate.setMoveDestinationPath(
fragmentRoot.getPath(), fragmentRoot.getProjectPath());
}
if (object instanceof PackageFragment) {
PackageFragment fragment = (PackageFragment) object;
delegate.setMoveDestinationPath(fragment.getPath(), fragment.getProjectPath());
}
}
});
CellTree tree =
new CellTree(
new ProjectsAndPackagesModel(projects, refactorInfo, selectionModel, resources),
null,
cellTreeResources);
tree.setAnimationEnabled(true);
treePanel.clear();
treePanel.add(tree);
}
开发者ID:eclipse,项目名称:che,代码行数:36,代码来源:MoveViewImpl.java
示例2: NavigationViewImpl
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
/**
* Instantiates a new NavigationViewImpl.
*/
public NavigationViewImpl() {
treeModel = new NavigationTreeViewModel();
menuTree = new CellTree(treeModel, null);
kaaAdminStyle = Utils.kaaAdminStyle;
initWidget(uiBinder.createAndBindUi(this));
}
开发者ID:kaaproject,项目名称:kaa,代码行数:11,代码来源:NavigationViewImpl.java
示例3: ReportSelectListCellTree
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
public ReportSelectListCellTree(List<ResourceListItem> resourceList, MultiSelectionModel<ResourceListItem> selectionModel) {
super(new CustomTreeModel(resourceList, selectionModel), null, (CellTree.Resources)GWT.create(CustomCellTreeResource.class));
setDefaultNodeSize(10000);
TreeNode treeNode = getRootTreeNode();
for(int i = 0; i < treeNode.getChildCount(); i++) {
treeNode.setChildOpen(i, true);
}
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:11,代码来源:ReportSelectListCellTree.java
示例4: scrollSelectedIntoView
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
public void scrollSelectedIntoView(CellTree cellTree) {
T selected = selectionModel.getSelectedObject();
if (selected == null) {
return;
}
scrollIntoView(cellTree, selected);
}
开发者ID:rkfg,项目名称:gwtutil,代码行数:8,代码来源:TreeViewHelper.java
示例5: scrollIntoView
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
public void scrollIntoView(CellTree cellTree, T item) {
NodeList<Element> elements = cellTree.getElement().getElementsByTagName("span");
String id = "celltree" + item.getId();
for (int i = 0; i < elements.getLength(); i++) {
Element element = elements.getItem(i);
if (element.getId().equals(id)) {
element.scrollIntoView();
return;
}
}
}
开发者ID:rkfg,项目名称:gwtutil,代码行数:13,代码来源:TreeViewHelper.java
示例6: onInitialize
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
/**
* Initialize this example.
*/
@ShowcaseSource
@Override
public Widget onInitialize() {
final MultiSelectionModel<ContactInfo> selectionModel =
new MultiSelectionModel<ContactInfo>(ContactDatabase.ContactInfo.KEY_PROVIDER);
selectionModel.addSelectionChangeHandler(
new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
StringBuilder sb = new StringBuilder();
boolean first = true;
List<ContactInfo> selected = new ArrayList<ContactInfo>(
selectionModel.getSelectedSet());
Collections.sort(selected);
for (ContactInfo value : selected) {
if (first) {
first = false;
} else {
sb.append(", ");
}
sb.append(value.getFullName());
}
selectedLabel.setText(sb.toString());
}
});
CellTree.Resources res = GWT.create(CellTree.BasicResources.class);
cellTree = new CellTree(
new ContactTreeViewModel(selectionModel), null, res);
cellTree.setAnimationEnabled(true);
// Create the UiBinder.
Binder uiBinder = GWT.create(Binder.class);
Widget widget = uiBinder.createAndBindUi(this);
return widget;
}
开发者ID:Peergos,项目名称:Peergos,代码行数:39,代码来源:CwCellTree.java
示例7: GwtTreeImpl
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
public GwtTreeImpl() {
super(new GwtTreeModel(), null, GWT.<CellTree.Resources>create(DefaultCellTreeResources.class), new CellTreeMessages() {
@Override
public String showMore() {
// should not never called - due page size is max
return "SHOW_MORE";
}
@Override
public String emptyTree() {
return "loading...";
}
}, Integer.MAX_VALUE);
getTreeViewModel().init(this);
}
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:GwtTreeImpl.java
示例8: ArchivePart
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
public ArchivePart () {
ctArchiveEntries = new CellTree(new ArchiveModel(), null,
BootstrapGwtCellTree.INSTANCE);
initWidget(uiBinder.createAndBindUi(this));
ctArchiveEntries.setAnimationEnabled(true);
}
开发者ID:billy1380,项目名称:blogwt,代码行数:7,代码来源:ArchivePart.java
示例9: getMenuTree
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
@Override
public CellTree getMenuTree() {
return menuTree;
}
开发者ID:kaaproject,项目名称:kaa,代码行数:5,代码来源:NavigationViewImpl.java
示例10: getMainMenu
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
/**
* Get the main menu used to select examples.
*
* @return the main menu
*/
public CellTree getMainMenu() {
return mainMenu;
}
开发者ID:Peergos,项目名称:Peergos,代码行数:9,代码来源:ShowcaseShell.java
示例11: cellTreeStyle
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
/**
* The styles used in this widget.
*/
@Source("consulo/web/gwt/client/resource/css/gwt-cell-tree.css")
CellTree.Style cellTreeStyle();
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:DefaultCellTreeResources.java
示例12: getMenuTree
import com.google.gwt.user.cellview.client.CellTree; //导入依赖的package包/类
CellTree getMenuTree();
开发者ID:kaaproject,项目名称:kaa,代码行数:2,代码来源:NavigationView.java
注:本文中的com.google.gwt.user.cellview.client.CellTree类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论