wt.clients.prodmgmt
Class ConfigSpecPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.prodmgmt.HelperPanel
                  extended bywt.clients.prodmgmt.ConfigSpecPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class ConfigSpecPanel
extends HelperPanel

See Also:
Serialized Form

Nested Class Summary
 class ConfigSpecPanel.EffContextListener
          This class listens for the user to select a EffContext and adds it to the effContextTextField.
(package private)  class ConfigSpecPanel.SearchBaselineListener
          WorkThread is used to do persistence related activities outside of the AWT Thread.
(package private)  class ConfigSpecPanel.SymAction
           
(package private)  class ConfigSpecPanel.SymFocus
           
(package private)  class ConfigSpecPanel.SymItem
           
(package private)  class ConfigSpecPanel.SymText
           
(package private)  class ConfigSpecPanel.WorkThread
          The work thread is used to place long operations in a separate WTThread so the AWT thread isn't tied up.
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
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  ManagedBaseline baseline
           
(package private)  Label baselineNameStaticLabel
           
(package private)  TextField baselineNameTextField
           
(package private)  Checkbox baselineRadioButton
           
(package private)  Button baselineSearchButton
           
protected static String BLANK_CHOICE
           
(package private)  Checkbox checkboxCheckedOut
           
(package private)  EnumeratedChoice choiceState
           
(package private)  ViewChoice choiceView
           
private  ConfigSpecItem configSpecItem
           
(package private)  Button effContextSearchButton
           
(package private)  TextField effContextTextField
           
(package private)  TextField effectiveDateTextField
           
(package private)  Checkbox effectivityRadioButton
           
(package private)  ViewChoice effectivityViewChoice
           
(package private)  CheckboxGroup Group1
           
private  HelpContext helpContext
           
private  HelpSystem helpSystem
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine1
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine2
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine3
           
private  boolean isBaselineNotNull
           
(package private)  Label labelEffContext
           
(package private)  Label labelEffectiveDate
           
(package private)  Label labelState
           
(package private)  Label labelType
           
(package private)  Label labelTypeValue
           
(package private)  Label labelValue
           
(package private)  Label labelView
           
(package private)  Label labelView2
           
private  ConfigSpecItem originalConfigSpec
           
(package private) static int POPULATE
          Constant for populating the panel
private  Vector propertyChangeListeners
           
private  ResourceBundle RB
           
static String RESOURCE
           
(package private)  Checkbox saveCheckbox
           
static String STATUSMESSAGE
          Constant to indicate Status messages.
private  String statusText
           
static String VALID_CONFIG_SPEC
           
(package private)  TextField valueTextField
           
(package private)  Checkbox versionRadioButton
           
 
Fields inherited from class wt.clients.prodmgmt.HelperPanel
resource, SAVE, SET_CONFIGURATION_ITEM, SET_INSTANCE_ITEM, SET_PART_ITEM, threadGroup
 
Fields inherited from class java.awt.Panel
 
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
ConfigSpecPanel()
          Construct a default ConfigSpecPanel.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener pcl)
          Add listeners to be notified of property changes.
(package private)  void baselineNameTextField_TextValueChanged(TextEvent event)
           
(package private)  void baselineRadioButton_ItemStateChanged(ItemEvent event)
           
(package private)  void baselineSearchButtion_ActionPerformed(ActionEvent event)
           
(package private)  void baselineTextField_FocusLost(FocusEvent event)
           
(package private)  void checkboxCheckedOut_ItemStateChanged(ItemEvent event)
           
(package private)  void choiceState_itemStateChanged(ItemEvent event)
           
(package private)  void choiceView_itemStateChanged(ItemEvent event)
           
protected  WTPartBaselineConfigSpec copyBaselineConfigSpec(WTPartBaselineConfigSpec baseline_cs)
           
protected  ConfigSpecItem copyConfigSpecItem(ConfigSpecItem config_spec_item)
           
protected  WTPartEffectivityConfigSpec copyEffectivityConfigSpec(WTPartEffectivityConfigSpec eff_cs)
           
protected  WTPartStandardConfigSpec copyStandardConfigSpec(WTPartStandardConfigSpec standard_cs)
           
(package private)  void effContextSearchButton_ActionPerformed(ActionEvent event)
           
(package private)  void effContextTextField_FocusLost(FocusEvent event)
           
(package private)  void effContextTextField_TextValueChanged(TextEvent event)
           
(package private)  void effectiveDateTextField_TextValueChanged(TextEvent event)
           
(package private)  void effectivityRadioButton_ItemStateChanged(ItemEvent event)
           
(package private)  void effectivityViewChoice_itemStateChanged(ItemEvent event)
           
protected  void enableBaselineFields(boolean flag)
           
protected  void enableEffectivityFields(boolean flag)
           
protected  void enableStandardFields(boolean flag)
           
 String formatDate(Date date)
           
 ConfigSpecItem getConfigSpecItem()
          Return the ConfigSpecItem being manipulated.
 WTPartConfigSpec getConfigurationSpec()
           
protected  String getDisplayIdentity(Object obj)
           
protected  EffectivityType getEffectivityType(EffContext eff_context)
           
 HelpContext getHelpContext()
          Return the help context for this component
protected  State getState()
          Get the state from the choice list.
 String getStatusText()
          Get the text to display in the status area Unused since the status area was eliminated in the ConfigSpecDialog.
protected  void hideCheckboxCheckedOut(boolean flag)
           
 void initialize()
          Initialize the panel.
 void initializeHelp()
          Initialize the help system for this component.
static boolean isEqual(View view_a, View view_b)
           
 void localize()
           
 void notifyPropertyListeners(String property, Object old_val, Object new_val)
           
 Timestamp parseDate(String date_string)
           
 void populate()
          Populate the display components based on the contained ConfigSpecItem
 void removePropertyChangeListener(PropertyChangeListener pcl)
          Removes the given listener from being subscribed to property change events.
 void save()
          Save the current ConfigSpecItem
protected  void setBaseline(ManagedBaseline baseline)
          Set the baseline.
 void setConfigSpecItem(ConfigSpecItem config_spec_item)
          Set the ConfigSpecItem to manipulate.
 void setConfigurationSpec(WTPartConfigSpec config_spec)
           
private  void setEffContext(EffContext ec)
           
 void setHelpContext(HelpContext aHelpContext)
          Set the help context for this componet.
 void setHelpSystem(HelpSystem aHelpSystem)
          Set the help system for this componet.
private  void setStatusText(String text)
          Set the text to display in the status area Unused since the status area was eliminated in the ConfigSpecDialog.
protected  boolean validateBaseline()
           
protected  boolean validateEffectivity()
           
protected  boolean validateLatest()
           
(package private)  void valueTextField_TextValueChanged(TextEvent event)
           
(package private)  void versionRadioButton_ItemStateChanged(ItemEvent event)
           
 
Methods inherited from class wt.clients.prodmgmt.HelperPanel
getApplet, getConfigurationItem, getContext, getHelpBundleName, getHelpSystem, getInstanceItem, getLabelsRB, getLocalizedMessage, getLocalizedValue, getParentFrame, getPartItem, getThreadGroup, initResources, saveInThread, setApplet, setConfigurationItem, setConfigurationItem, setContext, setInstanceItem, setInstanceItem, setPartItem, setPartItem, setUpdateMode, showMessageDialog
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, 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, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

public static String RESOURCE

STATUSMESSAGE

public static String STATUSMESSAGE
Constant to indicate Status messages.


POPULATE

static final int POPULATE
Constant for populating the panel

See Also:
Constant Field Values

versionRadioButton

Checkbox versionRadioButton

Group1

CheckboxGroup Group1

baselineRadioButton

Checkbox baselineRadioButton

effectivityRadioButton

Checkbox effectivityRadioButton

