ARoad0.Gui1
Class Desktop

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by ARoad0.Gui1.Desktop
All Implemented Interfaces:
Singleton, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class Desktop
extends javax.swing.JFrame
implements Singleton

This class creates the Access Road desktop, and contains the main method. It displays the welcome message. It adds and resizes the internal frames. It uses other classes for managing the frame moving. Each Action class is in the gDMak package; it is referenced through one single instance for the event handling from the program main menu. See the Copyright.

See Also:
InternalFrame, IconPolice, InsideDesktop, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  char a
           
 ActionAboutARoad actionAboutARoad
           
 ActionAcsAddonGuides actionAcsAddonGuides
           
 ActionBasicTutorial actionBasicTutorial
           
 ActionClose actionClose
           
 ActionCopy actionCopy
           
 ActionExit actionExit
           
 ActionExportPNG actionExportPNG
           
 ActionHelpConcepts actionHelpConcepts
           
 ActionImportACS actionImportACS
           
 ActionNewACSyst actionNewACSyst
           
 ActionNewView actionNewView
           
 ActionOpenACSyst actionOpenACSyst
           
 ActionOpenAllFullViews actionOpenAllFullViews
           
 ActionOpenAllNoThanViews actionOpenAllNoThanViews
           
 ActionOpenBeamer actionOpenBeamer
           
 ActionOpenGlobalStructure actionOpenGlobalStructure
           
 ActionOpenMainFrame actionOpenMainFrame
           
 ActionOpenSketcher actionOpenSketcher
           
 ActionOpenGraphicView actionOpenUserV
           
 ActionRemove actionRemove
           
 ActionSave actionSave
           
 ActionSaveAll actionSaveAll
           
 InternalFrameTiler actionTile
           
static java.lang.String AR_DIR
          AR_DIR is the path to ARoad0 directory in String, with the operating system file separator.
static java.net.URI AR_URI
          AR_URI is the URI of the 'ARoad0/' directory, whatever the operating system
static java.awt.Font BOLD_FONT
          Bold font with FONT_SIZE + 1 as size
(package private)  char c
           
(package private)  javax.swing.JComboBox comboI
           
(package private)  javax.swing.JComboBox comboU
           
static java.lang.String CURRENT_DIR
          after the init, CURRENT_DIR is the current directory with '/' as separator whatever the operating system
static java.net.URI CURRENT_DIR_URI
          Initial file path, only for the development context ON LINUX
protected static javax.swing.JDesktopPane desk__
           
static boolean developContext__
           
(package private)  char e
           
(package private)  javax.swing.JMenu editMenuE
           
(package private)  char[] editShortcuts
           
(package private)  char f
           
(package private)  javax.swing.JMenu fileMenuE
           
static java.lang.String FILES_SEPAR
           
(package private)  char[] fileShortcuts
           
static int FONT_SIZE
          Font size
(package private)  char g
           
(package private)  javax.swing.JMenu goMenuE
           
(package private)  char h
           
(package private)  javax.swing.JMenu helpMenuE
           
(package private)  char[] helpShortcuts
           
(package private)  char I
           
protected static Desktop instance__
           
static java.awt.Font ITALIC_FONT
          Italic font
(package private)  char l
           
static java.lang.String LINE_SEPAR
           
(package private)  javax.swing.JMenuBar menuBar
           
(package private)  char n
           
(package private)  javax.swing.JMenu newMenuE
           
(package private)  char o
           
(package private)  javax.swing.JMenu openMenuE
           
static java.awt.Font PLAIN_FONT
          Plain font
(package private)  char r
           
(package private)  char t
           
protected static java.lang.String title__
           
(package private)  javax.swing.JToolBar toolBar1
           
(package private)  javax.swing.JMenu toolsMenuE
           
static java.lang.String URL_SEPAR
           
static java.lang.String USER_DIR
           
(package private)  char w
           
(package private)  javax.swing.JMenu windowMenuE
           
(package private)  char[] windowShortcuts
           
(package private)  char x
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected Desktop()
          Protected constructor following the singleton pattern.
 
Method Summary
static void addFrame(javax.swing.JInternalFrame _f, java.lang.Integer _i)
          Adds a JInternalFrame in the main window.
static javax.swing.JInternalFrame[] getCurrentFrames()
          Get the open windows.
static javax.swing.JDesktopPane getDesktopPane()
          Get the desktop pane of the main window.
static java.awt.Dimension getDSize()
          Gets the size of the main window
static Desktop getInstance()
          The only method to get a desktop object.
private  void init()
          The main window is initialized there, then setVisible(true) is called, so this is the only method for the GUI which can be called outside the Event Dispatch Thread.
static void main(java.lang.String[] args)
          Main method of the application.
static void resizeIFrame(javax.swing.JInternalFrame _f, int _x, int _y, int _w, int _h)
          Resizes a frame
static void restoreLastGUI()
          Restores the positions of the last open frames, from the GUI configuration map.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

CURRENT_DIR

public static java.lang.String CURRENT_DIR
after the init, CURRENT_DIR is the current directory with '/' as separator whatever the operating system


USER_DIR

public static final java.lang.String USER_DIR

FILES_SEPAR

public static final java.lang.String FILES_SEPAR

URL_SEPAR

public static final java.lang.String URL_SEPAR
See Also:
Constant Field Values

LINE_SEPAR

public static final java.lang.String LINE_SEPAR

CURRENT_DIR_URI

public static java.net.URI CURRENT_DIR_URI
Initial file path, only for the development context ON LINUX


