wt.clients.scheduler
Class SchedPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.scheduler.SchedPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RefreshListener, Serializable

public class SchedPanel
extends Panel
implements RefreshListener

See Also:
Serialized Form

Nested Class Summary
(package private)  class SchedPanel.SymAction
           
(package private)  class SchedPanel.SymItem
           
 
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  ResourceBundle _beanRB
           
private  ThreadGroup _contextGroup
           
(package private)  HelpContext _helpContext
           
(package private)  HelpSystem _helpSystem
           
private  Hashtable _schedItems
           
private static String BEAN_RESOURCE
           
(package private)  Panel buttPanel
           
(package private)  symantec.itools.awt.LabelButton cancelButt
           
(package private)  symantec.itools.awt.LabelButton createButt
           
private  Font crossLocaleFont
           
private  ResourceBundle dateQueryRB
           
(package private)  symantec.itools.awt.LabelButton deleteButt
           
private  QuerySpec filter
           
private  String format
           
private  boolean hasArgs
           
static int IMMED_ONCE
           
private  String itemDescription
           
private  String itemName
           
(package private)  symantec.itools.awt.LabelButton logButt
           
private  String logRB
          Resource bundle where the log files for the log screen can be found.
private  int mode
           
private  String queueName
           
(package private)  symantec.itools.awt.LabelButton refreshButt
           
(package private)  WTMultiList schedList
           
private  String schedRB
           
private  String targetMethod
           
static int TIME_PERIODIC
           
(package private)  symantec.itools.awt.LabelButton updateButt
           
(package private)  symantec.itools.awt.LabelButton viewButt
           
 
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
SchedPanel()
           
 
Method Summary
 void addHelpListener(PropertyChangeListener pcl)
          Method addHelpListener adds the given listener to be notified of PropertyChangeEvents in the help system.
private  void addListItems()
           
(package private)  void cancelButt_ActionPerformed(ActionEvent event)
           
private  String computeArgDisplayName(Class[] params)
          Process the parameters to find the display name for the first argument of the method.
 String computeClassName()
           
private  Method computeMethod()
          get the targetMethod Method object.
 String computeMethodName()
           
private  void computeNextTime(Timestamp time, long row)
           
(package private)  void createButt_ActionPerformed(ActionEvent event)
           
private  int defaultColumnSize(int numCols)
           
(package private)  void deleteButt_ActionPerformed(ActionEvent event)
           
private  void enableWidgets()
           
private  Enumeration fetchItems()
           
 void fillList()
           
private  WTContext getContext()
           
 HelpContext getHelpContext()
          Gets the HelpContext instance associated with this screen., This method is public by Windchill convention
 HelpSystem getHelpSystem()
          Gets the HelpSystem instance associated with this screen.
 String getItemDescription()
           
 String getItemName()
           
private  String getLastCode(ScheduleItem theItem)
           
private  String getLastStatus(ScheduleItem theItem)
           
private  SchedStatusInfo getLastStatusEntry(ScheduleItem theItem)
           
private  ScheduleItem getListItem(int row)
           
 String getLogRB()
           
 int getMode()
           
private  Long getObjID(WTObject obj)
          Utility function which fetches an object ID given a WTObject
 String getQueueName()
           
 String getSchedRB()
           
 String getTargetMethod()
           
private  void initHeadings()
           
private  void initHelpSystem()
          Initializes the help system.
private  void initializeHelp()
          This function should be the last thing called in the ctor.
private  boolean isCurrentSelectionActive()
           
private  boolean isItemRunning(ScheduleItem theItem)
           
private  void localize()
           
(package private)  void logButt_ActionPerformed(ActionEvent event)
           
private  String periodicityToString(long secs)
           
(package private)  void refreshButt_ActionPerformed(ActionEvent event)
           
 void refreshList()
           
 void removeHelpListener(PropertyChangeListener pcl)
          Method RemoveHelpListener removes a listener which was notified of PropertyChangeEvents in the help system.
 QuerySpec retrieveFilter()
          The contents of the MultiList are governed by the filter.
(package private)  void schedList_actionPerformed(ActionEvent event)
           
(package private)  void schedList_itemPerformed(ItemEvent event)
           
private  void setContext(boolean contextOn)
           
 void setItemDescription(String descr)
           
 void setItemName(String name)
           
 void setLogRB(String rb)
           
 void setMode(int mode)
           
 void setQueueName(String queue)
           
 void setschedRB(String rb)
           
 void setTargetMethod(String method)
           
 void specifyFilter(QuerySpec filter)
          Customizers may programatically set the filter to be used by the application.
private  void stopHelp()
          stopHelp should be called every time the window gets closed.
(package private)  void updateButt_ActionPerformed(ActionEvent event)
           
(package private)  void viewButt_ActionPerformed(ActionEvent event)
           
 
Methods inherited from class java.awt.Panel
addNotify, 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

IMMED_ONCE

public static final int IMMED_ONCE
See Also:
Constant Field Values

TIME_PERIODIC

public static final int TIME_PERIODIC
See Also:
Constant Field Values

_contextGroup

private ThreadGroup _contextGroup

BEAN_RESOURCE

private static final String BEAN_RESOURCE
See Also:
Constant Field Values

_beanRB

private ResourceBundle _beanRB

crossLocaleFont

private Font crossLocaleFont

_schedItems

private Hashtable _schedItems

targetMethod

private String targetMethod

queueName

private String queueName

itemName

private String itemName

itemDescription

private String itemDescription

mode

private int mode

hasArgs

private boolean hasArgs

logRB

private String logRB
Resource bundle where the log files for the log screen can be found. Resources needed are:


schedRB

private String schedRB

filter

private QuerySpec filter

dateQueryRB

private ResourceBundle dateQueryRB

format

private String format

_helpSystem

HelpSystem _helpSystem

_helpContext

HelpContext _helpContext

schedList

WTMultiList schedList

buttPanel

Panel buttPanel

refreshButt

symantec.itools.awt.LabelButton refreshButt

createButt

symantec.itools.awt.LabelButton createButt

viewButt

symantec.itools.awt.LabelButton viewButt

updateButt

symantec.itools.awt.LabelButton updateButt

deleteButt

symantec.itools.awt.LabelButton deleteButt

logButt

symantec.itools.awt.LabelButton logButt

cancelButt

symantec.itools.awt.LabelButton cancelButt
Constructor Detail

SchedPanel

public SchedPanel()
Method Detail

retrieveFilter

public QuerySpec retrieveFilter()
The contents of the MultiList are governed by the filter. The default filter will filter by Queue Name, and the TargetMethod Attribute. This method returns the current filter.

Returns:
QuerySpec

specifyFilter

public void specifyFilter(QuerySpec filter)
Customizers may programatically set the filter to be used by the application.

See Also:
retrieveFilter

setMode

public void setMode(int mode)

getMode

public int getMode()

getTargetMethod

public String getTargetMethod()

setTargetMethod

public void setTargetMethod(String method)

computeMethodName

public String computeMethodName()

computeClassName

public String computeClassName()

setQueueName

public void setQueueName(String queue)

getQueueName

public String getQueueName()

setschedRB

public void setschedRB(String rb)

getSchedRB

public String getSchedRB()

setLogRB

public void setLogRB(String rb)

getLogRB

public String getLogRB()

setItemName

public void setItemName(String name)

getItemName

public String getItemName()

setItemDescription

public void setItemDescription(String descr)

getItemDescription

public String getItemDescription()

refreshList

public void refreshList()
Specified by:
refreshList in interface RefreshListener

localize

private void localize()

initHeadings

private void initHeadings()
                   throws MissingResourceException,
                          WTException
Throws:
MissingResourceException
WTException

defaultColumnSize

private int defaultColumnSize(int numCols)

computeMethod

private Method computeMethod()
                      throws ClassNotFoundException
get the targetMethod Method object.

Throws:
ClassNotFoundException

computeArgDisplayName

private String computeArgDisplayName(Class[] params)
                              throws InstantiationException,
                                     IllegalAccessException,
                                     WTIntrospectionException
Process the parameters to find the display name for the first argument of the method.

Throws:
InstantiationException
IllegalAccessException
WTIntrospectionException

addListItems

private void addListItems()

getLastCode

private String getLastCode(ScheduleItem theItem)

getLastStatusEntry

private SchedStatusInfo getLastStatusEntry(ScheduleItem theItem)

getLastStatus

private String getLastStatus(ScheduleItem theItem)

getObjID

private Long getObjID(WTObject obj)
Utility function which fetches an object ID given a WTObject


fillList

public void fillList()

computeNextTime

private void computeNextTime(Timestamp time,
                             long row)

enableWidgets

private void enableWidgets()

isCurrentSelectionActive

private boolean isCurrentSelectionActive()

fetchItems

private Enumeration fetchItems()
                        throws QueryException,
                               WTException
Throws:
QueryException
WTException

periodicityToString

private String periodicityToString(long secs)

getContext

private WTContext getContext()

setContext

private void setContext(boolean contextOn)

initializeHelp

private void initializeHelp()
This function should be the last thing called in the ctor. It initializes the help system, and adds the components the help system will listen for mouse over events to.


addHelpListener

public void addHelpListener(PropertyChangeListener pcl)
Method addHelpListener adds the given listener to be notified of PropertyChangeEvents in the help system. Tool description PropertyChangeEvents are generated when the user mouses over the buttons and list of ContentItems in this panel. The given listener will be notified of those events.

Supported API: false.

Parameters:
pcl - The PropertyChangeListener to be notified of PropertyChangeEvents generated by the help system.
See Also:
HelpSystem, HelpContext, PropertyChangeListener

removeHelpListener

public void removeHelpListener(PropertyChangeListener pcl)
Method RemoveHelpListener removes a listener which was notified of PropertyChangeEvents in the help system. If the given listener is not listening to me, no change is made.

Supported API: false.

Parameters:
pcl - The PropertyChangeListener to be notified of PropertyChangeEvents generated by the help system.
See Also:
PropertyChangeListener

getHelpContext

public HelpContext getHelpContext()
Gets the HelpContext instance associated with this screen., This method is public by Windchill convention


getHelpSystem

public HelpSystem getHelpSystem()
Gets the HelpSystem instance associated with this screen. Windchill convention says that this function should be public.


initHelpSystem

private void initHelpSystem()
Initializes the help system.


stopHelp

private void stopHelp()
stopHelp should be called every time the window gets closed.


createButt_ActionPerformed

void createButt_ActionPerformed(ActionEvent event)

logButt_ActionPerformed

void logButt_ActionPerformed(ActionEvent event)

getListItem

private ScheduleItem getListItem(int row)

deleteButt_ActionPerformed

void deleteButt_ActionPerformed(ActionEvent event)

viewButt_ActionPerformed

void viewButt_ActionPerformed(ActionEvent event)

isItemRunning

private boolean isItemRunning(ScheduleItem theItem)

updateButt_ActionPerformed

void updateButt_ActionPerformed(ActionEvent event)

refreshButt_ActionPerformed

void refreshButt_ActionPerformed(ActionEvent event)

cancelButt_ActionPerformed

void cancelButt_ActionPerformed(ActionEvent event)

schedList_actionPerformed

void schedList_actionPerformed(ActionEvent event)

schedList_itemPerformed

void schedList_itemPerformed(ItemEvent event)