wt.clients.doc
Class CreateDocumentFrame

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended bywt.clients.doc.CreateDocumentFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class CreateDocumentFrame
extends Frame

Class CreateDocumentFrame provides a GUI frame for creating WTDocument objects. This frame provides fields for capturing the attributes of the WTDocument, and contains a WTContentHolder panel for adding content to the WTDocument. This frame does not support creating multiple documents in one session, but allows the user to further update the WTDocument after it has been created.

E.g.

       CreateDocumentFrame create_frame = new CreateDocumentFrame();
       create_frame.setDocumentType( wt.doc.DocumentType );
       create_frame.setParentFolder( folder_to_create_doc_in );
       create_frame.show();
  

See Also:
DocumentTaskLogic,

Supported API: false

Extendable: false
, Serialized Form

Nested Class Summary
private  class CreateDocumentFrame.ActionThread
          Inner Thread class which is used to perform actions asynchronously.
(package private)  class CreateDocumentFrame.DocumentHandle
           
(package private)  class CreateDocumentFrame.HelpPropertyChangeListener
           
(package private)  class CreateDocumentFrame.SymAction
           
(package private)  class CreateDocumentFrame.SymItem
           
(package private)  class CreateDocumentFrame.SymJCAction
           
(package private)  class CreateDocumentFrame.SymKey
           
(package private)  class CreateDocumentFrame.SymMouse
           
(package private)  class CreateDocumentFrame.SymWindow
           
 
Nested classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  String alternateText
           
(package private)  Button browseButton
           
(package private)  Panel buttonPanel
           
(package private)  Button cancelButton
           
(package private)  symantec.itools.awt.BorderPanel cardPanel
           
(package private)  jclass.bwt.JCButton contentsButton
           
private  ContentsPanel contentsPanel
          The panel which contains the WTContentHolder bean for adding content to the document being created.
private  ThreadGroup contextGroup
          Maintains the ThreadGroup to be used for setting and getting the appropriate WTContext.
(package private)  TextField createInTextField
           
(package private)  EnumeratedChoice departmentChoice
           
(package private)  Label departmentLabel
           
(package private)  Label descriptionLabel
           
(package private)  WTTextArea descriptionTextArea
           
private  CreateDocumentFrame.DocumentHandle documentHandle
          DocumentHandle used to reference the document being created.
private  DocumentType documentType
          Specifies the type of document to create.
(package private)  EnumeratedChoice documentTypeChoice
           
(package private)  boolean fComponentsAdjusted
           
private static String HELP_TARGET
          Defined constant used to specify the web browser target window in which to launch the online help.
(package private)  Button helpButton
           
private  HelpContext helpContext
          Used with the HelpSystem.
private  HelpSystem helpSystem
          The HelpSystem which provides online help, tooltips, and status messages for this frame.
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine1
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine2
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine3
           
(package private)  HTTPUploadDownloadPanel hTTPUploadDownloadPanel1
           
private  boolean inDescendent
           
protected static int INIT_CONTENT
          Defined constant used to determine which actions to perform when launching a new ActionThread.
protected static int INIT_DEPARTMENTS
          Defined constant used to determine which actions to perform when launching a new ActionThread.
protected static int INIT_LOCATION
          Defined constant used to determine which actions to perform when launching a new ActionThread.
protected static int INIT_REFERENCE
          Defined constant used to determine which actions to perform when launching a new ActionThread.
protected static int INIT_STRUCTURE
          Defined constant used to determine which actions to perform when launching a new ActionThread.
(package private)  LifeCycleInfo lifeCycleInfo1
           
private  Object lockStr
           
(package private)  Panel messagePanel
           
(package private)  Label nameLabel
           
(package private)  TextField nameTextField
           
private  boolean numberEnabled
           
(package private)  Label numberLabel
           
(package private)  TextField numberTextField
           
(package private)  Button okButton
           
(package private)  OrgChooser orgChooser
           
(package private)  Label orgLabel
           
private  Applet parentApplet
          The Applet which is used to provide context for this frame.
private  Folder parentFolder
          The Folder in which to create the new document.
private  boolean parentFolderComplete
          Boolean used for controlling the updating of the parent folder.
private  Object parentFolderLock
          Lock used for controlling the updating of the parent folder.
(package private)  jclass.bwt.JCButton referenceButton
           
private  ReferencePanel referencePanel
          The panel which contains the AssociationsPanel bean for adding references to the document.
(package private)  Panel relationsPanel
           
private static ResourceBundle resources
          Variable which maintains the ResourceBundle used for getting localized text for fields, labels and eror-messages of this frame.
private static String RESOURCES
          Defined constant which specifies a String representation of the fully-qualified class name of the ResourceBundle containing localized text for the fields, labels and error-messages of this frame.
protected static int SAVE_AND_CLOSE
          Defined constant used to determine which actions to perform when launching a new ActionThread.
protected static int SAVE_DOCUMENT
          Defined constant used to determine which actions to perform when launching a new ActionThread.
private  String savedText
           
(package private)  Label saveInLabel
           
private static boolean SHOW_ORG_ID
           
(package private)  TextField statusTextField
           
(package private)  jclass.bwt.JCButton structureButton
           
private  StructurePanel structurePanel
          The panel which contains the AssociationsPanel bean for adding structure to the document.
(package private)  Panel tabsPanel
           
private  Class target
           
(package private)  Label titleLabel
           
(package private)  TextField titleTextField
           
(package private)  Label typeLabel
           
private  boolean updateMode
          Boolean flag indicating whether or not this frame is in update mode.
 
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.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CreateDocumentFrame()
          Default constructor for CreateDocumentFrame
CreateDocumentFrame(Applet a_parent_applet)
           
CreateDocumentFrame(String title)
          Constructor for CreateDocumentFrame class.
 
Method Summary
 void addNotify()
           
(package private)  void browseButton_Action(ActionEvent event)
          Callback invoked when the Browse button is pressed.
(package private)  void browseButton_KeyPressed(KeyEvent event)
           
private  void browseForFolder()
          Invoked as a result of the browse button being pressed or the enter key being pressed when the browse button has focus.
(package private)  void cancelButton_Action(ActionEvent event)
          Event callback invoked in response to the cancel button being pressed.
(package private)  void cancelButton_KeyPressed(KeyEvent event)
           
private  boolean checkLength(String fieldName, String fieldValue)
           
private  boolean confirmAction(String message)
          Deprecated. No longer prompting for content save when saving the document, so this method is no longer necessary.
(package private)  void contentsButton_actionPerformed(jclass.bwt.JCActionEvent event)
           
(package private)  void contentsButton_mousePressed(MouseEvent event)
           
private  WTDocument createDocument(WTDocument new_doc)
          Method CreateDocument contains the logic to create a new WTDocument instance.
(package private)  void CreateDocumentFrame_KeyPressed(KeyEvent event)
           
private  void createDocumentFrame()
           
(package private)  void createInTextField_KeyPressed(KeyEvent event)
           
(package private)  void createInTextField_Typed(KeyEvent event)
          Event callback invoked in response to a key typed event in the location text field.
(package private)  void departmentChoice_keyPressed(KeyEvent event)
           
(package private)  void descriptionTextArea_keyPressed(KeyEvent event)
           
private  void dispatchRefresh(int action, Object obj)
          Uses the RefreshService to dispatch RefreshEvents.
 void dispose()
           
(package private)  void documentTypeChoice_itemStateChanged(ItemEvent event)
           
(package private)  void documentTypeChoice_keyPressed(KeyEvent event)
           
private  void enableActions(boolean enable)
           
private  void enableUpdateActions()
          Updates this frame to support update mode.
private  void enforceNumberFieldConstraint()
           
(package private)  void Frame1_WindowClosing(WindowEvent event)
           
private  WTContext getContext()
          Returns the WTContext corresponding to this frame.
 WTDocument getDocument()
          Returns the WTDocument created by this frame.
private  DocumentType getDocumentType()
           
private  String getLocalizedLabel(String key, Object[] params)
          Deprecated.  
private  String getLocalizedMessage(String key, Object[] params)
          Deprecated.  
 Dimension getMinimumSize()
          Override the getMinimumSize method to have better control over the size of this frame.
 Applet getParentApplet()
          Returns the Applet which provides context to this frame.
 Folder getParentFolder()
          Returns the Folder in which the WTDocument is to be created.
 Dimension getPreferredSize()
          Override the getPreferredSize method to have better control over the size of this frame.
private  int getUpperLimit(String fieldName)
           
(package private)  void helpButton_Action(ActionEvent event)
          Event callback invoked in response to the Help button being pressed.
(package private)  void helpButton_KeyPressed(KeyEvent event)
           
private  void initContents()
           
private  void initContentsPanel()
           
private  void initDocumentTypeChoice()
          Deprecated. This method has no body, so it is being removed.
private  void initializeHelp()
           
private  void initLocation()
          Initializes the location field which specifies the folder in which to create the new document.
private  void initPrimaryContentsPanel()
           
private  void initReferencePanel()
           
private  void initResources()
          Initialize the ResourceBundles used for localizing the text of this frame.
private  void initStructurePanel()
           
(package private)  void lifeCycleInfo1_keyPressed(KeyEvent event)
           
private  void localize()
          Localizes the field labels and localizable text by getting correct values from a ResourceBundle.
(package private)  void nameTextField_KeyPressed_Interaction1(KeyEvent event)
           
(package private)  void nameTextField_KeyPressed(KeyEvent event)
           
(package private)  void numberTextField_KeyPressed(KeyEvent event)
           
(package private)  void okButton_Action(ActionEvent event)
          Callback method invoked in response to the okButton being pressed.
(package private)  void okButton_KeyPressed(KeyEvent event)
           
private  void processHelpCommand()
          Displays the online help associated with the Create document task.
private  void processOkAction()
          Method processOkAction contains the logic to create or update the document.
private  void processSaveAction()
          Method processSaveAction is invoked to save the WTDocument.
(package private)  void referenceButton_actionPerformed(jclass.bwt.JCActionEvent event)
           
(package private)  void referenceButton_mousePressed(MouseEvent event)
           
 void refresh()
           
(package private)  void relationsPanel_KeyPressed(KeyEvent event)
           
private  boolean saveContents()
           
private  boolean saveReference()
           
private  boolean saveStructure()
           
private  void setContext(boolean set_context_on)
           
 void setDocumentType(DocumentType doc_type)
          Sets the type of WTDocument to be created by this frame.
 void setParentApplet(Applet parent_applet)
          Sets the Applet which is used to provide context for this frame.
 void setParentFolder(Folder parent_folder)
          Initializes the folder in which the new WTDocument is to be created.
private  void setUpdateMode()
          Sets the mode of this frame to update.
 void setVisible(boolean isVisible)
           
 void show()
          Deprecated. The user should call the setVisible(boolean isVisible)
(package private)  void structureButton_actionPerformed(jclass.bwt.JCActionEvent event)
           
(package private)  void structureButton_mousePressed(MouseEvent event)
           
(package private)  void titleTextField_KeyPressed(KeyEvent event)
           
private  void updateColors(Color color)
           
private  boolean updateDocument()
          Contains the task logic to update and persist changes to the document.
 
Methods inherited from class java.awt.Frame
finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, 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, 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, isOpaque, 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, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

SHOW_ORG_ID

private static boolean SHOW_ORG_ID

savedText

private String savedText

alternateText

private String alternateText

numberEnabled

private boolean numberEnabled

target

private Class target

fComponentsAdjusted

boolean fComponentsAdjusted

hTTPUploadDownloadPanel1

HTTPUploadDownloadPanel hTTPUploadDownloadPanel1

orgLabel

Label orgLabel

orgChooser

OrgChooser orgChooser

nameLabel

Label nameLabel

nameTextField

TextField nameTextField

typeLabel

Label typeLabel

documentTypeChoice

EnumeratedChoice documentTypeChoice

titleLabel

Label titleLabel

titleTextField

TextField titleTextField

departmentLabel

Label departmentLabel

departmentChoice

EnumeratedChoice departmentChoice

numberLabel

Label numberLabel

numberTextField

TextField numberTextField

descriptionLabel

Label descriptionLabel

descriptionTextArea

WTTextArea descriptionTextArea

