本文整理汇总了Java中com.google.gwt.user.cellview.client.CellTree.setAnimationEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java CellTree.setAnimationEnabled方法的具体用法?Java CellTree.setAnimationEnabled怎么用?Java CellTree.setAnimationEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.cellview.client.CellTree
的用法示例。
在下文中一共展示了CellTree.setAnimationEnabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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;
}
示例3: 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);
}