wt.clients.project
Class ProjectDefinitionFrame

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended bywt.clients.project.ProjectDefinitionFrame
All Implemented Interfaces:
Accessible, EventListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable

public class ProjectDefinitionFrame
extends Frame
implements PropertyChangeListener

This frame constitutes the "Create Project," "Update Project," and "View Project" windows which the user invokes through Life Cycle Administration. Both the Windchill Explorer and wt.clients.project.ProjectAdminApplet invoke this frame.

See Also:
Serialized Form

Nested Class Summary
(package private)  class ProjectDefinitionFrame.SymAction
          Inner class extension of java.awt.event.ActionListener class to handle AWT action event handling.
(package private)  class ProjectDefinitionFrame.SymKey
          Inner class extension of java.awt.event.KeyAdapter class to handle AWT keyboard event handling.
(package private)  class ProjectDefinitionFrame.SymWindow
          Inner class extension of java.awt.event.WindowAdapter to handle window closing.
(package private)  class ProjectDefinitionFrame.WorkThread
          The work thread for this Frame.
 
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
(package private)  Applet applet
           
(package private) static int BROWSE_FOLDER
           
(package private)  Button buttonCancel
           
(package private)  Button buttonHelp
           
(package private)  Button buttonLocation
           
(package private)  Button buttonOK
           
(package private)  Button buttonSave
           
(package private) static int CANCEL_CPROJECT
           
(package private)  WTContainerRef context
           
(package private) static int COPY_FROM
           
(package private)  Button copyFrom
           
protected  boolean createMode
           
(package private)  CProject currentCProject
           
(package private)  Checkbox enabled
           
(package private)  boolean fComponentsAdjusted
          Used for addNotify check.
(package private)  NFHelpContext helpContextMain
           
(package private)  NFHelpContext helpContextRole
           
private static String HELPRBNAME
           
private  HelpSystem helpSystem
           
private static String HELPSYSTEM_HELP_FRAME
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine1
           
(package private)  Label labelDescriptionLeft
           
(package private)  Label labelLocation
           
(package private)  Label labelProjectName
           
(package private) static int LAUNCH_HELP
           
(package private) static int OK_CPROJECT
           
private  String origFolder
           
private  boolean origFolderVarSet
           
(package private)  Panel panelButtons
           
(package private)  Panel panelCenter
           
(package private)  Panel panelProjectDetail
           
(package private)  RolePanel panelRolePanel
           
(package private)  Panel panelSouth
           
private  ResourceBundle rb
           
private  ResourceBundle rbHelp
           
private static String RBNAME
           
(package private) static int SAVE_CPROJECT
           
private  Project startingProject
           
(package private)  symantec.itools.awt.StatusBar statusBar
           
private  TeamTemplateReference teamTemplateReference
           
(package private)  TextField textDescription
           
(package private)  TextField textLocation
           
(package private)  TextField textProject
           
protected  boolean updateMode
           
 
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
ProjectDefinitionFrame()
          Class constructor.
ProjectDefinitionFrame(CProject currentCProject)
          Class constructor taking a CProject.
ProjectDefinitionFrame(CProject currentCProject, TeamTemplateReference teamTempRef)
          Class constructor taking a CProject and TeamTemplateReference.
 
Method Summary
private  void addMappingsToTeamTemplate(Role role, Enumeration princEnum, Enumeration actorEnum)
          Add all the roles mappings to the team template
 void addNotify()
          Override of java.awt.Frame.addNotify method.
protected  void browseFolder()
          Sets the folder this Project will live in.
(package private)  void buttonCancel_Action(ActionEvent event)
          Action performed when Cancel button is invoked.
(package private)  void buttonCancel_KeyPress(KeyEvent event)
          Invoke Cancel action if Enter key is pressed when focus is on that button.
(package private)  void buttonHelp_ActionPerformed(ActionEvent event)
          Action performed when Help button is invoked.
(package private)  void buttonHelp_KeyPress(KeyEvent event)
          Invoke Help action if Enter key is pressed when focus is on that button.
