project35.tabletDeployment
Class TabletProject35Dialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by project35.tabletDeployment.TabletProject35Dialog
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class TabletProject35Dialog
extends javax.swing.JDialog
implements java.awt.event.ActionListener

is the main dialog used to render Project35 on a Tablet PC. It is different than the UI for Project35Dialog in a number of ways. First, it doesn't have a navigation tree on the left and a record view on the right. Instead a drop down box shows only a tree branch with the top element representing the root of the document and the bottom representing the currently selected element. TabletProject35Dialog can support multiple open files but doesn't spawn new windows other than a file selection or error dialog. Users can press the "where am I?" button and be taken to a separate view of the tree which shows the navigation tree. The idea of TabletProject35Dialog is to fit in the portrait orientation of a tablet PC. It is meant to have larger buttons and have text written in larger font than the normal Project35 application.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
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
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TabletProject35Dialog(Project35ApplicationContext project35ApplicationContext)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void changeFont(java.awt.Font font)
           
 AlertsPanel getAlertsPanel()
          same method used by Project35Dialog.
 DataEntryPanel getDataEntryPanel()
           
 FileSpaceRegistry getFileSpaceRegistry()
           
 java.lang.Object getTopCard()
           
 WhereAmIPanel getWhereAmIPanel()
           
 boolean isTopCard(java.awt.Component targetComponent)
           
 void openFile(java.io.File file)
           
 void popCard(java.awt.Component component)
          purges the top card in a card layout.
 void popCardsUntilDataEntryPanelAppears()
           
 void pushCard(java.lang.String name, java.awt.Component component)
          pushes new card onto card layout.
 int saveChanges(boolean promptForSaveChanges)
           
 void saveFileSpaceStateInformation()
          before switching to some other open file, save changes to the current record view and commit to memory what the currently selected node is in the current document
 void setFileSpace(FileSpace fileSpace)
          sets the current file space.
 boolean shutDown()
           
 void updateTitle(FileSpace fileSpace)
          update the title, just in case the currently selected file now has a different name
 void updateWindowMenu()
           
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, removeNotify, 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, remove, 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
 

Constructor Detail

TabletProject35Dialog

public TabletProject35Dialog(Project35ApplicationContext project35ApplicationContext)
Method Detail

getAlertsPanel

public AlertsPanel getAlertsPanel()
same method used by Project35Dialog. Creates an array of alert bundles that can be applied during validation activities.


getDataEntryPanel

public DataEntryPanel getDataEntryPanel()

getWhereAmIPanel

public WhereAmIPanel getWhereAmIPanel()

getFileSpaceRegistry

public FileSpaceRegistry getFileSpaceRegistry()

isTopCard

public boolean isTopCard(java.awt.Component targetComponent)

shutDown

public boolean shutDown()

openFile

public void openFile(java.io.File file)

saveChanges

public int saveChanges(boolean promptForSaveChanges)
                throws Project35Exception
Throws:
Project35Exception

setFileSpace

public void setFileSpace(FileSpace fileSpace)
sets the current file space. Although TPD doesn't support spawning new windows, it can load multiple files in a single invocation. However, the way the application manages to swap in one file for another into the current view is through the use of File spaces.


saveFileSpaceStateInformation

public void saveFileSpaceStateInformation()
before switching to some other open file, save changes to the current record view and commit to memory what the currently selected node is in the current document


updateTitle

public void updateTitle(FileSpace fileSpace)
update the title, just in case the currently selected file now has a different name


updateWindowMenu

public void updateWindowMenu()

popCard

public void popCard(java.awt.Component component)
purges the top card in a card layout. if the new view is either the data entry or the navigation tree view, the menu will show all its options sensitised. Otherwise, menu options are disabled to prevent undesired side effects


getTopCard

public java.lang.Object getTopCard()

pushCard

public void pushCard(java.lang.String name,
                     java.awt.Component component)
pushes new card onto card layout. if the new card is the data entry panel or the navigation panel, the menu options will appear sensitised


popCardsUntilDataEntryPanelAppears

public void popCardsUntilDataEntryPanelAppears()

changeFont

public void changeFont(java.awt.Font font)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener