wt.clients.beans.query
Class WTQuery

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bysymantec.itools.awt.BorderPanel
                  extended bywt.clients.beans.query.WTPanel
                      extended bywt.clients.beans.query.WTQuery
All Implemented Interfaces:
Accessible, ActionListener, symantec.itools.awt.AlignStyle, symantec.itools.awt.BevelStyle, ContainerListener, EventListener, ImageObserver, ItemListener, MenuContainer, PropertyChangeListener, Serializable
Direct Known Subclasses:
WTChooser, WTChooser

public class WTQuery
extends WTPanel
implements ActionListener, ItemListener, PropertyChangeListener

WTQuery provides a tool that allows you to include in your application the ability to search for objects in the local Windchill database. WTQuery is comprised of an optional title, a Tab panel containing an input area for search criteria, 3 required buttons, 3 optional buttons, a check box indicating whether to append to or replace the search results and a list area for displaying search results.

A WTQuery object provides the ability to search for objects of a specified class. A WTSchema object is used to specify which modeled Windchill business class and associated attributes are to be used in configuring the WTQuery object. The Tab panel and results viewing list are dynamically constructed based on the schema provided. When calling WTQuery it is necessary to specify a WTSchema object.

The search results viewing list presents the results of the database query. The user can clear this area by clicking the clear button. There is a check box available to the user that determines whether to clear the list area between invocations of clicking the Find button. By default the list area allows multiple objects to be selected. To restrict the list area to single selection use the setMultipleMode() method. To obtain the list of selected objects use either the getSelectedDetails() or getSelectedDetail() method depending on whether multiple or single selection mode is in use.

The buttons display in two columns. The required column contains Find, Stop and Clear. The optional column contains OK, Close and Help. The functionality for the required buttons and the Help button is handled by WTQuery. The calling application can register a listener to be notified when the OK or Close buttons are clicked. To register a listener, create a WTQueryListener object and call the addListener() method using the WTQueryListener object as input.

