|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
symantec.itools.awt.BorderPanel
wt.clients.beans.query.WTPanel
wt.clients.beans.query.WTQuery
wt.clients.step.WTChooser
WTChooser
provides a tool that allows you to include in your application the
ability to search for objects in the local Windchill database. WTChooser
is
comprised of an optional title, a tab panel containing an input area for search criteria, six
buttons, a check box indicating whether to append to or replace the search
results and a list area for displaying search results.
The WTChooser
object provides the ability to search for objects
of a specified class. The ChooserOptions
class is distributed as source code and is
used to configure what attributes and classes are available to WTChooser
.
The ChooserOptions
object consists of strings that associate a fully qualified class name with
attributes to be used for
restricting the query and attributes to be displayed in the results list
area. When calling WTChooser
it is necessary to specify a fully qualified
class name that is defined appropriately in the ChooserOptions
object.
The search results list area 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. One column contains Find, Stop and Clear.
The other contains Ok, Close and Help. For the most part the functionality for
these buttons is handled by WTChooser
. 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.
The WTChooser
panel can either be embedded in an existing Frame or you can instruct
WTChooser
to create a dialog window. If a dialog window is used, it is necessary to
specify a java.awt.Component
as the parent. The dialog will be centered
over the parent.
For example to create a WTChooser
in a dialog:
Frame frame = getParentFrame(); WTChooser chooser = new WTChooser("wt.part.WTPartMaster", "Find Part", frame); chooser.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. WTChooser chooser_source = (WTChooser)e.getSource(); WTObject[] objs = chooser_source.getSelectedDetails(); // Continue with code that will process the selected object array } } }
ChooserOptions
,
WTQuery
,
WTQueryListener
,
WTQueryEvent
,
Serialized FormNested Class Summary | |
(package private) class |
WTChooser.QueryListener
|
(package private) class |
WTChooser.SymAction
|
Nested classes inherited from class wt.clients.beans.query.WTQuery |
|
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 | |
private JDialog |
myDialog
|
private WTScheme |
myScheme
|
private SchemeDB |
mySchemeDB
|
private static String |
OPTIONS_RESOURCE
|
private static String |
versionID
|
Fields inherited from class wt.clients.beans.query.WTQuery |
additionalSearchConditions, cancelInProgress, ClearCMD, FindCMD, HelpCMD, my_search_filter, myList, mySchema, myTP, OkCMD, QuitCMD, StopCMD |
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 | |
WTChooser()
Default no-arg constructor. |
|
WTChooser(String a_class,
String a_title)
Constructor specifying a fully qualified class name and title. |
|
WTChooser(String a_class,
String a_title,
Component a_parent)
Constructor specifying a fully qualified class name, title and parent component. |
|
WTChooser(String a_class,
String a_title,
Component a_parent,
String a_search_filter)
Constructor specifying a fully qualified class name, title, parent component and search filter. |
|
WTChooser(String a_class,
String a_title,
Component a_parent,
String a_search_filter,
boolean show_iba)
Constructor specifying a fully qualified class name, title, parent component and search filter. |
|
WTChooser(String a_class,
String a_title,
String a_search_filter)
Constructor specifying a fully qualified class name, title and search filter. |
|
WTChooser(WTScheme a_scheme,
String a_title,
Component a_parent,
String a_search_filter)
Constructor specifying a fully qualified class name, title, parent component and search filter. |
Method Summary | |
private void |
myList_ActionPerformed(ActionEvent event)
|
(package private) PropertyChangeListener |
newHelpListener()
|
private void |
processEvent(WTQueryEvent aEvent)
|
void |
setClass(String a_class)
Set the class name to be used. |
private void |
setup(WTScheme a_scheme,
String a_title,
Component a_parent,
String a_search_filter)
|
void |
setVisible(boolean a_value)
This will either show or hide the WTChooser panel. |
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String versionID
private WTScheme myScheme
private SchemeDB mySchemeDB
private JDialog myDialog
private static String OPTIONS_RESOURCE
Constructor Detail |
public WTChooser()
setClass
method with a fully qualified class name that has
an associated definition in the ChooserOptions
object.
public WTChooser(String a_class, String a_title)
a_class
- A fully qualified class name. There must be an associated definition
for this class name in the ChooserOptions
object.a_title
- The title displayed above the tab panel.public WTChooser(String a_class, String a_title, String a_search_filter)
a_class
- A fully qualified class name. There must be a associated definition
for this class name in the ChooserOptions
object.a_title
- The title displayed above the tab panel.a_search_filter
- A search filter type to pass to the method server
when processing the query command. See wt.query.SearchTask
for search filter string constants.SearchTask
public WTChooser(String a_class, String a_title, Component a_parent)
WTChooser
. The parent component
must either be a java.awt.frame
or have one in it's hierarchy for the
dialog to associate itself with.
a_class
- A fully qualified class name. There must be an associated definition
for this class name in the ChooserOptions
object.a_title
- The title displayed above the tab panel.a_parent
- The parent for the dialog window.public WTChooser(String a_class, String a_title, Component a_parent, String a_search_filter)
WTChooser
. The parent component
must either be a java.awt.frame
or have one in it's hierarchy for the
dialog to associate itself with.
a_class
- A fully qualified class name. There must be an associated definition
for this class name in the ChooserOptions
object.a_title
- The title displayed above the tab panel.a_parent
- The parent for the dialog window.a_search_filter
- A search filter type to pass to the method server
when processing the query command. See wt.query.SearchTask
for search filter string constants.SearchTask
public WTChooser(String a_class, String a_title, Component a_parent, String a_search_filter, boolean show_iba)
WTChooser
. The parent component
must either be a java.awt.frame
or have one in it's hierarchy for the
dialog to associate itself with.
a_class
- A fully qualified class name. There must be an associated definition
for this class name in the ChooserOptions
object.a_title
- The title displayed above the tab panel.a_parent
- The parent for the dialog window.a_search_filter
- A search filter type to pass to the method server
when processing the query command. See wt.query.SearchTask
for search filter string constants.show_iba
- set to false if no IBA panel is requiredSearchTask
public WTChooser(WTScheme a_scheme, String a_title, Component a_parent, String a_search_filter)
WTChooser
. The parent component
must either be a java.awt.frame
or have one in it's hierarchy for the
dialog to associate itself with.
a_scheme
- The scheme to be used to setup the search criteria tab panels
and columns in the results area.a_title
- The title displayed above the tab panel.a_parent
- The parent for the dialog window.a_search_filter
- A search filter type to pass to the method server
when processing the query command. See wt.query.SearchTask
for search filter string constants.SearchTask
Method Detail |
private void setup(WTScheme a_scheme, String a_title, Component a_parent, String a_search_filter)
private void myList_ActionPerformed(ActionEvent event)
private void processEvent(WTQueryEvent aEvent)
public void setVisible(boolean a_value)
WTChooser
panel.
a_value
- Set to true to show or false to hide.PropertyChangeListener newHelpListener()
public void setClass(String a_class)
ChoserOptions
class.
This method is required if the no-arg constructor is used.
a_class
- A fully qualified class name. There must be an associated definition
for this class name in the ChooserOptions
object.ChooserOptions
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |