wt.clients.prodmgmt
Class UsesPanel

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

public class UsesPanel
extends HelperPanel

UsesPanel displays the uses relationships for a part.

Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
(package private)  class UsesPanel.EventHandlerThread
           
(package private)  class UsesPanel.SymAction
           
(package private)  class UsesPanel.SymFocus
           
(package private)  class UsesPanel.SymItem
           
(package private)  class UsesPanel.SymKey
           
(package private)  class UsesPanel.SymPropertyChange
           
 
Nested classes inherited from class wt.clients.prodmgmt.HelperPanel
HelperPanel.WorkThread
 
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
(package private)  Panel actionLayoutPanel
           
(package private)  Panel actionPanel
           
(package private)  Button addButton
           
(package private)  Panel buttonPanel
           
(package private)  Label findingLabel
           
static int ID_COLUMN
           
private  long latestLineNumber
           
static int LINE_NUMBER_COLUMN
           
private static long LINE_NUMBER_INCREMENT
           
static String LINE_NUMBER_UNDEFINED_STRING
           
(package private)  Label lineNumberLabel
           
(package private)  Panel lineNumberPanel
           
(package private)  TextField lineNumberTextField
           
static int MANAGED_BY_COLUMN
           
static int NAME_COUMN
           
(package private)  Button nextLineNumberButton
           
static int NUMBER_COLUMN
           
(package private)  Button occurrenceButton
           
private static int PROCESS_ADD_BUTTON
           
private static int PROCESS_EDIT_OCCURRENCES
           
private static int PROCESS_NEXT_LINE_NUMBER
           
(package private)  Panel progressPanel
           
static int QTY_COLUMN
           
(package private)  Label qtyLabel
           
(package private)  Spinner qtyListSpinner
           
(package private)  Panel qtyPanel
           
(package private)  Button removeButton
           
private  ThreadGroup theThreadGroup
           
(package private)  Label titleLabel
           
(package private)  Panel titlePanel
           
static int UNIT_COLUMN
           
(package private)  EnumeratedChoice unitChoice
           
(package private)  Label unitLabel
           
(package private)  Panel unitPanel
           
protected  boolean updateMode
           
(package private)  Panel updateUsagePanel
           
protected  UsesInterfaceList usesList
           
(package private)  WTMultiList usesMultiList
           
(package private)  symantec.itools.awt.BorderPanel usesPartPanel
           
private  boolean validateLineNumber
           
(package private)  Button viewButton
           
(package private)  Panel workingPanel
           
 
Fields inherited from class wt.clients.prodmgmt.HelperPanel
resource, 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
UsesPanel()
          Create the panel.
 
Method Summary
 void addHelpListener(PropertyChangeListener pcl)
           
 void addNotify()
           
protected  void addUses()
           
(package private)  void addUsesButton_Action(ActionEvent event)
          Launch a WTChooser to search for new parts to use.
protected  void editOccurrences()
           
protected  void enableOccurrencesButton(boolean enable)
           
protected  void enableOccurrencesButton(double gui_quantity)
           
protected  void enableUnitsDropDown()
           
(package private)  long getMaxLineNumber()
           
protected static int getOccurrenceCount(UsageInterfaceItem usage_item)
           
protected  Vector getOccurrencedUsages(int row_to_avoid)
           
 QuantityUnit getSelectedUnit()
          Get the selected unit from the unit choice.
 QuantityUnit getSelectedUnit(int row)
          Get the unit for the usage item at the specified row
protected  void handleDecrementQuantity(int gui_quantity, int selected_row, UsageInterfaceItem usage)
           
protected  void handleQuantityChange()
           
protected  void handleUnitsChange()
           
 void initializeHelp()
          Initialize the help system.
(package private)  void lineNumberTextField_keyPressed(KeyEvent event)
          Preprocess key events before they are passed to the TextField.
(package private)  void lineNumberTextField_keyReleased(KeyEvent event)
          When a key has been released in the line number entry field - update the table with the new value.
protected  void localize()
           
(package private)  void nextLineNumberButton_Action(ActionEvent event)
           
protected  void occurrenceButton_Action(ActionEvent event)
           
protected  void processAddUsesCommand()
           
private  void processNextLineNumber()
          Set the next available line number in theline number text field
protected  void processOccurrenceCommand()
           
(package private)  void qtyListSpinner_propertyChange(PropertyChangeEvent event)
           
(package private)  void quantityListSpinner_actionPerformed(ActionEvent event)
           
(package private)  void removeUsesButton_Action(ActionEvent event)
           
 boolean save()
          Save any changes.
 void setPartItem()
          This method is invoked by the WorkThread to initialize values based on the contained part item.
 void setUpdateMode(boolean update_mode)
          Set the update mode for the panel.
protected  void setValues()
           
(package private)  void unitChoice_ItemStateChanged(ItemEvent event)
           
(package private)  void usesMultiList_actionPerformed(ActionEvent event)
           
(package private)  void usesMultiList_itemStateChanged(ItemEvent event)
           
(package private)  void UsesPanel_GotFocus(FocusEvent event)
           
private  long validateAllLineNumbers()
          Check to see if any line numbers are used more than once.
(package private)  boolean validateLineNumber(long lineNum)
          Check to see if the line number input is already used in the assembly.
 void viewSelectedItem()
          Launch the view task for the seleted item in the list.
(package private)  void viewUsesButton_Action(ActionEvent event)
           
 
Methods inherited from class wt.clients.prodmgmt.HelperPanel
getApplet, getConfigurationItem, getContext, getHelpBundleName, getHelpContext, getHelpSystem, getInstanceItem, getLabelsRB, getLocalizedMessage, getLocalizedValue, getParentFrame, getPartItem, getThreadGroup, initResources, saveInThread, setApplet, setConfigurationItem, setConfigurationItem, setContext, setHelpContext, setHelpSystem, setInstanceItem, setInstanceItem, setPartItem, showMessageDialog
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, 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, 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

ID_COLUMN

public static final int ID_COLUMN
See Also:
Constant Field Values

NUMBER_COLUMN

public static final int NUMBER_COLUMN
See Also:
Constant Field Values

NAME_COUMN

public static final int NAME_COUMN
See Also:
Constant Field Values

QTY_COLUMN

public static final int QTY_COLUMN
See Also:
Constant Field Values

UNIT_COLUMN

public static final int UNIT_COLUMN
See Also:
Constant Field Values

LINE_NUMBER_COLUMN

public static final int LINE_NUMBER_COLUMN
See Also:
Constant Field Values

MANAGED_BY_COLUMN

public static final int MANAGED_BY_COLUMN
See Also:
Constant Field Values

LINE_NUMBER_UNDEFINED_STRING

public static final String LINE_NUMBER_UNDEFINED_STRING
See Also:
Constant Field Values

PROCESS_NEXT_LINE_NUMBER

private static final int PROCESS_NEXT_LINE_NUMBER
See Also:
Constant Field Values

PROCESS_EDIT_OCCURRENCES

private static final int PROCESS_EDIT_OCCURRENCES
See Also:
Constant Field Values

PROCESS_ADD_BUTTON

private static final int PROCESS_ADD_BUTTON
See Also:
Constant Field Values

theThreadGroup

private ThreadGroup theThreadGroup

usesList

protected UsesInterfaceList usesList

updateMode

protected boolean updateMode

LINE_NUMBER_INCREMENT

private static long LINE_NUMBER_INCREMENT

latestLineNumber

private long latestLineNumber

validateLineNumber

private boolean validateLineNumber

progressPanel

Panel progressPanel

findingLabel

Label findingLabel

workingPanel

Panel workingPanel

titlePanel

Panel titlePanel

titleLabel

Label titleLabel

usesPartPanel

symantec.itools.awt.BorderPanel usesPartPanel

usesMultiList

WTMultiList usesMultiList

actionPanel

Panel actionPanel

actionLayoutPanel

Panel actionLayoutPanel

updateUsagePanel

Panel updateUsagePanel

qtyPanel

Panel qtyPanel

qtyLabel

Label qtyLabel

qtyListSpinner

Spinner qtyListSpinner

unitPanel

Panel unitPanel

unitLabel

Label unitLabel

unitChoice

EnumeratedChoice unitChoice

lineNumberPanel

Panel lineNumberPanel

lineNumberLabel

Label lineNumberLabel

lineNumberTextField

TextField lineNumberTextField

nextLineNumberButton

Button nextLineNumberButton

buttonPanel

Panel buttonPanel

viewButton

Button viewButton

addButton

Button addButton

removeButton

Button removeButton

occurrenceButton

Button occurrenceButton
Constructor Detail

UsesPanel

public UsesPanel()
Create the panel.

Method Detail

setPartItem

