本文整理匯總了Java中com.extjs.gxt.desktop.client.Desktop類的典型用法代碼示例。如果您正苦於以下問題:Java Desktop類的具體用法?Java Desktop怎麽用?Java Desktop使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Desktop類屬於com.extjs.gxt.desktop.client包,在下文中一共展示了Desktop類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getHelpPanel
import com.extjs.gxt.desktop.client.Desktop; //導入依賴的package包/類
private static HelpInfo getHelpPanel() {
if (helpPanel == null) {
helpPanel = new HelpInfo();
}
Desktop desktop = CMDBSession.get().getDesktop();
boolean found = false;
for (Window w : desktop.getWindows()) {
if (w.equals(helpPanel)) {
found = true;
}
}
if (!found) {
desktop.addWindow(helpPanel);
}
return(helpPanel);
}
示例2: updateShortcuts
import com.extjs.gxt.desktop.client.Desktop; //導入依賴的package包/類
public static void updateShortcuts(Desktop desktop, final CMDBDesktopMenuItem desktopItem) {
if (desktopItem.getWindowItem() != null) {
CMDBDesktopWindowItem windowItem = desktopItem.getWindowItem();
Object o = windowItem.get("shortcut");
if (o instanceof BaseModel) {
BaseModel shortcut = windowItem.get("shortcut");
Shortcut s = new Shortcut();
String sText = shortcut.get("text", "[Not specified!}");
String style = shortcut.get("style", "shortcuts-default");
String tooltip = shortcut.get("tooltip");
s.setText(sText);
s.setId(style);
if (tooltip != null && tooltip.length() > 0) {
s.setToolTip(tooltip);
}
s.addSelectionListener(new SelectionListener<ComponentEvent>() {
@Override
public void componentSelected(ComponentEvent ce) {
Dispatcher.get().dispatch(new AppEvent<CMDBDesktopMenuItem>(CMDBEvents.DESKTOP_MENU_SELECTED, desktopItem));
}
});
desktop.addShortcut(s);
}
}
// Check if submenus.
if (desktopItem.getMenuItem()!= null && desktopItem.getMenuItem().size() > 0) {
for (CMDBDesktopMenuItem childItem : desktopItem.getMenuItem()) {
updateShortcuts(desktop, childItem);
}
}
}
示例3: setDesktop
import com.extjs.gxt.desktop.client.Desktop; //導入依賴的package包/類
public void setDesktop(Desktop desktop) {
this.desktop = desktop;
}
示例4: getDesktop
import com.extjs.gxt.desktop.client.Desktop; //導入依賴的package包/類
public Desktop getDesktop() {
return(this.desktop);
}
示例5: getDesktop
import com.extjs.gxt.desktop.client.Desktop; //導入依賴的package包/類
/**
* Gets the desktop.
* @return The desktop.
*/
public Desktop getDesktop()
{
return desktop;
}