For example to add WTQuery to a panel:

     Panel queryPanel;
     try {

        // Create WTQuery without a status area.
        WTQuery myQuery = new WTQuery("My Query Panel", SearchTask.ALL_VERSIONS, false);
        myQuery.setSchema("C:wt.doc.WTDocument; G:Search Criteria; A:name; D:versionIdentifier; G:More Search Criteria; A:description;");

        // Set single selection mode
        myQuery.setMultipleMode(false);

        // --- Hide the right column of buttons.
        myQuery.setDialogButtonsVisible(false);

        // Set Layout.
        queryPanel.setLayout(new BorderLayout());
        queryPanel.add("Center", myQuery);

        // Add event listener.
        myQuery.addListener(new WTQueryListener() {
           public void queryEvent(WTQueryEvent e)
           {
              if (e.getType().equals(WTQueryEvent.COMMAND ))
              {
                 if (e.getCommand().equals(WTQuery.OkCMD) )
                 {
                    // The Ok button is clicked, get the selected objects.
                    WTQuery query_source = (WTQuery)e.getSource();
	                  WTObject[] objs = query_source.getSelectedDetails();
                    // Continue with code that will process the selected object array
                 }
              }
           }
	      // Add help listener
        myQuery.addHelpListener(helpListener);
    	}catch (Exception e)   {}
  


Supported API: true

Extendable: true

See Also:
WTSchema, WTQueryListener, WTQueryEvent, Serialized Form

Nested Class Summary
(package private)  class WTQuery.ButtonKeyAdapter
           
(package private)  class WTQuery.QueryRefreshListener
           
 
Nested classes inherited from class symantec.itools.awt.BorderPanel
 
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
protected  SearchCondition[] additionalSearchConditions
           
protected  boolean cancelInProgress
           
static String ClearCMD
          The value for the "Clear button clicked" command event type.
private  int columnWidth
           
private static boolean CONTAINER_CHECK
           
private  WTContext context
           
private  boolean documentFinder
           
static String FindCMD
          The value for the "Find button clicked" command event type.
private static String HELP_RESOURCE
           
private static String HELP_TARGET
          Defined constant String which defines the name of the browser window to launch online help in.
static String HelpCMD
          For internal use only.
private  NFHelpContext helpContext
           
private  NFHelpSystem helpSystem
           
private  boolean ibaTabVisible
           
protected  String my_search_filter
           
private  Button myCB
           
private  boolean myDialogButtonsVisible
           
private  Button myFB
           
private  Button myHB
           
protected  WTMultiList myList
           
private  Vector myListener
           
private  Checkbox myMB
           
private  Button myOB
           
private  ProcessQuery myPQ
           
private  Button myQB
           
private  Label myQP
           
private  Button mySB
           
protected  WTSchema mySchema
           
private  WTStatus myStatus
           
private  boolean myStatusVisible
           
protected  WTTabPanel myTP
           
static String OkCMD
          The value for the "OK button clicked" command event type.
private  Frame parentFrame
           
static String QuitCMD
          The value for the "Close button clicked" command event type.
private  WTQuery.QueryRefreshListener refreshListener
           
private static String RESOURCE
           
private static String SERVER_ID
           
static String StopCMD
          The value for the "Stop button clicked" command event type.
private  ThreadGroup theThreadGroup
           
private static boolean VERBOSE
           
private static String versionID
           
 
Fields inherited from class wt.clients.beans.query.WTPanel
BOTH, CENTER, EAST, EQUATOR, FLAT, HORIZONTAL, LEFT, LINE, LOWER, NONE, NORTH, RAISE, RIGHT, SOUTH, VERTICAL, WEST
 
Fields inherited from class symantec.itools.awt.BorderPanel
bevelDarkerColor, bevelLighterColor, borderColor, cachedBackground, errors, internalInsets, ixPad, iyPadBottom, iyPadTop, label, labelAlignment, labelColor, labelipadx, labelpadx, padbottom, padleft, padright, padtop, panel, style
 
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 symantec.itools.awt.AlignStyle
ALIGN_CENTERED, ALIGN_LEFT, ALIGN_RIGHT
 
Fields inherited from interface symantec.itools.awt.BevelStyle
BEVEL_LINE, BEVEL_LOWERED, BEVEL_NONE, BEVEL_RAISED
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WTQuery()
          Default no-arg constructor.
WTQuery(boolean show_iba)
           
WTQuery(String a_title, String search_filter)
          Deprecated. Use the constructor which includes specifying whether to show the status area as part of this component.
WTQuery(String a_title, String search_filter, boolean show_status)
          Constructor specifying a title, search filter and whether to include a status display area as part of this component.
WTQuery(String a_title, String search_filter, boolean show_status, boolean show_iba)
          Constructor specifying a title, search filter, status display flag and a IBA tab flag.
WTQuery(String a_title, String search_filter, boolean show_status, boolean show_iba, boolean doc_finder)
          Constructor specifying a title, search filter and whether to include a status display area as part of this component, as well as showing IBA associated and if to allow for the searching of Documents.
 
Method Summary
 void actionPerformed(ActionEvent e)
          This method is for internal use only.
private  Button addButton(String a_label, String a_name)
          For internal use only.
 void addHelpListener(PropertyChangeListener pcl)
          Method addHelpListener adds the given listener to be notified of PropertyChangeEvents in the help system.
 void addListener(WTQueryListener a_listener)
          Method addListener adds the given listener to be notified of WTQueryEvents.
 void addNotify()
           
private  SearchCondition appendContainerTypeCondition(Class classname, String containerType)
           
protected  Vector buildIBASearchExpressions()
           
private  void cancel()
          For internal use only.
private  boolean classInSearch(Class search_class, Class oid_class)
           
 void clearResults(boolean a_list_too)
          Clear the status area and the results list area.
 void deselectReselect()
           
 Color getCanvasBackground()
          Return the background color of the cells in the results list area.
 Color getCanvasForeground()
          Return the foreground color of the results list area.
 String[] getColumnSizes()
          Returns a string array containing the width of each column in the results viewing area.
 int getColumnWidth()
          Gets the default width for each column in the results viewing area.
 WTObject getDetail(int a_index)
          Return the object at the specified row in the results list area.
private  HelpSystem getHelpSystem()
          For internal use only.
 boolean getMultipleMode()
          Return true if multiple selection mode is enabled in the results list area, false if single selection mode is in use.
protected  WTMultiList getMyList()
           
protected  Vector getMyListener()
           
 WTSchema getSchema()
          Return the schema currently being used.
 WTObject getSelectedDetail()
          Return the selected object in the results list area.
 WTObject[] getSelectedDetails()
          Return the list of selected objects in the results list area.
protected  void handleCreateEvent(RefreshEvent evt)
          This method is for internal use only.
protected  void handleDeleteEvent(RefreshEvent evt)
          This method is for internal use only.
protected  void handleUpdateEvent(RefreshEvent evt)
          This method is for internal use only.
private  void initializeHelp()
          For internal use only.
protected  boolean isCancelInProgress()
          For internal use only.
 boolean isDialogButtonsVisible()
          Return true if the OK, Close and Help buttons are currently visible.
 boolean isIbaTabVisible()
           
 boolean isStatusVisible()
          Return true if the status area is visible.
 void itemStateChanged(ItemEvent e)
          This method is for internal use only.
private  void myCBEnterKeyPress(KeyEvent event)
           
private  void myFBEnterKeyPress(KeyEvent event)
           
private  void myHBEnterKeyPress(KeyEvent event)
           
private  void myOBEnterKeyPress(KeyEvent event)
           
private  void myQBEnterKeyPress(KeyEvent event)
           
private  void mySBEnterKeyPress(KeyEvent event)
           
private  void processEvent(WTQueryEvent aEvent)
           
protected  void processQuery(boolean aAddToResult)
          This method is for internal use only.
 void propertyChange(PropertyChangeEvent e)
          This method is for internal use only.
 void refresh()
          For internal use only.
 void removeHelpListener(PropertyChangeListener pcl)
          Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system.
 void removeListener(WTQueryListener a_listener)
          Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system.
 void setAdditionalSearchConditions(SearchCondition[] sc)
           
 void setBackground(Color aColor)
          Set the background color of the Tab panel and results list area.
protected  void setButtons(boolean aEnabled)
          For internal use only.
protected  void setCancelInProgress(boolean state)
          For internal use only.
 void setCanvasBackground(Color aColor)
          Set the background color of the cells in the Tab panel and results list area.
 void setCanvasForeground(Color a_color)
          Set the foreground color of the Tab panel and results list area.
 void setColumnSizes(String[] list)
          Sets the width of each column in the results viewing area.
 void setColumnWidth(int width)
          Sets the default width for each column in the results viewing area.
 void setDialogButtonsVisible(boolean visible)
          Set the visibility of the OK, Close and Help buttons.
 void setForeground(Color aColor)
          Set the foreground color of the Tab panel and results list area.
 void setIbaTabVisible(boolean b)
           
 void setMultipleMode(boolean mode)
          Set the multiple selection mode in the results list area.
 void setSchema(WTSchema a_schema)
          Set the schema to use.
 void setStatus(String a_value)
          Set the specified string in the status area.
 void setStatusVisible(boolean visible)
          Set the visibility of the status area.
 int totalDetails()
          Return the current number of objects in the results list area.
private  void updateColumnWidth()
          If the default column width has been set, update each column with the default column width.
 
Methods inherited from class wt.clients.beans.query.WTPanel
add, add, add, add, getPad, PAD, setPad
 
Methods inherited from class symantec.itools.awt.BorderPanel
addBevelStyleListener, addBevelStyleListener, addContainerListener, addImpl, addPropertyChangeListener, addVetoableChangeListener, calculateHilightColors, componentAdded, componentRemoved, countComponents, draw, drawBorder, drawLabel, getAlignStyle, getBevelStyle, getBorderColor, getComponent, getComponentCount, getComponents, getInternalInsets, getIPadBottom, getIPadSides, getIPadTop, getLabel, getLabelColor, getLabelTopMargin, getLabelWidthMargin, getLayout, getMinimumSize, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPreferredSize, insets, isValidBevelStyle, layout, minimumSize, paint, preferredSize, remove, remove, removeAll, removeBevelStyleListener, removeBevelStyleListener, removeContainerListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, reshape, setAlignStyle, setBevelStyle, setBorderColor, setBorderColor, setBounds, setInternalInsets, setIPadBottom, setIPadSides, setIPadTop, setLabel, setLabelColor, setLayout, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, sizepanel, update
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getListeners, getMaximumSize, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, list, list, locate, paintComponents, paramString, print, printComponents, processContainerEvent, processEvent, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, 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, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, 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

versionID

private static final String versionID
See Also:
Constant Field Values

HELP_RESOURCE

private static final String HELP_RESOURCE
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

HELP_TARGET

private static final String HELP_TARGET
Defined constant String which defines the name of the browser window to launch online help in.

See Also:
Constant Field Values

FindCMD

public static final String FindCMD
The value for the "Find button clicked" command event type. A WTQueryEvent is fired when the Find button is clicked with a WTQueryEvent.COMMAND type and command value of FindCMD.

Supported API: true

See Also:
Constant Field Values

StopCMD

public static final String StopCMD
The value for the "Stop button clicked" command event type. A WTQueryEvent is fired when the Stop button is clicked with a WTQueryEvent.COMMAND type and command value of StopCMD.

Supported API: true

See Also:
Constant Field Values

ClearCMD

public static final String ClearCMD
The value for the "Clear button clicked" command event type. A WTQueryEvent is fired when the Clear button is clicked with a WTQueryEvent.COMMAND type and command value of ClearCMD.

Supported API: true

See Also:
Constant Field Values

OkCMD

public static final String OkCMD
The value for the "OK button clicked" command event type. A WTQueryEvent is fired when the OK button is clicked with a WTQueryEvent.COMMAND type and command value of OkCMD.

Supported API: true

See Also:
Constant Field Values

QuitCMD

public static final String QuitCMD
The value for the "Close button clicked" command event type. A WTQueryEvent is fired when the Close button is clicked with a WTQueryEvent.COMMAND type and command value of QuitCMD.

Supported API: true

See Also:
Constant Field Values

parentFrame

private Frame parentFrame

HelpCMD

public static final String HelpCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

SERVER_ID

private static String SERVER_ID

CONTAINER_CHECK

private static boolean CONTAINER_CHECK

mySchema

protected WTSchema mySchema

myTP

protected WTTabPanel myTP

myList

protected WTMultiList myList

myStatus

private WTStatus myStatus

myListener

private Vector myListener

myFB

private Button myFB

mySB

private Button mySB

myCB

private Button myCB

myOB

private Button myOB

myQB

private Button myQB

myHB

private Button myHB

myQP

private Label myQP

myMB

private Checkbox myMB

myDialogButtonsVisible

private boolean myDialogButtonsVisible

myStatusVisible

private boolean myStatusVisible

refreshListener

private WTQuery.QueryRefreshListener refreshListener

context

private WTContext context

helpSystem

private NFHelpSystem helpSystem

helpContext

private NFHelpContext helpContext

my_search_filter

protected String my_search_filter

theThreadGroup

private ThreadGroup theThreadGroup

columnWidth

private int columnWidth

myPQ

private ProcessQuery myPQ

cancelInProgress

protected boolean cancelInProgress

additionalSearchConditions

protected SearchCondition[] additionalSearchConditions

ibaTabVisible

private boolean ibaTabVisible

documentFinder

private boolean documentFinder
Constructor Detail

WTQuery

public WTQuery()
Default no-arg constructor.

Supported API: true


WTQuery

public WTQuery(boolean show_iba)

WTQuery

public WTQuery(String a_title,
               String search_filter)
Deprecated. Use the constructor which includes specifying whether to show the status area as part of this component.

Use the constructor which includes specifying whether to show the status area as part of this component.

Supported API: false


WTQuery

public WTQuery(String a_title,
               String search_filter,
               boolean show_status)
Constructor specifying a title, search filter and whether to include a status display area as part of this component.

Supported API: true

Parameters:
a_title - the title displayed above the Tab panel. when processing the query command. See wt.query.SearchTask for search filter string constants.
show_status - set to true if a status area should be created to display status messages, otherwise false.
See Also:
SearchTask

WTQuery

public WTQuery(String a_title,
               String search_filter,
               boolean show_status,
               boolean show_iba,
               boolean doc_finder)
Constructor specifying a title, search filter and whether to include a status display area as part of this component, as well as showing IBA associated and if to allow for the searching of Documents.

Supported API: true

Parameters:
a_title - the title displayed above the Tab panel. when processing the query command. See wt.query.SearchTask for search filter string constants.
show_status - set to true if a status area should be created to display status messages, otherwise false.
show_iba -
doc_finder -
See Also:
SearchTask

WTQuery

public WTQuery(String a_title,
               String search_filter,
               boolean show_status,
               boolean show_iba)
Constructor specifying a title, search filter, status display flag and a IBA tab flag.

Supported API: true

Parameters:
a_title - the title displayed above the Tab panel.
search_filter - used when processing the query command. See wt.query.SearchTask for search filter string constants.
show_status - set to true if a status area should be created to display status messages, otherwise false.
show_iba - set to true if the IBA tab should be shown
See Also:
SearchTask
Method Detail

updateColumnWidth

private void updateColumnWidth()
If the default column width has been set, update each column with the default column width.

Supported API: false


setColumnSizes

public void setColumnSizes(String[] list)
                    throws PropertyVetoException
Sets the width of each column in the results viewing area. The width is set in pixels. Setting the column sizes to null will turn auto resizing on.

Supported API: true

Parameters:
list - a string array containing results viewing area column sizes in pixels
Throws:
PropertyVetoException - if the specified property value is unacceptable
See Also:
getColumnSizes()

getColumnSizes

public String[] getColumnSizes()
Returns a string array containing the width of each column in the results viewing area. The width of the column is in pixels. If columns are being automatically sized, it will return null.

Supported API: true

Returns:
a string array containing column sizes in pixels
See Also:
setColumnSizes(java.lang.String[])

setColumnWidth

public void setColumnWidth(int width)
Sets the default width for each column in the results viewing area. The width is set in pixels. Setting the column width will cause each column in the results viewing area to have the same initial size. In order to set a separate width for each column use setColumnSizes. Setting this vaule to 0 turns, auto resizing on.

Supported API: true

Parameters:
width - the default results viewing area column size in pixels
See Also:
setColumnSizes, getColumnWidth

getColumnWidth

public int getColumnWidth()
Gets the default width for each column in the results viewing area. The width is returned in pixels.

Supported API: true

Returns:
default results area column size in pixels
See Also:
setColumnWidth

setCancelInProgress

protected void setCancelInProgress(boolean state)
For internal use only.

Supported API: false


isCancelInProgress

protected boolean isCancelInProgress()
For internal use only.

Supported API: false


initializeHelp

private void initializeHelp()
For internal use only.

Supported API: false


getHelpSystem

private HelpSystem getHelpSystem()
For internal use only.

Supported API: false


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: true

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

removeHelpListener

public void removeHelpListener(PropertyChangeListener pcl)
Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system. If the given listener is not currently a listener, no changes are made.

Supported API: true

Parameters:
pcl - the PropertyChangeListener to be removed as a listener of events generated by the help system of this panel.
See Also:
addHelpListener(java.beans.PropertyChangeListener), PropertyChangeListener

addButton

private Button addButton(String a_label,
                         String a_name)
For internal use only.

Supported API: false


setButtons

protected void setButtons(boolean aEnabled)
For internal use only.

Supported API: false


refresh

public void refresh()
For internal use only. Use this method to repaint the Tab panel and results list.

Supported API: false


getSchema

public WTSchema getSchema()
Return the schema currently being used. The schema describes the attributes to be used as search criteria in the Tab panel and attributes to be displayed in the results list area.

Supported API: true

Returns:
the current schema that is in use.

cancel

private void cancel()
For internal use only.

Supported API: false


setSchema

public void setSchema(WTSchema a_schema)
Set the schema to use. The schema describes the attributes to be used as search criteria in the Tab panel and attributes to be displayed in the results list area.

Supported API: true

Parameters:
a_schema - The schema used to obtain attributes for the Tab panel and results list area.

isDialogButtonsVisible

public boolean isDialogButtonsVisible()
Return true if the OK, Close and Help buttons are currently visible.

Supported API: false

Returns:
true if the OK, Close and Help buttons are visible, otherwise false.

setDialogButtonsVisible

public void setDialogButtonsVisible(boolean visible)
Set the visibility of the OK, Close and Help buttons. These are optional buttons whose visibility can be controlled by this method.

Supported API: false

Parameters:
visible - true if the OK, Close and Help buttons are visible, otherwise false.

isStatusVisible

public boolean isStatusVisible()
Return true if the status area is visible.

Supported API: false

Returns:
true if the status area is visible, otherwise false.

setStatusVisible

public void setStatusVisible(boolean visible)
Set the visibility of the status area. The status area is an optional component whose visibility can be controlled by this method.

Supported API: true

Parameters:
visible - true if the status area is visible, otherwise false.

getCanvasForeground

public Color getCanvasForeground()
Return the foreground color of the results list area.

Supported API: false

Returns:
the foreground color of the results list area.

setCanvasForeground

public void setCanvasForeground(Color a_color)
Set the foreground color of the Tab panel and results list area.

Supported API: false

Parameters:
a_color - The foreground color to use in the Tab panel and results list area.

getCanvasBackground

public Color getCanvasBackground()
Return the background color of the cells in the results list area.

Supported API: false

Returns:
the background color of the cells in the results list area.

setCanvasBackground

public void setCanvasBackground(Color aColor)
Set the background color of the cells in the Tab panel and results list area.

Supported API: false


setBackground

public void setBackground(Color aColor)
Set the background color of the Tab panel and results list area.

Supported API: false


setForeground

public void setForeground(Color aColor)
Set the foreground color of the Tab panel and results list area.

Supported API: false


setMultipleMode

public void setMultipleMode(boolean mode)
                     throws PropertyVetoException
Set the multiple selection mode in the results list area.

Supported API: true

Parameters:
mode - true enables multiple selection, false enables single selection.
Throws:
PropertyVetoException - if the specified property value is unacceptable.

getMultipleMode

public boolean getMultipleMode()
Return true if multiple selection mode is enabled in the results list area, false if single selection mode is in use.

Supported API: true

Returns:
true if multiple selection mode is in use, false for single selection.

totalDetails

public int totalDetails()
Return the current number of objects in the results list area.

Supported API: true

Returns:
The current number of objects in the results list area.

getDetail

public WTObject getDetail(int a_index)
Return the object at the specified row in the results list area.

Supported API: true

Parameters:
a_index - The index of the row to obtain the object.
Returns:
the object at the specified row in the results list area.

getSelectedDetail

public WTObject getSelectedDetail()
Return the selected object in the results list area.

Supported API: true

Returns:
the selected object in the results list area.

getSelectedDetails

public WTObject[] getSelectedDetails()
Return the list of selected objects in the results list area.

Supported API: true

Returns:
the list of selected objects in the results list area.

setStatus

public void setStatus(String a_value)
Set the specified string in the status area. This sets the value in the status area if the status area is in use otherwise fire a WTQueryEvent.STATUS event.

Supported API: false

Parameters:
a_value - The status message for display.

clearResults

public void clearResults(boolean a_list_too)
Clear the status area and the results list area. If the specified parameter is true then the results list area is also cleared.

Supported API: false

Parameters:
a_list_too - true if the results list area is also cleared, otherwise false.

addListener

public void addListener(WTQueryListener a_listener)
Method addListener adds the given listener to be notified of WTQueryEvents. A WTQueryEvent is fired when a button is clicked, a status message is ready or the selection has been changed in the results viewing area.

Supported API: true

Parameters:
a_listener - The WTQueryListener to be notified of WTQueryEvents.
See Also:
removeListener(wt.clients.beans.query.WTQueryListener), WTQueryListener, WTQueryEvent

removeListener

public void removeListener(WTQueryListener a_listener)
Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system. If the given listener is not currently a listener, no changes are made.

Supported API: true

Parameters:
a_listener - the WTQueryistener to be removed as a listener of events generated by the help system of this panel.
See Also:
addListener(wt.clients.beans.query.WTQueryListener), WTQueryListener

processEvent

private void processEvent(WTQueryEvent aEvent)

actionPerformed

public void actionPerformed(ActionEvent e)
This method is for internal use only.

Supported API: false

Specified by:
actionPerformed in interface ActionListener

itemStateChanged

public void itemStateChanged(ItemEvent e)
This method is for internal use only.

Supported API: false

Specified by:
itemStateChanged in interface ItemListener

propertyChange

public void propertyChange(PropertyChangeEvent e)
This method is for internal use only.

Supported API: false

Specified by:
propertyChange in interface PropertyChangeListener

handleCreateEvent

protected void handleCreateEvent(RefreshEvent evt)
This method is for internal use only.

Supported API: false


handleUpdateEvent

protected void handleUpdateEvent(RefreshEvent evt)
This method is for internal use only.

Supported API: false


handleDeleteEvent

protected void handleDeleteEvent(RefreshEvent evt)
This method is for internal use only.

Supported API: false


processQuery

protected void processQuery(boolean aAddToResult)
This method is for internal use only.

Supported API: false


appendContainerTypeCondition

private SearchCondition appendContainerTypeCondition(Class classname,
                                                     String containerType)
                                              throws WTException
Throws:
WTException

classInSearch

private boolean classInSearch(Class search_class,
                              Class oid_class)
                       throws ClassNotFoundException
Throws:
ClassNotFoundException

myFBEnterKeyPress

private void myFBEnterKeyPress(KeyEvent event)

mySBEnterKeyPress

private void mySBEnterKeyPress(KeyEvent event)

myCBEnterKeyPress

private void myCBEnterKeyPress(KeyEvent event)

myOBEnterKeyPress

private void myOBEnterKeyPress(KeyEvent event)

myQBEnterKeyPress

private void myQBEnterKeyPress(KeyEvent event)

myHBEnterKeyPress

private void myHBEnterKeyPress(KeyEvent event)

addNotify

public void addNotify()

deselectReselect

public void deselectReselect()

getMyList

protected WTMultiList getMyList()

getMyListener

protected Vector getMyListener()

setAdditionalSearchConditions

public void setAdditionalSearchConditions(SearchCondition[] sc)

setIbaTabVisible

public void setIbaTabVisible(boolean b)

isIbaTabVisible

public boolean isIbaTabVisible()

buildIBASearchExpressions

protected Vector buildIBASearchExpressions()