saveInLabel

Label saveInLabel

createInTextField

TextField createInTextField

browseButton

Button browseButton

horizontalLine2

symantec.itools.awt.shape.HorizontalLine horizontalLine2

lifeCycleInfo1

LifeCycleInfo lifeCycleInfo1

horizontalLine1

symantec.itools.awt.shape.HorizontalLine horizontalLine1

relationsPanel

Panel relationsPanel

tabsPanel

Panel tabsPanel

contentsButton

jclass.bwt.JCButton contentsButton

referenceButton

jclass.bwt.JCButton referenceButton

structureButton

jclass.bwt.JCButton structureButton

cardPanel

symantec.itools.awt.BorderPanel cardPanel

messagePanel

Panel messagePanel

horizontalLine3

symantec.itools.awt.shape.HorizontalLine horizontalLine3

buttonPanel

Panel buttonPanel

okButton

Button okButton

cancelButton

Button cancelButton

helpButton

Button helpButton

statusTextField

TextField statusTextField

lockStr

private Object lockStr

inDescendent

private boolean inDescendent

documentType

private DocumentType documentType
Specifies the type of document to create. This is an Enumerated Type whose values are of type wt.doc.DocumentType.


documentHandle

private CreateDocumentFrame.DocumentHandle documentHandle
DocumentHandle used to reference the document being created. The DocumentHandle is used as opposed to manipulating the document directly, to keep changes to this document in sync with changes to the document modified by the WTContentHolder in this frame. By using the DocumentHandle, both this frame and the contained WTContentHolder panel will be manipulating the same document reference.


parentFolder

private Folder parentFolder
The Folder in which to create the new document. This folder can be any folder in the system to which the user has rights to modify.


parentApplet

private Applet parentApplet
The Applet which is used to provide context for this frame. The applet is used in retrieving the correct WTContext.


contentsPanel

private ContentsPanel contentsPanel
The panel which contains the WTContentHolder bean for adding content to the document being created.


structurePanel

private StructurePanel structurePanel
The panel which contains the AssociationsPanel bean for adding structure to the document.


referencePanel

private ReferencePanel referencePanel
The panel which contains the AssociationsPanel bean for adding references to the document.


helpSystem

private HelpSystem helpSystem
The HelpSystem which provides online help, tooltips, and status messages for this frame.


helpContext

private HelpContext helpContext
Used with the HelpSystem. The HelpContext is used to determine which messages to retrieve from the help resources.


updateMode

private boolean updateMode
Boolean flag indicating whether or not this frame is in update mode. This frame is in update mode as soon as the document has been successfully created. Once in update mode, changes made in this frame modify the created document.


contextGroup

private ThreadGroup contextGroup
Maintains the ThreadGroup to be used for setting and getting the appropriate WTContext.


parentFolderLock

private Object parentFolderLock
Lock used for controlling the updating of the parent folder.


parentFolderComplete

private boolean parentFolderComplete
Boolean used for controlling the updating of the parent folder.


INIT_CONTENT

protected static final int INIT_CONTENT
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with displaying the content panel.

See Also:
Constant Field Values

INIT_LOCATION

protected static final int INIT_LOCATION
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with displaying the location of the parent folder if the parent folder has been given.

See Also:
Constant Field Values

INIT_DEPARTMENTS

protected static final int INIT_DEPARTMENTS
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with displaying the departments. This should no loner be used because the java.awt.Choice previously used to display this list has been replaced by the EnumeratedChoice bean.

See Also:
Constant Field Values

SAVE_DOCUMENT

protected static final int SAVE_DOCUMENT
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with saving the document.

See Also:
Constant Field Values

SAVE_AND_CLOSE

protected static final int SAVE_AND_CLOSE
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with saving the document and closing the dialog.

See Also:
Constant Field Values

INIT_STRUCTURE

protected static final int INIT_STRUCTURE
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with displaying the structure panel.

See Also:
Constant Field Values

INIT_REFERENCE

protected static final int INIT_REFERENCE
Defined constant used to determine which actions to perform when launching a new ActionThread. This constant is used in the switch statement in the run method of the ActionThread. This constant specifies to perform the actions associated with displaying the references panel.

