本文整理汇总了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;
}