(package private)  void buttonLocation_Action(ActionEvent event)
          Action performed when Browse button is invoked.
(package private)  void buttonLocation_KeyPress(KeyEvent event)
          Invoke Browse action if Enter key is pressed when focus is on that button.
(package private)  void buttonOK_Action(ActionEvent event)
          Action performed when Ok button is invoked.
(package private)  void buttonOK_KeyPress(KeyEvent event)
          Invoke Ok action if Enter key is pressed when focus is on Ok button.
(package private)  void buttonSave_Action(ActionEvent event)
          Action performed when Save button is invoked.
(package private)  void buttonSave_KeyPress(KeyEvent event)
          Invoke Save action if Enter key is pressed when focus is on that button.
private  void cancelCProject()
          Destroy the frame without saving the project.
(package private)  void copyFrom_Action(ActionEvent event)
           
(package private)  void copyFrom_KeyPress(KeyEvent event)
          Invoke copyFrom action if Enter key is pressed when focus is on that button.
protected  void copyFrom()
          Searches for a Project object to copy from
private  boolean descriptionValidate(String a_Description)
           
private  Cabinet[] findCabinets(AccessPermission permission)
           
(package private)  void Frame1_WindowClosing(WindowEvent event)
          Gracefully close the frame.
 Applet getApplet()
          Returns the Applet which owns this frame.
 Locale getLocale()
           
private  void initializeContext()
           
(package private)  void initializeHelp()
          Initilize contextual help for this frame
private  void launchHelp()
          Launch the help screen in a seperate browser window.
private  void localize()
          Localize the Applet AWT components using the wt.clients.project.ProjectRB resource bundle.
private  boolean locationValidate(String location)
           
private  boolean nameValidate(String a_Name)
           
(package private)  boolean obtainProperties()
          Obtain the project properties from the AWT components and set the properties on the current CProject
private  boolean okCProject()
          Save the current project to the database and destroy the Frame.
 void populateProjectDetail()
          Populate the AWT components with project properties from the current CProject
 void propertyChange(PropertyChangeEvent event)
          Update the status area with online help.
private  void removeMappingsToTeamTemplate(Role role, Enumeration princEnum, Enumeration actorEnum)
          Remove the mappings to the team template
private  void saveCProject()
          Save the current project to the database.
private  boolean saveTeamTemplate()
          SaveRolePrincipalMappings
 void setApplet(Applet applet)
          Set the Applet which owns this frame.
 void setCurrentCProject(CProject currentCProjectObject)
          Set the current CProject for this frame.
 void setUpdateMode(boolean updateModeValue)
          Sets the update mode for the frame.
 void show()
          Override of java.awt.Frame.show method to make the frame visible.
private  boolean templateInContext(TeamTemplate template)
           
private  void throwException(String bundle, String key)
           
 
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, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, 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, getMinimumSize, getPreferredSize, 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, 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

SAVE_CPROJECT

static final int SAVE_CPROJECT
See Also:
Constant Field Values

OK_CPROJECT

static final int OK_CPROJECT
See Also:
Constant Field Values

CANCEL_CPROJECT

static final int CANCEL_CPROJECT
See Also:
Constant Field Values

LAUNCH_HELP

static final int LAUNCH_HELP
See Also:
Constant Field Values

BROWSE_FOLDER

static final int BROWSE_FOLDER
See Also:
Constant Field Values

COPY_FROM

static final int COPY_FROM
See Also:
Constant Field Values

helpSystem

private HelpSystem helpSystem

helpContextMain

NFHelpContext helpContextMain

helpContextRole

NFHelpContext helpContextRole

RBNAME

private static String RBNAME

rb

private ResourceBundle rb

HELPRBNAME

private static String HELPRBNAME

rbHelp

private ResourceBundle rbHelp

HELPSYSTEM_HELP_FRAME

private static String HELPSYSTEM_HELP_FRAME

origFolder

private String origFolder