See Also:
Constant Field Values

HELP_TARGET

private static final String HELP_TARGET
Defined constant used to specify the web browser target window in which to launch the online help. By using a defined target window, all online help will be launched in the same window.

See Also:
Constant Field Values

RESOURCES

private static String RESOURCES
Defined constant which specifies a String representation of the fully-qualified class name of the ResourceBundle containing localized text for the fields, labels and error-messages of this frame.


resources

private static ResourceBundle resources
Variable which maintains the ResourceBundle used for getting localized text for fields, labels and eror-messages of this frame.

Constructor Detail

CreateDocumentFrame

public CreateDocumentFrame(Applet a_parent_applet)

CreateDocumentFrame

public CreateDocumentFrame()
Default constructor for CreateDocumentFrame


CreateDocumentFrame

public CreateDocumentFrame(String title)
Constructor for CreateDocumentFrame class.

Parameters:
title - the String to use as the title of this frame
Method Detail

createDocumentFrame

private void createDocumentFrame()

initResources

private void initResources()
                    throws MissingResourceException
Initialize the ResourceBundles used for localizing the text of this frame. Both ResourceBundles for labels and fields and for error messages are initialized.

Throws:
MissingResourceException
See Also:
ResourceBundle

localize

private void localize()
Localizes the field labels and localizable text by getting correct values from a ResourceBundle.

See Also:
initResources, ResourceBundle

setVisible

public void setVisible(boolean isVisible)

show

public void show()
Deprecated. The user should call the setVisible(boolean isVisible)


addNotify

public void addNotify()

Frame1_WindowClosing

void Frame1_WindowClosing(WindowEvent event)

setParentApplet

public void setParentApplet(Applet parent_applet)
Sets the Applet which is used to provide context for this frame.

Parameters:
parent_applet - the Applet which provides context for this frame
See Also:
getParentApplet()

getParentApplet

public Applet getParentApplet()
Returns the Applet which provides context to this frame.

Returns:
the Applet providing context to this frame
See Also:
setParentApplet(java.applet.Applet)

setParentFolder

public void setParentFolder(Folder parent_folder)
Initializes the folder in which the new WTDocument is to be created.

Parameters:
parent_folder - the Folder in which to create the new document
See Also:
Cabinet, Folder

getParentFolder

public Folder getParentFolder()
Returns the Folder in which the WTDocument is to be created.

Returns:
the Folder in which to create the document
See Also:
Folder

getDocument

public WTDocument getDocument()
Returns the WTDocument created by this frame.

See Also:
WTDocument

setDocumentType

public void setDocumentType(DocumentType doc_type)
Sets the type of WTDocument to be created by this frame. Setting the document type will result in the type field and department list of this frame getting initialized.

Parameters:
doc_type - a String representing the type of WTDocument to create in this frame
See Also:
DocumentTaskLogic

initDocumentTypeChoice

private void initDocumentTypeChoice()
Deprecated. This method has no body, so it is being removed.

Initializes the "Type" field depending on the type of WTDocument specified via setDocumentType.

See Also:
setDocumentType(wt.doc.DocumentType)

initLocation

private void initLocation()
Initializes the location field which specifies the folder in which to create the new document. If a parentFolder has been given, this method uses the folder path of that parentFolder to initialize the location field. If no parent folder has been given, this method initializes the location field with the folder path of the current user's personal cabinet.

See Also:
setParentFolder(wt.folder.Folder), Folder, Cabinet

okButton_Action

void okButton_Action(ActionEvent event)
Callback method invoked in response to the okButton being pressed. This method invokes processOkAction to handle the creating or updating of the document.

See Also:
ActionEvent, Button

processOkAction

private void processOkAction()
Method processOkAction contains the logic to create or update the document. If the document has not yet been created, this method will create the new document, invoke the Life Cycle Wizard to assign a team template and lifecycle to the document, and will save the document. If the document is successfully created, this method will set this frame in update mode, and will display the content panel. If the document had already been created before invoking this method, this method will make the updates to the created document persistent. After saving the document, this method will close this frame.


createDocument

private WTDocument createDocument(WTDocument new_doc)
                           throws PropertyVetoException,
                                  FolderNotFoundException,
                                  WTException
Method CreateDocument contains the logic to create a new WTDocument instance. This method verifies that the required fields of Name, Number and Containing Folder have been given and are valid. This method only creates an instance of a WTDocument and sets the corresponding attribute values on the document; it does not make the document persistent.

Returns:
the created WTDocument
Throws:
PropertyVetoException - a given value for an attribute of the document is not valid
FolderNotFoundException - the folder in which to create the document does not exist
WTException - an error occurs creating the document
See Also:
WTDocument, Folder

processSaveAction

private void processSaveAction()
Method processSaveAction is invoked to save the WTDocument. If the document does not yet exist, the document is created and saved. Otherwise, if the document already exists, the document is updated and saved. When creating the document for the first time, this method invokes the Life Cycle Wizard to assign the teamTemplate and LifeCycleTemplate for the document.

See Also:
WTDocument, LifeCycleTemplate, TeamTemplate

browseButton_Action

void browseButton_Action(ActionEvent event)
Callback invoked when the Browse button is pressed.

Parameters:
event - the button press event which resulted in this method being invoked.

browseForFolder

private void browseForFolder()
Invoked as a result of the browse button being pressed or the enter key being pressed when the browse button has focus. This method launches a WTFolderBrowserDialog to allow the user to browse for a folder in which to create the document. The WTFolderBrowserDialog is restricted to show only those cabinets and folders for which the user has modify rights.


dispatchRefresh

private void dispatchRefresh(int action,
                             Object obj)
Uses the RefreshService to dispatch RefreshEvents. The Refresh Event is created with the given action and the given target object.

Parameters:
action - the type of refresh event
obj - the target of the refresh

getUpperLimit

private int getUpperLimit(String fieldName)

checkLength

private boolean checkLength(String fieldName,
                            String fieldValue)

createInTextField_Typed

void createInTextField_Typed(KeyEvent event)
Event callback invoked in response to a key typed event in the location text field. If the parent folder of the document to be created has already be set, this method will set the parent folder to null so that the value of the location text field will be used in getting the parent folder.

Parameters:
event - the Key event which resulted in this method getting invoked.

cancelButton_Action

void cancelButton_Action(ActionEvent event)
Event callback invoked in response to the cancel button being pressed. This method closes this frame.

Parameters:
event - the event which resulted in this method getting invoked.

setUpdateMode

private void setUpdateMode()
Sets the mode of this frame to update. When this frame is in update mode, the life cycle information and location of the document cannot be modified.


enableUpdateActions

private void enableUpdateActions()
Updates this frame to support update mode. When in update mode, the name, number, location, type, and life cycle information cannot be modified. Manipulating content is enabled in update mode.


updateDocument

private boolean updateDocument()
                        throws PropertyVetoException,
                               WTPropertyVetoException,
                               WTException
Contains the task logic to update and persist changes to the document. This method returns a boolean value indicating whether or not any changes were made that needed to be saved.

Returns:
true there were changes to this document that needed to be persisted.
Throws:
PropertyVetoException - if an attempt was made to set an attribute of this document to an invalid value
WTPropertyVetoException - if an attempt was made to set an attribute of this document to an invalid value
WTException - if an error occurs trying to save this document.

helpButton_Action

void helpButton_Action(ActionEvent event)
Event callback invoked in response to the Help button being pressed.

Parameters:
event - the button press event which resulted in this method being invoked.

processHelpCommand

private void processHelpCommand()
Displays the online help associated with the Create document task.


getContext

private WTContext getContext()
Returns the WTContext corresponding to this frame. This method will attempt to get the WTContext from the thread group set in the constructor of this frame. If no WTContext is found, this method attempts to use the parent applet to get a WTContext. If no WTContext is found using the parent applet, this method uses the default method to retrieve a WTContext, which will create a WTContext if no WTContext exists.

Returns:
the WTContext associated with this frame.

setContext

private void setContext(boolean set_context_on)

contentsButton_actionPerformed

void contentsButton_actionPerformed(jclass.bwt.JCActionEvent event)

structureButton_actionPerformed

