当前位置: 首页 > 工具软件 > Folder Tree > 使用案例 >

java getitem方法,Java Tree.getItem方法代碼示例

商正诚
2023-12-01

本文整理匯總了Java中com.google.gwt.user.client.ui.Tree.getItem方法的典型用法代碼示例。如果您正苦於以下問題:Java Tree.getItem方法的具體用法?Java Tree.getItem怎麽用?Java Tree.getItem使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.Tree的用法示例。

在下文中一共展示了Tree.getItem方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。

示例1: FolderSelectTree

​點讚 2

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() {

@Override

public void onSelection(SelectionEvent 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);

}

開發者ID:openkm,項目名稱:document-management-system,代碼行數:40,

示例2: getTreeItem

​點讚 2

import com.google.gwt.user.client.ui.Tree; //導入方法依賴的package包/類

/**

* Allows to retrieve the tree item by name

* @param tree the tree to take the item from

* @param itemText the text of the item we want to get the sate of

* @return the tree item with the given text, or null if there is no such item

*/

private static TreeItem getTreeItem( final Tree tree, final String itemText ) {

if( tree != null ) {

for( int i = 0; i < tree.getItemCount(); i++ ) {

TreeItem oldTreeItem = tree.getItem( i );

if( oldTreeItem.getText().equals( itemText ) ) {

return oldTreeItem;

}

}

}

return null;

}

開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:18,

示例3: FolderSelectTree

​點讚 2

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() {

@Override

public void onSelection(SelectionEvent 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);

}

開發者ID:openkm,項目名稱:document-management-system,代碼行數:47,

示例4: FolderSelectTree

​點讚 2

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() {

@Override

public void onSelection(SelectionEvent 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);

}

開發者ID:openkm,項目名稱:document-management-system,代碼行數:47,

示例5: FolderSelectTree

​點讚 2

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() {

@Override

public void onSelection(SelectionEvent 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);

}

開發者ID:openkm,項目名稱:document-management-system,代碼行數:47,

示例6: FolderSelectTree

​點讚 2

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() {

@Override

public void onSelection(SelectionEvent 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);

}

開發者ID:openkm,項目名稱:document-management-system,代碼行數:47,

示例7: FolderSelectTree

​點讚 2

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() {

@Override

public void onSelection(SelectionEvent 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);

}

開發者ID:openkm,項目名稱:document-management-system,代碼行數:44,

注:本文中的com.google.gwt.user.client.ui.Tree.getItem方法示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。

 类似资料: