watch
Class EditorMainFrame

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 watch.EditorMainFrame
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

 class EditorMainFrame
extends javax.swing.JFrame

Editor main frame. Contains editor application constants. The content of the frame constitutes the content of the document. Therefore, a changed status is directly managed by this class.


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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.awt.Color COLOR_BACKGROUND
          Color of the background of the frame.
static java.awt.Color COLOR_DAY_TITLE
          Color of the header day panels.
static java.awt.Color COLOR_HEADER_BACKGROUND
          Color of the background of the imputation header panel.
static java.awt.Color COLOR_HEADER_FOREGROUND
          Color of the foreground of the imputation header panel.
static int DAY_WIDTH
          Default day field width (in characters).
static int DEFAULT_WINDOW_HEIGHT
          Default window height.
static int DEFAULT_WINDOW_WIDTH
          Default window width.
static int LOCK_WIDTH
          Default lock field width (in characters).
static int NUMBER_WIDTH
          Default number field width (in characters).
static int SCROLL_WIDTH
          Default scroll field width (in characters).
static int USER_WIDTH
          Default user name field width (in characters).
 
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
EditorMainFrame()
          Constructor.
 
Method Summary
static void configureTextField(javax.swing.JTextField SW_TextField, int I_FieldWidth)
          Static text field configuration.
 boolean getbChanged()
          Changed status accessor.
 EditorDayPanel getDay(Date W_Date)
          Day panel accessor or creation on a given date.
 java.util.Collection<EditorDayPanel> getDays()
          Days of imputations accessor.
 java.lang.String getSafeUserName()
          Safe user name accessor.
 java.lang.String getUserName()
          User name accessor.
 void loadComplete()
          Load complete notification.
 void setChanged()
          Changed status notification.
 void setUnchanged()
          Unchanged status notifications.
 void setUserName(java.lang.String J_UserName)
          User name setting.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, 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, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, paint, 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, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

DEFAULT_WINDOW_WIDTH

public static final int DEFAULT_WINDOW_WIDTH
Default window width.

See Also:
Constant Field Values

DEFAULT_WINDOW_HEIGHT

public static final int DEFAULT_WINDOW_HEIGHT
Default window height.

See Also:
Constant Field Values

NUMBER_WIDTH

public static final int NUMBER_WIDTH
Default number field width (in characters).

See Also:
Constant Field Values

USER_WIDTH

public static final int USER_WIDTH
Default user name field width (in characters).

See Also:
Constant Field Values

LOCK_WIDTH

public static final int LOCK_WIDTH
Default lock field width (in characters).

See Also:
Constant Field Values

DAY_WIDTH

public static final int DAY_WIDTH
Default day field width (in characters).

See Also:
Constant Field Values

SCROLL_WIDTH

public static final int SCROLL_WIDTH
Default scroll field width (in characters). Hack for alignment of the imputation header panel with the scroll bar.

See Also:
Constant Field Values

COLOR_BACKGROUND

public static final java.awt.Color COLOR_BACKGROUND
Color of the background of the frame.


COLOR_DAY_TITLE

public static final java.awt.Color COLOR_DAY_TITLE
Color of the header day panels.


COLOR_HEADER_BACKGROUND

public static final java.awt.Color COLOR_HEADER_BACKGROUND
Color of the background of the imputation header panel.


COLOR_HEADER_FOREGROUND

public static final java.awt.Color COLOR_HEADER_FOREGROUND
Color of the foreground of the imputation header panel.

Constructor Detail

EditorMainFrame

public EditorMainFrame()
Constructor.

Method Detail

configureTextField

public static void configureTextField(javax.swing.JTextField SW_TextField,
                                      int I_FieldWidth)
Static text field configuration. Size, alignment...

Parameters:
SW_TextField - Text field to configure.
I_FieldWidth - Required text field in characters.

setChanged

public void setChanged()
Changed status notification. Automatically updates the title of the frame.


setUnchanged

public void setUnchanged()
Unchanged status notifications. Automatically updates the title of the frame.


getbChanged

public boolean getbChanged()
Changed status accessor.

Returns:
The changed status.

loadComplete

public void loadComplete()
Load complete notification. Useful at startup. Editor loads all input files given in the command line arguments, then calls this notification method.


setUserName

public void setUserName(java.lang.String J_UserName)
User name setting. Since the application manages only one user per frame, a warning message is displayed when several users are specified.

Parameters:
J_UserName - New user name.

getUserName

public java.lang.String getUserName()
User name accessor.

Returns:
The current user name. null if not set.

getSafeUserName

public java.lang.String getSafeUserName()
Safe user name accessor.

Returns:
The current user name. An empty string if not set.

getDays

public java.util.Collection<EditorDayPanel> getDays()
Days of imputations accessor.

Returns:
The list of day panels, containing imputation panels each.

getDay

public EditorDayPanel getDay(Date W_Date)
Day panel accessor or creation on a given date. Searches for the given date in current day panels, and returns it when the date is found. Creates a new day panel otherwise.

Parameters:
W_Date - Searched date.
Returns:
The day panel researched or the new day panel.