void structureButton_actionPerformed(jclass.bwt.JCActionEvent event)

referenceButton_actionPerformed

void referenceButton_actionPerformed(jclass.bwt.JCActionEvent event)

initContents

private void initContents()

initPrimaryContentsPanel

private void initPrimaryContentsPanel()

initContentsPanel

private void initContentsPanel()

initStructurePanel

private void initStructurePanel()

initReferencePanel

private void initReferencePanel()

refresh

public void refresh()

confirmAction

private boolean confirmAction(String message)
Deprecated. No longer prompting for content save when saving the document, so this method is no longer necessary.

Displays the given String message in a dialog to which the user can respond with "OK" or "Cancel". If the user chooses "OK" to the message, true is returned. Otherwise, false is returned.

Parameters:
message - the String message to display in the dialog
Returns:
true if the user responds affirmatively to the message; false otherwise.

saveContents

private boolean saveContents()

saveStructure

private boolean saveStructure()

saveReference

private boolean saveReference()

initializeHelp

private void initializeHelp()

enableActions

private void enableActions(boolean enable)

updateColors

private void updateColors(Color color)

browseButton_KeyPressed

void browseButton_KeyPressed(KeyEvent event)

okButton_KeyPressed

void okButton_KeyPressed(KeyEvent event)

cancelButton_KeyPressed

void cancelButton_KeyPressed(KeyEvent event)

helpButton_KeyPressed

void helpButton_KeyPressed(KeyEvent event)

getLocalizedMessage

private String getLocalizedMessage(String key,
                                   Object[] params)
Deprecated.  

Helper method to return a localized String message. Replaced by WTMessage.getLocalizedMessage()

Parameters:
key - the String key into the messages ResourceBundle
params - an array of Objects to be used to format the message to be returned
Returns:
the String message specified by the given key

getLocalizedLabel

private String getLocalizedLabel(String key,
                                 Object[] params)
Deprecated.  

Helper method to return a localized String label. Replaced WTMessage.getLocalizedMessage();

Parameters:
key - the String key into the labels ResourceBundle
params - an array of Objects to be used to format the label to be returned
Returns:
the String label specified by the given key

enforceNumberFieldConstraint

private void enforceNumberFieldConstraint()

contentsButton_mousePressed

void contentsButton_mousePressed(MouseEvent event)

structureButton_mousePressed

void structureButton_mousePressed(MouseEvent event)

referenceButton_mousePressed

void referenceButton_mousePressed(MouseEvent event)

getDocumentType

private DocumentType getDocumentType()

documentTypeChoice_itemStateChanged

void documentTypeChoice_itemStateChanged(ItemEvent event)

getPreferredSize

public Dimension getPreferredSize()
Override the getPreferredSize method to have better control over the size of this frame. Implementing this method was necessary to better support lower resolutions.

Returns:
the preferred Dimension of this frame

getMinimumSize

public Dimension getMinimumSize()
Override the getMinimumSize method to have better control over the size of this frame. Implementing this method was necessary to better support lower resolutions.

Returns:
the minimum Dimension of this frame

CreateDocumentFrame_KeyPressed

void CreateDocumentFrame_KeyPressed(KeyEvent event)

nameTextField_KeyPressed

void nameTextField_KeyPressed(KeyEvent event)

nameTextField_KeyPressed_Interaction1

void nameTextField_KeyPressed_Interaction1(KeyEvent event)

titleTextField_KeyPressed

void titleTextField_KeyPressed(KeyEvent event)

numberTextField_KeyPressed

void numberTextField_KeyPressed(KeyEvent event)

descriptionTextArea_keyPressed

void descriptionTextArea_keyPressed(KeyEvent event)

createInTextField_KeyPressed

void createInTextField_KeyPressed(KeyEvent event)

lifeCycleInfo1_keyPressed

void lifeCycleInfo1_keyPressed(KeyEvent event)

departmentChoice_keyPressed

void departmentChoice_keyPressed(KeyEvent event)

documentTypeChoice_keyPressed

void documentTypeChoice_keyPressed(KeyEvent event)

relationsPanel_KeyPressed

void relationsPanel_KeyPressed(KeyEvent event)

dispose

public void dispose()