com.extjs.gxt.desktop.client
Class Desktop

java.lang.Object
  extended by com.extjs.gxt.desktop.client.Desktop

public class Desktop
extends java.lang.Object

A desktop represents a desktop like application which contains a task bar, start menu, and shortcuts.

Rather than adding content directly to the root panel, content should be wrapped in windows. Windows can be opened via shortcuts and the start menu.

Desktop requires a 'x-desktop' element in your host page.

    <div id="x-desktop">
        <dl id="x-shortcuts"></dl>
    </div>
 


Field Summary
protected  Window activeWindow
           
protected  LayoutContainer desktop
           
protected  WindowListener listener
           
protected  El shortcutEl
           
protected  java.util.List<Shortcut> shortcuts
           
protected  TaskBar taskBar
           
protected  Viewport viewport
           
protected  java.util.List<Window> windows
           
 
Constructor Summary
Desktop()
           
 
Method Summary
 void addShortcut(Shortcut shortcut)
          Adds a shortcut to the desktop.
 void addWindow(Window window)
          Adds a window to the desktop.
 LayoutContainer getDesktop()
          Returns the container of the "desktop", which is the viewport minus the task bar.
 java.util.List<Shortcut> getShortcuts()
          Returns a list of the desktop's shortcuts.
 StartMenu getStartMenu()
          Returns the start menu.
 TaskBar getTaskBar()
          Returns the desktop's task bar.
 java.util.List<Window> getWindows()
          Returns a list of the desktop's windows.
protected  void initListeners()
           
 void minimizeWindow(Window window)
          Minimizes the window.
protected  void onHide(Window window)
           
 void removeShortcut(Shortcut shortcut)
          Removes a shortcut from the desktop.
 void removeWindow(Window window)
          Removes a window from the desktop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

taskBar

protected TaskBar taskBar

listener

protected WindowListener listener

viewport

protected Viewport viewport

desktop

protected LayoutContainer desktop

activeWindow

protected Window activeWindow

shortcuts

protected java.util.List<Shortcut> shortcuts

windows

protected java.util.List<Window> windows

shortcutEl

protected El shortcutEl
Constructor Detail

Desktop

public Desktop()
Method Detail

addShortcut

public void addShortcut(Shortcut shortcut)
Adds a shortcut to the desktop.

Parameters:
shortcut - the shortcut to add

addWindow

public void addWindow(Window window)
Adds a window to the desktop.

Parameters:
window - the window to add

getDesktop

public LayoutContainer getDesktop()
Returns the container of the "desktop", which is the viewport minus the task bar.

Returns:
the desktop layout container

getStartMenu

public StartMenu getStartMenu()
Returns the start menu.

Returns:
the start menu

getShortcuts

public java.util.List<Shortcut> getShortcuts()
Returns a list of the desktop's shortcuts.

Returns:
the shortcuts

getTaskBar

public TaskBar getTaskBar()
Returns the desktop's task bar.

Returns:
the task bar

getWindows

public java.util.List<Window> getWindows()
Returns a list of the desktop's windows.

Returns:
the windows

minimizeWindow

public void minimizeWindow(Window window)
Minimizes the window.

Parameters:
window - the window to minimize

removeShortcut

public void removeShortcut(Shortcut shortcut)
Removes a shortcut from the desktop.

Parameters:
shortcut - the shortcut to remove

removeWindow

public void removeWindow(Window window)
Removes a window from the desktop.

Parameters:
window - the window to remove

initListeners

protected void initListeners()

onHide

protected void onHide(Window window)