本文整理汇总了Java中com.google.gwt.user.client.ui.Tree.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java Tree.setStyleName方法的具体用法?Java Tree.setStyleName怎么用?Java Tree.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Tree
的用法示例。
在下文中一共展示了Tree.setStyleName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FolderSelectTree
import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
* Folder Tree
*/
public FolderSelectTree() {
tree = new Tree();
rootItem.setStyleName("okm-TreeItem");
rootItem.setUserObject(new GWTFolder());
rootItem.setSelected(true);
rootItem.setState(true);
tree.setStyleName("okm-Tree");
tree.addItem(rootItem);
tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
@Override
public void onSelection(SelectionEvent<TreeItem> event) {
boolean refresh = true;
TreeItem item = event.getSelectedItem();
// Case that not refreshing tree and file browser ( right click )
if (actualItem.equals(item)) {
refresh = false;
} else {
// Disables actual item because on changing active node by
// application this it's not changed automatically
if (!actualItem.equals(item)) {
actualItem.setSelected(false);
actualItem = item;
} else {
refresh = false;
}
}
if (refresh) {
refresh(true);
}
}
});
actualItem = tree.getItem(0);
initWidget(tree);
}
示例2: FolderSelectTree
import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
* Folder Tree
*/
public FolderSelectTree() {
tree = new Tree();
rootItem.setStyleName("okm-TreeItem");
rootItem.setUserObject(new GWTFolder());
rootItem.setSelected(true);
rootItem.setState(true);
tree.setStyleName("okm-Tree");
tree.addItem(rootItem);
tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
@Override
public void onSelection(SelectionEvent<TreeItem> event) {
boolean refresh = true;
TreeItem item = event.getSelectedItem();
// Enables or disables move button ( evalues security to move to folder with permissions )
if (rootItem.equals(item)) {
Main.get().categoriesPopup.enable(false);
} else {
Main.get().categoriesPopup.enable(true);
}
// Case that not refreshing tree and file browser ( right click )
if (actualItem.equals(item)) {
refresh = false;
} else {
// Disables actual item because on changing active node by
// application this it's not changed automatically
if (!actualItem.equals(item)) {
actualItem.setSelected(false);
actualItem = item;
} else {
refresh = false;
}
}
if (refresh) {
refresh(true);
}
}
});
actualItem = tree.getItem(0);
initWidget(tree);
}
示例3: FolderSelectTree
import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
* Folder Tree
*/
public FolderSelectTree() {
tree = new Tree();
rootItem.setStyleName("okm-TreeItem");
rootItem.setUserObject(new GWTFolder());
rootItem.setSelected(true);
rootItem.setState(true);
tree.setStyleName("okm-Tree");
tree.addItem(rootItem);
tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
@Override
public void onSelection(SelectionEvent<TreeItem> event) {
boolean refresh = true;
TreeItem item = event.getSelectedItem();
// Enables or disables move button ( evalues security to move to folder with permissions )
if (rootItem.equals(item)) {
Main.get().wizardPopup.categoriesWidget.enable(false);
} else {
Main.get().wizardPopup.categoriesWidget.enable(true);
}
// Case that not refreshing tree and file browser ( right click )
if (actualItem.equals(item)) {
refresh = false;
} else {
// Disables actual item because on changing active node by
// application this it's not changed automatically
if (!actualItem.equals(item)) {
actualItem.setSelected(false);
actualItem = item;
} else {
refresh = false;
}
}
if (refresh) {
refresh(true);
}
}
});
actualItem = tree.getItem(0);
initWidget(tree);
}
示例4: FolderSelectTree
import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
* Folder Tree
*/
public FolderSelectTree() {
tree = new Tree();
rootItem.setStyleName("okm-TreeItem");
rootItem.setUserObject(new GWTFolder());
rootItem.setSelected(true);
rootItem.setState(true);
tree.setStyleName("okm-Tree");
tree.addItem(rootItem);
tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
@Override
public void onSelection(SelectionEvent<TreeItem> event) {
boolean refresh = true;
TreeItem item = event.getSelectedItem();
// Case that not refreshing tree and file browser ( right click )
if (actualItem.equals(item)) {
refresh = false;
} else {
// Disables actual item because on changing active node by
// application this it's not changed automatically
if (!actualItem.equals(item)) {
actualItem.setSelected(false);
actualItem = item;
} else {
refresh = false;
}
}
// Enables or disables move button ( evalues security to move to folder with permissions )
if (rootItem.equals(actualItem)) {
Main.get().mainPanel.desktop.navigator.thesaurusTree.thesaurusSelectPopup.enable(false);
} else {
Main.get().mainPanel.desktop.navigator.thesaurusTree.thesaurusSelectPopup.enable(true);
}
if (refresh) {
refresh(true);
}
}
});
actualItem = tree.getItem(0);
initWidget(tree);
}
示例5: FolderSelectTree
import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
* Folder Tree
*/
public FolderSelectTree() {
tree = new Tree();
rootItem.setStyleName("okm-TreeItem");
rootItem.setUserObject(new GWTFolder());
rootItem.setSelected(true);
rootItem.setState(true);
tree.setStyleName("okm-Tree");
tree.addItem(rootItem);
tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
@Override
public void onSelection(SelectionEvent<TreeItem> event) {
boolean refresh = true;
TreeItem item = event.getSelectedItem();
// Enables or disables move button ( evalues security to move to folder with permissions )
if (rootItem.equals(item)) {
Main.get().mainPanel.desktop.navigator.categoriesTree.categoriesSelectPopup.enable(false);
} else {
Main.get().mainPanel.desktop.navigator.categoriesTree.categoriesSelectPopup.enable(true);
}
// Case that not refreshing tree and file browser ( right click )
if (actualItem.equals(item)) {
refresh = false;
} else {
// Disables actual item because on changing active node by
// application this it's not changed automatically
if (!actualItem.equals(item)) {
actualItem.setSelected(false);
actualItem = item;
} else {
refresh = false;
}
}
if (refresh) {
refresh(true);
}
}
});
actualItem = tree.getItem(0);
initWidget(tree);
}
示例6: FolderSelectTree
import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
* Folder Tree
*/
public FolderSelectTree() {
tree = new Tree();
rootItem.setStyleName("okm-TreeItem");
rootItem.setUserObject(new GWTFolder());
rootItem.setSelected(true);
rootItem.setState(true);
tree.setStyleName("okm-Tree");
tree.addItem(rootItem);
tree.addSelectionHandler(new SelectionHandler<TreeItem>() {
@Override
public void onSelection(SelectionEvent<TreeItem> event) {
boolean refresh = true;
TreeItem item = event.getSelectedItem();
// Enables or disables move button ( evalues security to move to folder with permissions )
evaluateSecurityToAction(item);
// Case that not refreshing tree and file browser ( right click )
if (actualItem.equals(item)) {
refresh = false;
} else {
// Disables actual item because on changing active node by
// application this it's not changed automatically
if (!actualItem.equals(item)) {
actualItem.setSelected(false);
actualItem = item;
} else {
refresh = false;
}
}
if (refresh) {
refresh(true);
}
}
});
actualItem = tree.getItem(0);
initWidget(tree);
}