AR_URI

public static java.net.URI AR_URI
AR_URI is the URI of the 'ARoad0/' directory, whatever the operating system


AR_DIR

public static java.lang.String AR_DIR
AR_DIR is the path to ARoad0 directory in String, with the operating system file separator. Used by ActionBasicTutorial, ActionHelpConcepts, BaseManagerImpl.updateAndSaveAcsAddonDescriptors()


developContext__

public static boolean developContext__

instance__

protected static Desktop instance__

title__

protected static java.lang.String title__

desk__

protected static javax.swing.JDesktopPane desk__

menuBar

javax.swing.JMenuBar menuBar

fileMenuE

javax.swing.JMenu fileMenuE

editMenuE

javax.swing.JMenu editMenuE

windowMenuE

javax.swing.JMenu windowMenuE

goMenuE

javax.swing.JMenu goMenuE

toolsMenuE

javax.swing.JMenu toolsMenuE

helpMenuE

javax.swing.JMenu helpMenuE

newMenuE

javax.swing.JMenu newMenuE

openMenuE

javax.swing.JMenu openMenuE

toolBar1

javax.swing.JToolBar toolBar1

actionNewView

public ActionNewView actionNewView

actionNewACSyst

public ActionNewACSyst actionNewACSyst

actionOpenACSyst

public ActionOpenACSyst actionOpenACSyst

actionOpenUserV

public ActionOpenGraphicView actionOpenUserV

actionSave

public ActionSave actionSave

actionSaveAll

public ActionSaveAll actionSaveAll

actionClose

public ActionClose actionClose

actionRemove

public ActionRemove actionRemove

actionExit

public ActionExit actionExit

actionImportACS

public ActionImportACS actionImportACS

actionExportPNG

public ActionExportPNG actionExportPNG

actionCopy

public ActionCopy actionCopy

actionOpenMainFrame

public ActionOpenMainFrame actionOpenMainFrame

actionOpenBeamer

public ActionOpenBeamer actionOpenBeamer

actionTile

public InternalFrameTiler actionTile

actionOpenAllFullViews

public ActionOpenAllFullViews actionOpenAllFullViews

actionOpenAllNoThanViews

public ActionOpenAllNoThanViews actionOpenAllNoThanViews

actionOpenSketcher

public ActionOpenSketcher actionOpenSketcher

actionOpenGlobalStructure

public ActionOpenGlobalStructure actionOpenGlobalStructure

actionAboutARoad

public ActionAboutARoad actionAboutARoad

actionBasicTutorial

public ActionBasicTutorial actionBasicTutorial

actionHelpConcepts

public ActionHelpConcepts actionHelpConcepts

actionAcsAddonGuides

public ActionAcsAddonGuides actionAcsAddonGuides

f

char f

e

char e

l

char l

w

char w

g

char g

t

char t

h

char h

n

char n

o

char o

r

char r

x

char x

c

char c

I

char I

a

char a

fileShortcuts

char[] fileShortcuts

editShortcuts

char[] editShortcuts

windowShortcuts

char[] windowShortcuts

helpShortcuts

char[] helpShortcuts

comboI

javax.swing.JComboBox comboI

comboU

javax.swing.JComboBox comboU

FONT_SIZE

public static final int FONT_SIZE
Font size

See Also:
Constant Field Values

ITALIC_FONT

public static final java.awt.Font ITALIC_FONT
Italic font


PLAIN_FONT

public static final java.awt.Font PLAIN_FONT
Plain font


BOLD_FONT

public static final java.awt.Font BOLD_FONT
Bold font with FONT_SIZE + 1 as size

Constructor Detail

Desktop

protected Desktop()
           throws java.lang.Exception
Protected constructor following the singleton pattern.

Throws:
java.lang.Exception
Method Detail

getInstance

public static Desktop getInstance()
The only method to get a desktop object. (singleton class, so the constructor is protected)


init

private void init()
           throws java.lang.Exception
The main window is initialized there, then setVisible(true) is called, so this is the only method for the GUI which can be called outside the Event Dispatch Thread.

Throws:
java.lang.Exception

addFrame

public static void addFrame(javax.swing.JInternalFrame _f,
                            java.lang.Integer _i)
Adds a JInternalFrame in the main window.

Parameters:
_f - JInternalFrame
_i - Integer

getCurrentFrames

public static javax.swing.JInternalFrame[] getCurrentFrames()
Get the open windows. Called by GraphicViewBaseListenerImpl.changeFrameView(), updateFrameViewRights().

Returns:
JInternalFrame[] array of the open windows

getDesktopPane

public static javax.swing.JDesktopPane getDesktopPane()
Get the desktop pane of the main window.

Returns:
JDesktopPane

resizeIFrame

public static void resizeIFrame(javax.swing.JInternalFrame _f,
                                int _x,
                                int _y,
                                int _w,
                                int _h)
Resizes a frame

Parameters:
_f - JInternalFrame
_x - int
_y - int
_w - int width
_h - int height of the frame

getDSize

public static java.awt.Dimension getDSize()
Gets the size of the main window

Returns:
Dimension

restoreLastGUI

public static void restoreLastGUI()
Restores the positions of the last open frames, from the GUI configuration map. Called by the method main.

See Also:
ActionSaveAll

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method of the application. Test the java version and the state development/production of the environment. Select the look and feel Metal. Set the background image and restore the last GUI configuration, in a sequence of calls to the Event Dispatch Thread which provides a smooth starting of the GUI.

Parameters:
args - is null
Throws:
java.lang.Exception