Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junk
Class JXDefaultWM  view JXDefaultWM download JXDefaultWM.java

java.lang.Object
  extended byarch.module.JXModule
      extended byarch.module.minor.JXMinorModule
          extended byjunk.JXDefaultWM
All Implemented Interfaces:
arch.module.icore.JXWindowManagerInterface

public class JXDefaultWM
extends arch.module.minor.JXMinorModule
implements arch.module.icore.JXWindowManagerInterface

JXDefaultWM is the default Java window manager for the JD4X desktop. It has to be first registered with Moth before it can take effect. JUNK is responsible for selecting the desired window manager and registering it with Moth. Once the window manager has been determined, Moth will notify it whenever an event of interest occurs. The Java window manager is free to make any decisions regarding window behaviors. In this way the Java window manager controls the desktop without lossing too much performance. The degree of control that the Java window manager has, will depend on the specific platform implementation of the windowing module (in the default case, Moth). Although the default Java window manager implements a standard desktop user interface, Java developers are not restricted to them. With the standard JD4X window manager interface, Java developers are free to implement desktop pagers, user workspace and etc.
Refer to the section on extending the JD4X desktop in the design and specification document (dns.sxw) for more details of how to develop your own Java window manager.

Since:
JD4X 1.0
Version:
0.1, 27/06/2003

Nested Class Summary
protected  class JXDefaultWM.IconAction
          Action to iconfy and deiconfy the native frame.
protected  class JXDefaultWM.WindowIconSet
          GUI management class to associate an icon to a window using a common ID.
 
Field Summary
private  javax.swing.JPanel appletManager
          Applet manager.
private  javax.swing.JMenu dm
          Desktop menu.
private  JXDefaultWM.IconAction ia
          General desired iconfy and deiconfy action.
private  javax.swing.JPanel iconManager
          Icon manager.
private  junk.gui.background.JXBackground pseudoRoot
          Desktop background.
private  javax.swing.JPanel taskBar
          Desktop task bar.
private  java.util.Hashtable winTable
          Active window collection.
static int WM_ID
          Window manager ID
 
Fields inherited from class arch.module.JXModule
 
Constructor Summary
JXDefaultWM()
          Default constructor.
 
Method Summary
 void addDesktopGUI(javax.swing.JComponent c)
          Add a new desktop GUI component to the window manager task bar.
 java.lang.String getCredits()
          It allows the module developer to provide his/her information.
 javax.swing.JComponent getDesktopGUI()
          Initialize all GUI components for client interaction.
 arch.message.error.JXError init()
          Initialize the module.
 void initBackground()
          Facility that sets up the background of the desktop and the desktop task bar.
 void restoreDesktopState()
          Facility provides a standardize call to restore all window states on boot up of desktop, restoring all unclosed window states during last desktop shutdown.
 void restoreWindowState(arch.module.data.JXWindow win)
          Facility provides a way to restore saved window state.
 void saveDesktopState()
          Facility provides a standardize call to save all window states if a shutdown was initiated while the windows are still opened or when Window states needs to be restored on the next boot up.
 void saveWindowState(arch.module.data.JXWindow win)
          Facility provides a way to save window state so that can be restored.
 arch.message.error.JXError shutdown()
          It allows the module to do its own clean up of resources, save its states and to close the module down.
 java.lang.String toString()
          Get a string representation of this minor module.
 void windowActivated(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is activated.
 void windowClosed(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is closed.
 void windowClosing(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is closing.
 void windowDeactivated(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is de-activated.
 void windowDeiconfied(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is deiconfied.
 void windowIconfied(arch.module.data.JXWindow win)
          The dafault WM merely display an icon on the task bar, so that users can click on it to deiconfy it when desired.
 void windowMoved(arch.module.data.JXWindow win)
          Facility that allows any action to be taken after window is moved.
 void windowMoving(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is moving.
 void windowOpened(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is opened.
 void windowResized(arch.module.data.JXWindow win)
          Facility that allows any action to be taken after window is resized.
 void windowResizing(arch.module.data.JXWindow win)
          Facility that allows any action to be taken when window is resizing.
 
Methods inherited from class arch.module.JXModule
equals, getModuleID, getVersion, hashCode, isJXCoreModuleValid, makeRequest, setJXCoreModule, setModuleID, setVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

pseudoRoot

private junk.gui.background.JXBackground pseudoRoot
Desktop background.


taskBar

private javax.swing.JPanel taskBar
Desktop task bar.


dm

private javax.swing.JMenu dm
Desktop menu.


iconManager

private javax.swing.JPanel iconManager
Icon manager.


appletManager

private javax.swing.JPanel appletManager
Applet manager.


ia

private JXDefaultWM.IconAction ia
General desired iconfy and deiconfy action.


winTable

private java.util.Hashtable winTable
Active window collection.


WM_ID

public static final int WM_ID
Window manager ID

See Also:
Constant Field Values
Constructor Detail

JXDefaultWM

public JXDefaultWM()
Default constructor.

Method Detail

addDesktopGUI

public void addDesktopGUI(javax.swing.JComponent c)
Add a new desktop GUI component to the window manager task bar. The default JD4X window manager currently only supports: JMenu, JMenuItem, JButton, JPanel and JApplet.

Specified by:
addDesktopGUI in interface arch.module.icore.JXWindowManagerInterface

getCredits

public java.lang.String getCredits()
It allows the module developer to provide his/her information. The basic information should be short and should include the following format each on its own line:
Module: Name, version
Develop By: Name, . Name, . [...]


getDesktopGUI

public javax.swing.JComponent getDesktopGUI()
Initialize all GUI components for client interaction.


init

public arch.message.error.JXError init()
Initialize the module.


initBackground

public void initBackground()
Facility that sets up the background of the desktop and the desktop task bar.

Specified by:
initBackground in interface arch.module.icore.JXWindowManagerInterface

restoreDesktopState

public void restoreDesktopState()
Facility provides a standardize call to restore all window states on boot up of desktop, restoring all unclosed window states during last desktop shutdown.

Specified by:
restoreDesktopState in interface arch.module.icore.JXWindowManagerInterface

restoreWindowState

public void restoreWindowState(arch.module.data.JXWindow win)
Facility provides a way to restore saved window state.

Specified by:
restoreWindowState in interface arch.module.icore.JXWindowManagerInterface

saveDesktopState

public void saveDesktopState()
Facility provides a standardize call to save all window states if a shutdown was initiated while the windows are still opened or when Window states needs to be restored on the next boot up.

Specified by:
saveDesktopState in interface arch.module.icore.JXWindowManagerInterface

saveWindowState

public void saveWindowState(arch.module.data.JXWindow win)
Facility provides a way to save window state so that can be restored.

Specified by:
saveWindowState in interface arch.module.icore.JXWindowManagerInterface

shutdown

public arch.message.error.JXError shutdown()
It allows the module to do its own clean up of resources, save its states and to close the module down.


toString

public java.lang.String toString()
Get a string representation of this minor module. The exact details of the representation are unspecified and subject to change, but the following maybe regarded as typical: JD4X , [mn]. It can be interpreted as module id = 7, version = 0.1 and a minor module.


windowMoved

public void windowMoved(arch.module.data.JXWindow win)
Facility that allows any action to be taken after window is moved.

Specified by:
windowMoved in interface arch.module.icore.JXWindowManagerInterface

windowMoving

public void windowMoving(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is moving.

Specified by:
windowMoving in interface arch.module.icore.JXWindowManagerInterface

windowIconfied

public void windowIconfied(arch.module.data.JXWindow win)
The dafault WM merely display an icon on the task bar, so that users can click on it to deiconfy it when desired.

Specified by:
windowIconfied in interface arch.module.icore.JXWindowManagerInterface

windowDeiconfied

public void windowDeiconfied(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is deiconfied.

Specified by:
windowDeiconfied in interface arch.module.icore.JXWindowManagerInterface

windowClosed

public void windowClosed(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is closed.

Specified by:
windowClosed in interface arch.module.icore.JXWindowManagerInterface

windowClosing

public void windowClosing(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is closing.

Specified by:
windowClosing in interface arch.module.icore.JXWindowManagerInterface

windowOpened

public void windowOpened(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is opened.

Specified by:
windowOpened in interface arch.module.icore.JXWindowManagerInterface

windowResized

public void windowResized(arch.module.data.JXWindow win)
Facility that allows any action to be taken after window is resized.

Specified by:
windowResized in interface arch.module.icore.JXWindowManagerInterface

windowResizing

public void windowResizing(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is resizing.

Specified by:
windowResizing in interface arch.module.icore.JXWindowManagerInterface

windowActivated

public void windowActivated(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is activated.

Specified by:
windowActivated in interface arch.module.icore.JXWindowManagerInterface

windowDeactivated

public void windowDeactivated(arch.module.data.JXWindow win)
Facility that allows any action to be taken when window is de-activated.

Specified by:
windowDeactivated in interface arch.module.icore.JXWindowManagerInterface