wt.clients.query
Class QueryPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.query.QueryPanel
All Implemented Interfaces:
Accessible, EventListener, ImageObserver, MenuContainer, Serializable, WTQueryListener

public class QueryPanel
extends Panel
implements WTQueryListener

Sets up the Local Search panel. Calls the WTQuery class for the actual search task.

See Also:
Serialized Form

Nested Class Summary
(package private)  class QueryPanel.SymAction
          Action listener for this Panel.
(package private)  class QueryPanel.SymItem
          Capture events on the class picker.
 
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 buttonPanel
           
(package private)  Button checkInB
           
(package private)  Button checkOutB
           
(package private)  Choice classPicker
           
(package private)  Button closeB
           
private  SchemeDB db
           
(package private)  Button exploreB
           
(package private)  boolean fComponentsAdjusted
           
(package private)  Button getPropertiesB
           
(package private)  Button helpB
           
private  HelpContext helpContext
           
private  HelpSystem helpSystem
           
(package private)  Label label1
           
private  Vector listeners
           
private static String MESSAGES_RESOURCE
           
private static ResourceBundle messagesResource
           
private  WTQuery myQuery
           
private  WTSchema mySchema
           
private static String OPTIONS_RESOURCE
           
private static ListResourceBundle optionsResources
           
(package private)  symantec.itools.awt.StatusBar panel_statusBar
           
private  Applet parentApplet
           
private  Frame parentFrame
           
(package private)  Panel pickerPanel
           
(package private)  Button prodInfoExpB
           
(package private)  Panel queryPanel
           
private static String RESOURCE
           
private static ResourceBundle resources
           
private  BusinessInformation selectedObject
           
(package private)  Button undoCheckoutB
           
(package private)  Button updateB
           
 
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
QueryPanel()
          Constructor generated by Visual Cafe.
QueryPanel(Applet parent_applet)
          Creates a new QueryPanel.
 
Method Summary
 void addNotify()
          Notifies this component that it has been added to a container and if a peer is required, it should be created.
 void addQueryPanelListener(QueryPanelListener l)
          Register interested listeners for events in the Local Search panel.
(package private)  void checkInB_Action(ActionEvent event)
          Initiates an checkin dialog for the object selected.
(package private)  void checkOutB_Action(ActionEvent event)
          Initiates an checkout dialog for the object selected.
(package private)  void classPicker_ItemStateChanged(ItemEvent event)
          Process a change in the class selected in the class picker.
(package private)  void closeB_Action(ActionEvent event)
          Close the Local Search panel.
private  boolean confirmAction(String message)
          Display confirmation dialog.
private  void disableButtons()
          Disable buttons when no objects are selected.
private  void enableButtons(BusinessInformation selectedObject)
          Enable buttons depending on which class the object is.
(package private)  void exploreB_Action(ActionEvent event)
          Initiates new Windchill Explorer for the object selected or with no object selected.
protected  String getCabinetBasedIdentity(CabinetBased cabinet_based)
          Return an identity string for objects descending from BusinessInformation.
private  WTContext getContext()
          Get the context for this Local Search panel.
protected  String getLocalizedMessage(String key, Object[] params)
          Deprecated.  
private  Applet getParentApplet()
          Return the parent applet value.
private  Frame getParentFrame()
          Return the parent frame of this Local Search panel.
(package private)  void getPropertiesB_Action(ActionEvent event)
          Initiates a view frame for the object selected.
private  BusinessInformation getSelectedObject()
          Get the selected object from WTQuery.
(package private)  void helpB_Action(ActionEvent event)
          Display online help.
private  HelpSystem initPartHelpSystem()
          Initialize the online help system for calling the Product Information explorer.
private  void initResources()
          Initialize for resource bundles for message system.
private  void localize()
          Localizes the field labels and localizable text by getting correct values from a ResourceBundle.
(package private)  PropertyChangeListener newHelpListener()
          Creates a new help listener for putting mouse over messages in the status bar.
private  void notifyQueryPanelListeners(int action)
          Remove a registry of an interested listener.
(package private)  void prodInfoExpB_Action(ActionEvent event)
          Initiates a Product Information Explorer for the object selected or a find dialog if no object selected.
 void queryEvent(WTQueryEvent e)
          Responds to events from WTQuery.
 void removeQueryPanelListeners(QueryPanelListener l)
          Remove a registry of an interested listener.
private  void setParentApplet(Applet parent_applet)
          Sets the applet for this Local Search panel.
private  void setParentFrame()
          Attempts to calculate the parent frame for this Local Search panel, if none is already set.
 void setParentFrame(Frame parent_frame)
          Sets the frame for this Local Search panel.
 void show()
          Show panel.
private  void showMessageDialog(String message, boolean modal)
          Display message dialog.
(package private)  void undoCheckoutB_Action(ActionEvent event)
          Initiates an undocheckout dialog for the object selected.
(package private)  void updateB_Action(ActionEvent event)
          Initiates an update dialog for the object selected.
 
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, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fComponentsAdjusted

boolean fComponentsAdjusted

pickerPanel

Panel pickerPanel

classPicker

Choice classPicker

label1

Label label1

queryPanel

Panel queryPanel

buttonPanel

Panel buttonPanel

updateB

Button updateB

getPropertiesB

Button getPropertiesB

checkOutB

Button checkOutB

checkInB

Button checkInB

exploreB

Button exploreB

closeB

Button closeB

helpB

Button helpB

prodInfoExpB

Button prodInfoExpB

undoCheckoutB

Button undoCheckoutB

panel_statusBar

symantec.itools.awt.StatusBar panel_statusBar

parentApplet

private Applet parentApplet

parentFrame

private Frame parentFrame

MESSAGES_RESOURCE

private static String MESSAGES_RESOURCE

RESOURCE

private static String RESOURCE

OPTIONS_RESOURCE

private static String OPTIONS_RESOURCE

messagesResource

private static ResourceBundle messagesResource

resources

private static ResourceBundle resources

optionsResources

private static ListResourceBundle optionsResources

myQuery

private WTQuery myQuery

mySchema

private WTSchema mySchema

selectedObject

private BusinessInformation selectedObject

db

private SchemeDB db

listeners

private Vector listeners

helpSystem

private HelpSystem helpSystem

helpContext

private HelpContext helpContext
Constructor Detail

QueryPanel

public QueryPanel()
Constructor generated by Visual Cafe.


QueryPanel

public QueryPanel(Applet parent_applet)
Creates a new QueryPanel. Configures the WTQuery panel and the config spec.

Parameters:
parent_applet - the applet that called this panel
Method Detail

localize

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

See Also:
initResources, ResourceBundle

newHelpListener

PropertyChangeListener newHelpListener()
Creates a new help listener for putting mouse over messages in the status bar.


show

public void show()
Show panel.


addNotify

public void addNotify()
Notifies this component that it has been added to a container and if a peer is required, it should be created. The help system is initialized at this point.


queryEvent

public void queryEvent(WTQueryEvent e)
Responds to events from WTQuery.

Specified by:
queryEvent in interface WTQueryListener
Parameters:
e - WTQueryEvent to be responded to.

enableButtons

private void enableButtons(BusinessInformation selectedObject)
Enable buttons depending on which class the object is.

Parameters:
selectedObject - Object that was selected from the screen.

disableButtons

private void disableButtons()
Disable buttons when no objects are selected.


initResources

private void initResources()
Initialize for resource bundles for message system.


setParentApplet

private void setParentApplet(Applet parent_applet)
Sets the applet for this Local Search panel. The applet needs to be set so the message dialogs and other things work properly.

Parameters:
parent_applet - the applet which has a WTContext

getParentApplet

private Applet getParentApplet()
Return the parent applet value.


setParentFrame

public void setParentFrame(Frame parent_frame)
Sets the frame for this Local Search panel. The frame needs to be set so the message dialogs and other things work properly.

Parameters:
parent_frame - the frame which instantiated this panel

setParentFrame

private void setParentFrame()
Attempts to calculate the parent frame for this Local Search panel, if none is already set. The frame needs to be set so the message dialogs and other things work properly.


getParentFrame

private Frame getParentFrame()
Return the parent frame of this Local Search panel.


getContext

private WTContext getContext()
Get the context for this Local Search panel.


classPicker_ItemStateChanged

void classPicker_ItemStateChanged(ItemEvent event)
Process a change in the class selected in the class picker. This involves changing the search fields and the display area using WTQuery.

Parameters:
event - the event captured from the class picker

getSelectedObject

private BusinessInformation getSelectedObject()
Get the selected object from WTQuery. The java object reference for a particular row may be different than the object reference associated with the row when the item selection event was generated. As a result the object obtained at item selection time may be stale.


getPropertiesB_Action

void getPropertiesB_Action(ActionEvent event)
Initiates a view frame for the object selected.

Parameters:
event - the action event

updateB_Action

void updateB_Action(ActionEvent event)
Initiates an update dialog for the object selected.

Parameters:
event - the action event

checkOutB_Action

void checkOutB_Action(ActionEvent event)
Initiates an checkout dialog for the object selected.

Parameters:
event - the action event

undoCheckoutB_Action

void undoCheckoutB_Action(ActionEvent event)
Initiates an undocheckout dialog for the object selected.

Parameters:
event - the action event

exploreB_Action

void exploreB_Action(ActionEvent event)
Initiates new Windchill Explorer for the object selected or with no object selected.

Parameters:
event - the action event

checkInB_Action

void checkInB_Action(ActionEvent event)
Initiates an checkin dialog for the object selected.

Parameters:
event - the action event

closeB_Action

void closeB_Action(ActionEvent event)
Close the Local Search panel.

Parameters:
event - the action event

helpB_Action

void helpB_Action(ActionEvent event)
Display online help.

Parameters:
event - the action event

prodInfoExpB_Action

void prodInfoExpB_Action(ActionEvent event)
Initiates a Product Information Explorer for the object selected or a find dialog if no object selected.

Parameters:
event - the action event

addQueryPanelListener

public void addQueryPanelListener(QueryPanelListener l)
Register interested listeners for events in the Local Search panel. Used by applets that call this panel.

Parameters:
l - new query panel listener created by interested applet.

removeQueryPanelListeners

public void removeQueryPanelListeners(QueryPanelListener l)
Remove a registry of an interested listener.

Parameters:
l - listener to remove.

notifyQueryPanelListeners

private void notifyQueryPanelListeners(int action)
Remove a registry of an interested listener.

Parameters:
action - action to forward to listeners

showMessageDialog

private void showMessageDialog(String message,
                               boolean modal)
Display message dialog.

Parameters:
message - text message to display in dialog
modal - flag modal behavior

getCabinetBasedIdentity

protected String getCabinetBasedIdentity(CabinetBased cabinet_based)
Return an identity string for objects descending from BusinessInformation. Returns a blank string for non-BusinessInformation objects.

Parameters:
cabinet_based - object to return identity for

confirmAction

private boolean confirmAction(String message)
Display confirmation dialog.

Parameters:
message - text message to put in dialog

getLocalizedMessage

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

Returns the message from the resource bundle. See WTMessage.getLocalizedMessage()

Parameters:
key - key to retrieve the text from the resource bundle
params - parameters to substitute in the message

initPartHelpSystem

private HelpSystem initPartHelpSystem()
Initialize the online help system for calling the Product Information explorer.