labelView

Label labelView

choiceView

ViewChoice choiceView

labelState

Label labelState

choiceState

EnumeratedChoice choiceState

checkboxCheckedOut

Checkbox checkboxCheckedOut

horizontalLine1

symantec.itools.awt.shape.HorizontalLine horizontalLine1

baselineNameStaticLabel

Label baselineNameStaticLabel

baselineNameTextField

TextField baselineNameTextField

baselineSearchButton

Button baselineSearchButton

horizontalLine2

symantec.itools.awt.shape.HorizontalLine horizontalLine2

labelView2

Label labelView2

effectivityViewChoice

ViewChoice effectivityViewChoice

labelEffectiveDate

Label labelEffectiveDate

effectiveDateTextField

TextField effectiveDateTextField

labelEffContext

Label labelEffContext

effContextTextField

TextField effContextTextField

effContextSearchButton

Button effContextSearchButton

labelType

Label labelType

labelTypeValue

Label labelTypeValue

labelValue

Label labelValue

valueTextField

TextField valueTextField

horizontalLine3

symantec.itools.awt.shape.HorizontalLine horizontalLine3

saveCheckbox

Checkbox saveCheckbox

helpSystem

private HelpSystem helpSystem

helpContext

private HelpContext helpContext

statusText

private String statusText

configSpecItem

private ConfigSpecItem configSpecItem

RB

private ResourceBundle RB

isBaselineNotNull

private boolean isBaselineNotNull

baseline

private ManagedBaseline baseline

propertyChangeListeners

private Vector propertyChangeListeners

originalConfigSpec

private ConfigSpecItem originalConfigSpec

BLANK_CHOICE

protected static String BLANK_CHOICE

VALID_CONFIG_SPEC

public static String VALID_CONFIG_SPEC
Constructor Detail

ConfigSpecPanel

public ConfigSpecPanel()
Construct a default ConfigSpecPanel.

Method Detail

setConfigSpecItem

public void setConfigSpecItem(ConfigSpecItem config_spec_item)
                       throws PropertyVetoException,
                              WTException
Set the ConfigSpecItem to manipulate.

Throws:
PropertyVetoException
WTException

getConfigSpecItem

public ConfigSpecItem getConfigSpecItem()
Return the ConfigSpecItem being manipulated.

Returns:
the ConfigSpecItem being manipulated.

setStatusText

private void setStatusText(String text)
Set the text to display in the status area Unused since the status area was eliminated in the ConfigSpecDialog.


getStatusText

public String getStatusText()
Get the text to display in the status area Unused since the status area was eliminated in the ConfigSpecDialog.


initializeHelp

public void initializeHelp()
Initialize the help system for this component.

Overrides:
initializeHelp in class HelperPanel

setHelpContext

public void setHelpContext(HelpContext aHelpContext)
Set the help context for this componet.

Overrides:
setHelpContext in class HelperPanel
Parameters:
aHelpContext - the HelpContext to use for this component

setHelpSystem

public void setHelpSystem(HelpSystem aHelpSystem)
Set the help system for this componet.

Overrides:
setHelpSystem in class HelperPanel
Parameters:
aHelpSystem - the HelpSystem to use for this component

getHelpContext

public HelpContext getHelpContext()
Return the help context for this component

Overrides:
getHelpContext in class HelperPanel
Returns:
the help context for this component

save

public void save()
          throws WTException,
                 WTPropertyVetoException
Save the current ConfigSpecItem

Throws:
WTException
WTPropertyVetoException

getState

protected State getState()
Get the state from the choice list.

Returns:
the state from the choice list

initialize

public void initialize()
Initialize the panel. (currently unused)


localize

public void localize()
Overrides:
localize in class HelperPanel

populate

public void populate()
Populate the display components based on the contained ConfigSpecItem


setBaseline

protected void setBaseline(ManagedBaseline baseline)
Set the baseline. The baseline name and number fields are populated. If the name field is not empty, then the other fields are disabled.