public void setPartItem()
This method is invoked by the WorkThread to initialize values based on the contained part item.

Overrides:
setPartItem in class HelperPanel

setUpdateMode

public void setUpdateMode(boolean update_mode)
Set the update mode for the panel.

Overrides:
setUpdateMode in class HelperPanel
Parameters:
update_mode - if true, allow updates

save

public boolean save()
             throws WTException
Save any changes.

Returns:
true if save was successfull.
Throws:
WTException

setValues

protected void setValues()

getSelectedUnit

public QuantityUnit getSelectedUnit(int row)
Get the unit for the usage item at the specified row

Parameters:
row - the row in the multilist
Returns:
the quantity unit for the specified row

localize

protected void localize()
Overrides:
localize in class HelperPanel

initializeHelp

public void initializeHelp()
Initialize the help system.

Overrides:
initializeHelp in class HelperPanel

viewSelectedItem

public void viewSelectedItem()
Launch the view task for the seleted item in the list.


addNotify

public void addNotify()

addUsesButton_Action

void addUsesButton_Action(ActionEvent event)
Launch a WTChooser to search for new parts to use.

Parameters:
event - the action event

processAddUsesCommand

protected void processAddUsesCommand()

addUses

protected void addUses()

getSelectedUnit

public QuantityUnit getSelectedUnit()
Get the selected unit from the unit choice.

Returns:
the selected unit

removeUsesButton_Action

void removeUsesButton_Action(ActionEvent event)

viewUsesButton_Action

void viewUsesButton_Action(ActionEvent event)

occurrenceButton_Action

protected void occurrenceButton_Action(ActionEvent event)

processOccurrenceCommand

protected void processOccurrenceCommand()

editOccurrences

protected void editOccurrences()

quantityListSpinner_actionPerformed

void quantityListSpinner_actionPerformed(ActionEvent event)

getOccurrencedUsages

protected Vector getOccurrencedUsages(int row_to_avoid)

usesMultiList_itemStateChanged

void usesMultiList_itemStateChanged(ItemEvent event)

usesMultiList_actionPerformed

void usesMultiList_actionPerformed(ActionEvent event)

unitChoice_ItemStateChanged

void unitChoice_ItemStateChanged(ItemEvent event)

UsesPanel_GotFocus

void UsesPanel_GotFocus(FocusEvent event)

addHelpListener

public void addHelpListener(PropertyChangeListener pcl)

qtyListSpinner_propertyChange

void qtyListSpinner_propertyChange(PropertyChangeEvent event)

handleUnitsChange

protected void handleUnitsChange()

handleQuantityChange

protected void handleQuantityChange()

enableOccurrencesButton

protected void enableOccurrencesButton(double gui_quantity)

enableOccurrencesButton

protected void enableOccurrencesButton(boolean enable)

enableUnitsDropDown

protected void enableUnitsDropDown()

handleDecrementQuantity

protected void handleDecrementQuantity(int gui_quantity,
                                       int selected_row,
                                       UsageInterfaceItem usage)

getOccurrenceCount

protected static int getOccurrenceCount(UsageInterfaceItem usage_item)

getMaxLineNumber

long getMaxLineNumber()

validateAllLineNumbers

private long validateAllLineNumbers()
Check to see if any line numbers are used more than once. This method will stop at the first duplicate and return the line number. This method does not check to see if any of the line numbers have been used by published parts and therefore are not valid.

Returns:
the first duplicate line number

validateLineNumber

boolean validateLineNumber(long lineNum)
Check to see if the line number input is already used in the assembly. This method does not check to see if the line number has been used by any published parts.id.

Parameters:
lineNum - the line number to check
Returns:
true if the line number is valid

nextLineNumberButton_Action

void nextLineNumberButton_Action(ActionEvent event)

lineNumberTextField_keyPressed

void lineNumberTextField_keyPressed(KeyEvent event)
Preprocess key events before they are passed to the TextField. Keypress events are passed to this method before being handed to the TextField so that this method can throw away invalid key strokes. The only keys that are allowed are numeric (0-9), BACKSPACE and END keys. The reason the END key is allowed is because the cursor seems to default to the beginning of the field when it is first displayed.


lineNumberTextField_keyReleased

void lineNumberTextField_keyReleased(KeyEvent event)
When a key has been released in the line number entry field - update the table with the new value.


processNextLineNumber

private void processNextLineNumber()
Set the next available line number in theline number text field