origFolderVarSet

private boolean origFolderVarSet

applet

Applet applet

startingProject

private Project startingProject

teamTemplateReference

private TeamTemplateReference teamTemplateReference

context

WTContainerRef context

fComponentsAdjusted

boolean fComponentsAdjusted
Used for addNotify check.


panelProjectDetail

Panel panelProjectDetail

labelProjectName

Label labelProjectName

textProject

TextField textProject

copyFrom

Button copyFrom

enabled

Checkbox enabled

labelLocation

Label labelLocation

buttonLocation

Button buttonLocation

textLocation

TextField textLocation

labelDescriptionLeft

Label labelDescriptionLeft

textDescription

TextField textDescription

panelCenter

Panel panelCenter

horizontalLine1

symantec.itools.awt.shape.HorizontalLine horizontalLine1

panelSouth

Panel panelSouth

panelButtons

Panel panelButtons

buttonOK

Button buttonOK

buttonSave

Button buttonSave

buttonCancel

Button buttonCancel

buttonHelp

Button buttonHelp

statusBar

symantec.itools.awt.StatusBar statusBar

updateMode

protected boolean updateMode

createMode

protected boolean createMode

panelRolePanel

RolePanel panelRolePanel

currentCProject

CProject currentCProject
Constructor Detail

ProjectDefinitionFrame

public ProjectDefinitionFrame()
Class constructor. Includes code generated by Symantec Visual Cafe, code to include the wt.clients.project.RolePanel component and code to set up the frame to use the resource bundle.


ProjectDefinitionFrame

public ProjectDefinitionFrame(CProject currentCProject)
Class constructor taking a CProject. Sets the current CProject to the passed value.

Parameters:
currentCProject - A CProject object.

ProjectDefinitionFrame

public ProjectDefinitionFrame(CProject currentCProject,
                              TeamTemplateReference teamTempRef)
Class constructor taking a CProject and TeamTemplateReference. Sets the current CProject to the passed value.

Parameters:
currentCProject - A CProject object.
teamTempRef - A reference to the TeamTemplate being updated.
Method Detail

localize

private void localize()
Localize the Applet AWT components using the wt.clients.project.ProjectRB resource bundle.


show

public void show()
Override of java.awt.Frame.show method to make the frame visible.


addNotify

public void addNotify()
Override of java.awt.Frame.addNotify method. Invoked by AWT to alert this Frame that it has been added to the container (java.awt.Window).


saveCProject

private void saveCProject()
Save the current project to the database.


saveTeamTemplate

private boolean saveTeamTemplate()
                          throws WTException
SaveRolePrincipalMappings

Throws:
WTException

addMappingsToTeamTemplate

private void addMappingsToTeamTemplate(Role role,
                                       Enumeration princEnum,
                                       Enumeration actorEnum)
Add all the roles mappings to the team template


removeMappingsToTeamTemplate

private void removeMappingsToTeamTemplate(Role role,
                                          Enumeration princEnum,
                                          Enumeration actorEnum)
Remove the mappings to the team template


okCProject

private boolean okCProject()
Save the current project to the database and destroy the Frame.


browseFolder

protected void browseFolder()
                     throws WTException
Sets the folder this Project will live in.

Throws:
WTException

copyFrom

protected void copyFrom()
                 throws WTException
Searches for a Project object to copy from

Throws:
WTException

findCabinets

private Cabinet[] findCabinets(AccessPermission permission)
                        throws WTException
Throws:
WTException

obtainProperties

boolean obtainProperties()
                   throws WTException,
                          PropertyVetoException
Obtain the project properties from the AWT components and set the properties on the current CProject

Throws:
WTException
PropertyVetoException

cancelCProject

private void cancelCProject()
Destroy the frame without saving the project.


launchHelp

private void launchHelp()
Launch the help screen in a seperate browser window.


setUpdateMode

public void setUpdateMode(boolean updateModeValue)
Sets the update mode for the frame. If set to true, all fields are updateable, and clicking on OK causes the Project to be saved before destroying the frame. Otherwise no fields are updateable, and clicking OK simply destroys the frame.

Parameters:
updateModeValue - true if updateable, false otherwise.

populateProjectDetail

public void populateProjectDetail()
Populate the AWT components with project properties from the current CProject


setCurrentCProject

public void setCurrentCProject(CProject currentCProjectObject)
Set the current CProject for this frame.

Parameters:
currentCProjectObject - A CProject object.

setApplet

public void setApplet(Applet applet)
Set the Applet which owns this frame.

Parameters:
applet - An Applet object.

getApplet

public Applet getApplet()
Returns the Applet which owns this frame.


initializeHelp

void initializeHelp()
Initilize contextual help for this frame


propertyChange

public void propertyChange(PropertyChangeEvent event)
Update the status area with online help. This method is defined to satisfy the PropertyChangeListener interface.

Specified by:
propertyChange in interface PropertyChangeListener

Frame1_WindowClosing

void Frame1_WindowClosing(WindowEvent event)
Gracefully close the frame.


buttonCancel_Action

void buttonCancel_Action(ActionEvent event)
Action performed when Cancel button is invoked. CANCEL_CPROJECT action is invoked in seperate thread.

Parameters:
event - An AWT event related to invoking the Cancel button.

buttonOK_Action

void buttonOK_Action(ActionEvent event)
Action performed when Ok button is invoked. OK_CPROJECT action is invoked in seperate thread.

Parameters:
event - An AWT event related to invoking the Ok button.

buttonSave_Action

void buttonSave_Action(ActionEvent event)
Action performed when Save button is invoked. SAVE_CPROJECT action is invoked in seperate thread.

Parameters:
event - An AWT event related to invoking the Save button.

buttonHelp_ActionPerformed

void buttonHelp_ActionPerformed(ActionEvent event)
Action performed when Help button is invoked. LAUNCH_HELP action is invoked in seperate thread.

Parameters:
event - An AWT event related to invoking the Help button.

buttonLocation_Action

void buttonLocation_Action(ActionEvent event)
Action performed when Browse button is invoked. BROWSE_FOLDER action is invoked in seperate thread.

Parameters:
event - An AWT event related to invoking the Browse button.

buttonOK_KeyPress

void buttonOK_KeyPress(KeyEvent event)
Invoke Ok action if Enter key is pressed when focus is on Ok button.

Parameters:
event - An AWT keyEvent.

buttonSave_KeyPress

void buttonSave_KeyPress(KeyEvent event)
Invoke Save action if Enter key is pressed when focus is on that button.

Parameters:
event - An AWT keyEvent.

buttonCancel_KeyPress

void buttonCancel_KeyPress(KeyEvent event)
Invoke Cancel action if Enter key is pressed when focus is on that button.

Parameters:
event - An AWT keyEvent.

buttonHelp_KeyPress

void buttonHelp_KeyPress(KeyEvent event)
Invoke Help action if Enter key is pressed when focus is on that button.

Parameters:
event - An AWT keyEvent.

buttonLocation_KeyPress

void buttonLocation_KeyPress(KeyEvent event)
Invoke Browse action if Enter key is pressed when focus is on that button.

Parameters:
event - An AWT keyEvent.

copyFrom_KeyPress

void copyFrom_KeyPress(KeyEvent event)
Invoke copyFrom action if Enter key is pressed when focus is on that button.

Parameters:
event - An AWT keyEvent.

copyFrom_Action

void copyFrom_Action(ActionEvent event)

getLocale

public Locale getLocale()

templateInContext

private boolean templateInContext(TeamTemplate template)

locationValidate

private boolean locationValidate(String location)
                          throws WTException,
                                 WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

nameValidate

private boolean nameValidate(String a_Name)

descriptionValidate

private boolean descriptionValidate(String a_Description)

throwException

private void throwException(String bundle,
                            String key)

initializeContext

private void initializeContext()
                        throws WTException
Throws:
WTException