setEffContext

private void setEffContext(EffContext ec)

effContextTextField_FocusLost

void effContextTextField_FocusLost(FocusEvent event)

baselineTextField_FocusLost

void baselineTextField_FocusLost(FocusEvent event)

baselineSearchButtion_ActionPerformed

void baselineSearchButtion_ActionPerformed(ActionEvent event)

effContextSearchButton_ActionPerformed

void effContextSearchButton_ActionPerformed(ActionEvent event)

parseDate

public Timestamp parseDate(String date_string)
                    throws WTPropertyVetoException
Throws:
WTPropertyVetoException

formatDate

public String formatDate(Date date)

versionRadioButton_ItemStateChanged

void versionRadioButton_ItemStateChanged(ItemEvent event)

baselineRadioButton_ItemStateChanged

void baselineRadioButton_ItemStateChanged(ItemEvent event)

effectivityRadioButton_ItemStateChanged

void effectivityRadioButton_ItemStateChanged(ItemEvent event)

hideCheckboxCheckedOut

protected void hideCheckboxCheckedOut(boolean flag)

enableStandardFields

protected void enableStandardFields(boolean flag)

enableBaselineFields

protected void enableBaselineFields(boolean flag)

enableEffectivityFields

protected void enableEffectivityFields(boolean flag)

getEffectivityType

protected EffectivityType getEffectivityType(EffContext eff_context)

setConfigurationSpec

public void setConfigurationSpec(WTPartConfigSpec config_spec)
                          throws PropertyVetoException,
                                 WTException
Throws:
PropertyVetoException
WTException

getConfigurationSpec

public WTPartConfigSpec getConfigurationSpec()

getDisplayIdentity

protected String getDisplayIdentity(Object obj)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener pcl)
Add listeners to be notified of property changes. Subscribed listeners will be notified of changes made to the values displayed on this panel which will result in a new config spec being created if applied. Subscribing as a listener is useful if a GUI wishes to control whether or not buttons should be enabled for creating the config spec.

Parameters:
pcl - the PropertyChangeListener to be subscribed

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener pcl)
Removes the given listener from being subscribed to property change events.


notifyPropertyListeners

public void notifyPropertyListeners(String property,
                                    Object old_val,
                                    Object new_val)

copyConfigSpecItem

protected ConfigSpecItem copyConfigSpecItem(ConfigSpecItem config_spec_item)

copyBaselineConfigSpec

protected WTPartBaselineConfigSpec copyBaselineConfigSpec(WTPartBaselineConfigSpec baseline_cs)

copyEffectivityConfigSpec

protected WTPartEffectivityConfigSpec copyEffectivityConfigSpec(WTPartEffectivityConfigSpec eff_cs)

copyStandardConfigSpec

protected WTPartStandardConfigSpec copyStandardConfigSpec(WTPartStandardConfigSpec standard_cs)

baselineNameTextField_TextValueChanged

void baselineNameTextField_TextValueChanged(TextEvent event)

validateBaseline

protected boolean validateBaseline()

validateLatest

protected boolean validateLatest()

validateEffectivity

protected boolean validateEffectivity()

isEqual

public static boolean isEqual(View view_a,
                              View view_b)

choiceView_itemStateChanged

void choiceView_itemStateChanged(ItemEvent event)

choiceState_itemStateChanged

void choiceState_itemStateChanged(ItemEvent event)

checkboxCheckedOut_ItemStateChanged

void checkboxCheckedOut_ItemStateChanged(ItemEvent event)

effectivityViewChoice_itemStateChanged

void effectivityViewChoice_itemStateChanged(ItemEvent event)

effectiveDateTextField_TextValueChanged

void effectiveDateTextField_TextValueChanged(TextEvent event)

effContextTextField_TextValueChanged

void effContextTextField_TextValueChanged(TextEvent event)

valueTextField_TextValueChanged

void valueTextField_TextValueChanged(TextEvent event)