wt.clients.beans.query
Class WTSchema

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.WTSchema
All Implemented Interfaces:
Accessible, ActionListener, symantec.itools.awt.AlignStyle, symantec.itools.awt.BevelStyle, ContainerListener, EventListener, Externalizable, ImageObserver, MenuContainer, Serializable

public class WTSchema
extends WTPanel
implements ActionListener, Externalizable

A WTSchema object stores display information for a modeled Windchill business class. It can be used to specify a schema used by WTQuery and WTMultiList objects. It is necessary to create this class with a properly formatted string that contains a fully qualified class name as well as attributes that will be displayed. When defining a schema to be used by a WTQuery object, the formatted string specifies which attributes get displayed in the Tab panel and results list area. When defining a schema to be used by a WTMultiList object, the formatted string specifes the attributes associated with the columns in the list.

The format string is broken up into records. There is a one character code followed by a colon at the beginning of each record, a semi-colon and space combination are used as a separator between records. The one character codes are C, G, A and D.

C is used to specify a fully qualified class name. This must be the first record in the format string.

G is used to specify Text for the search criteria tabs. All attributes that follow will be grouped on that tab, until the next G record.

A is used to specify an attribute used in both the search criteria Tab panel and the results list area. Attributes are displayed in the order they appear in the string.

D is used to specify an attribute used in a multi column list. This includes defining a column in a WTMultiList object and the results list area of a WTQuery object.

For example when defining the schema to be used by a WTQuery object:

 "C:wt.doc.WTDocument; G:Search Criteria; A:name; D:versionIdentifier; G:More Search Criteria; A:description;"
 
designates wt.doc.WTDocument as the class that will be queried. The tab panel will contain two tabs labeled Search Criteria and More Search Criteria. The Search Criteria tab will contain an input field for name and versionIdentifier. The More Search Criteria tab will contain an input field for description. The results list area will be set up with columns for name, versionIdentifier and description.

Supported API: true

Extendable: false

See Also:
Serialized Form

Nested Class Summary
 
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
static String AddCMD
          For internal use only.
private  Vector attributes
           
static String AttributeTYPE
          For internal use only.
static String ClassTYPE
          For internal use only.
private  WTContainer container
           
static String DISPLAY_ONLY
          For internal use only.
static String DownCMD
          For internal use only.
private  Vector filteredContainerTypes
           
static String FindCMD
          For internal use only.
private  Vector groups
           
static String GroupTYPE
          For internal use only.
private  Button myAB
           
private  WTSchemaAClass myAC
           
private  Button myDB
           
private  Button myFB
           
private  Button myRB
           
private  Button mySB
           
private  WTSchemaSClass mySC
           
private  Button myUB
           
static String RemoveCMD
          For internal use only.
private static String RESOURCE
           
private  String schemaString
           
static String SelectCMD
          For internal use only.
static String UpCMD
          For internal use only.
private  boolean useProjects
           
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
WTSchema()
          Default no-arg constructor.
WTSchema(String a_schema)
          Constructor specifying a formatted string.
WTSchema(String[] a_type, String[] a_schema)
          Deprecated.  
WTSchema(String[] a_type, String[] a_schema, String a_containerFilter)
          Deprecated.  
WTSchema(String a_schema, String a_containerFilter)
          Deprecated.  
WTSchema(String a_schema, WTContainer a_container)
          Deprecated.  
 
Method Summary
 void actionPerformed(ActionEvent e)
          For internal use only.
private  Button addButton(String a_label, String a_name)
          For internal use only.
 void createDevTime()
          For internal use only.
 PropertyDescriptor getAttribute(int index)
          For internal use only.
 PropertyDescriptor getAttribute(int aGroup, int aMtd)
          For internal use only.
 Method getAttributeMethod(int index)
          For internal use only.
 Method getAttributeMethod(int aGroup, int aMtd)
          For internal use only.
 String getAttributeName(int aGroup, int aMtd)
          For internal use only.
 String getAttributeValue(int aGroup, int aMtd, Object aObj)
          For internal use only.
 String getAttributeValue(int index, Object aObj)
          For internal use only.
 Class getBusinessClass()
          For internal use only.
 String getBusinessClassDisplayName()
          For internal use only.
 WTBusinessInfo getBusinessInfo()
          For internal use only.
 Color getCanvasBackground()
          For internal use only.
 Color getCanvasForeground()
          For internal use only.
 WTContainer getContainer()
          This method is to list the Container that the search should filter on

Supported API: false
 Vector getFilteredContainerTypes()
          This method is to list the set of Container Types that should be filtered.
 WTSchemaGroup getGroup(int aGroup)
          For internal use only.
 String getGroupName(int aGroup)
          For internal use only.
 String getHeadingName(int index)
          For internal use only.
 String getJavaAttributeName(int aGroup, int aMtd)
          For internal use only.
 String getJavaClazzName()
          For internal use only.
 Dimension getPreferredSize()
          Gets the preferred size of this component.
 WTSchemaSClass getSClazz()
          For internal use only.
 boolean getUseProjects()
          This method is to get whether to show projects or not

Supported API: false
 void readExternal(ObjectInput stream)
           
 void refresh()
          Refresh the development time components.
 void setBackground(Color aColor)
          For internal use only.
 void setCanvasBackground(Color aColor)
          For internal use only.
 void setCanvasForeground(Color aColor)
          For internal use only.
 void setContainer(WTContainer filterContainer)
          This method is to set the Container that the search should be filtered on.
 void setFilteredContainerTypes(String containerTypeList)
          This method is to set the list of Container Types that should be filtered.
 void setForeground(Color aColor)
          For internal use only.
 void setSchema(String a_schema)
          Set the formatted string to be stored in the WTSchema object.
 void setSchema(String[] a_type, String[] a_schema)
          Deprecated. Use the setSchema method with an input string as a parameter.
 void setSchema(WTSchema a_schema)
          Deprecated. Use the setSchema method with an input string as a parameter.
 void setUseProjects(boolean projects)
          This method is to set projects on

Supported API: false
 String toString()
          Returns a string representation of this class.
 int totalAttributes(int aGroup)
          For internal use only.
 int totalGroups()
          For internal use only.
 int totalHeadings()
          For internal use only.
 void writeExternal(ObjectOutput stream)
           
 
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, addNotify, 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, 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, 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

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

ClassTYPE

public static final String ClassTYPE
For internal use only.

Supported API: false

See Also:
Constant Field Values

GroupTYPE

public static final String GroupTYPE
For internal use only.

Supported API: false

See Also:
Constant Field Values

AttributeTYPE

public static final String AttributeTYPE
For internal use only.

Supported API: false

See Also:
Constant Field Values

DISPLAY_ONLY

public static final String DISPLAY_ONLY
For internal use only.

Supported API: false

See Also:
Constant Field Values

SelectCMD

public static final String SelectCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

AddCMD

public static final String AddCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

RemoveCMD

public static final String RemoveCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

UpCMD

public static final String UpCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

DownCMD

public static final String DownCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

FindCMD

public static final String FindCMD
For internal use only.

Supported API: false

See Also:
Constant Field Values

myAC

private WTSchemaAClass myAC

mySC

private WTSchemaSClass mySC

schemaString

private String schemaString

groups

private Vector groups

attributes

private Vector attributes

mySB

private Button mySB

myAB

private Button myAB

myRB

private Button myRB

myUB

private Button myUB

myDB

private Button myDB

myFB

private Button myFB

filteredContainerTypes

private Vector filteredContainerTypes

container

private WTContainer container

useProjects

private boolean useProjects
Constructor Detail

WTSchema

public WTSchema(String a_schema)
Constructor specifying a formatted string. The format string is broken up into records. There is a one character code followed by a colon at the beginning of each record, a semi-colon and space combination are used as a separator between records. The one character codes are C, G, A and D.

C is used to specify a fully qualified class name. This must be the first record in the format string.

G is used to specify Text for the search criteria tabs. All attributes that follow will be grouped on that tab, until the next G record.

A is used to specify an attribute used in both the search criteria Tab panel and the results list area. Attributes are displayed in the order they appear in the string.

D is used to specify an attribute used in a multi column list. This includes defining a column in a WTMultiList object and the results list area of a WTQuery object.

For example when defining the schema to be used by a WTQuery object:

 "C:wt.doc.WTDocument; G:Search Criteria; A:name; D:versionIdentifier; G:More Search Criteria; A:description;"
 
designates wt.doc.WTDocument as the class that will be queried. The tab panel will contain two tabs labeled Search Criteria and More Search Criteria. The Search Criteria tab will contain an input field for name and versionIdentifier. The More Search Criteria tab will contain an input field for description. The results list area will be set up with columns for name, versionIdentifier and description.

Supported API: true

Parameters:
a_schema - A formatted string.

WTSchema

public WTSchema(String[] a_type,
                String[] a_schema)
Deprecated.  

Constructor.

Supported API: false


WTSchema

public WTSchema()
Default no-arg constructor. If you use this constructor it is necessary to call the setSchema() method.

Supported API: true

See Also:
setSchema(wt.clients.beans.query.WTSchema)

WTSchema

public WTSchema(String[] a_type,
                String[] a_schema,
                String a_containerFilter)
Deprecated.  

Constructor.

Supported API: false


WTSchema

public WTSchema(String a_schema,
                String a_containerFilter)
Deprecated.  

Constructor.

Supported API: false


WTSchema

public WTSchema(String a_schema,
                WTContainer a_container)
Deprecated.  

Constructor.

Supported API: false

Method Detail

createDevTime

public void createDevTime()
For internal use only. Create the GUI components required at development time.

Supported API: false


setSchema

public void setSchema(WTSchema a_schema)
Deprecated. Use the setSchema method with an input string as a parameter.

Set the schema.

Supported API: false


setSchema

public void setSchema(String[] a_type,
                      String[] a_schema)
Deprecated. Use the setSchema method with an input string as a parameter.

Set the schema.

Supported API: false


setSchema

public void setSchema(String a_schema)
Set the formatted string to be stored in the WTSchema object.

Supported API: true


toString

public String toString()
Returns a string representation of this class.

Supported API: false

Returns:
a string representation of this class.

getPreferredSize

public Dimension getPreferredSize()
Gets the preferred size of this component.

Supported API: false

Returns:
the preferred size of this component.

refresh

public void refresh()
Refresh the development time components.

Supported API: false


getCanvasForeground

public Color getCanvasForeground()
For internal use only.

Supported API: false


setCanvasForeground

public void setCanvasForeground(Color aColor)
For internal use only.

Supported API: false


getCanvasBackground

public Color getCanvasBackground()
For internal use only.

Supported API: false


setCanvasBackground

public void setCanvasBackground(Color aColor)
For internal use only.

Supported API: false


setForeground

public void setForeground(Color aColor)
For internal use only.

Supported API: false


setBackground

public void setBackground(Color aColor)
For internal use only.

Supported API: false


addButton

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

Supported API: false


actionPerformed

public void actionPerformed(ActionEvent e)
For internal use only.

Supported API: false

Specified by:
actionPerformed in interface ActionListener

getBusinessInfo

public WTBusinessInfo getBusinessInfo()
For internal use only.

Supported API: false


getBusinessClass

public Class getBusinessClass()
For internal use only.

Supported API: false


getBusinessClassDisplayName

public String getBusinessClassDisplayName()
For internal use only.

Supported API: false


getJavaClazzName

public String getJavaClazzName()
For internal use only.

Supported API: false


getSClazz

public WTSchemaSClass getSClazz()
For internal use only.

Supported API: false


totalGroups

public int totalGroups()
For internal use only.

Supported API: false


totalHeadings

public int totalHeadings()
For internal use only.

Supported API: false


getGroup

public WTSchemaGroup getGroup(int aGroup)
For internal use only.

Supported API: false


getGroupName

public String getGroupName(int aGroup)
For internal use only.

Supported API: false


totalAttributes

public int totalAttributes(int aGroup)
For internal use only.

Supported API: false


getAttribute

public PropertyDescriptor getAttribute(int aGroup,
                                       int aMtd)
For internal use only.

Supported API: false


getAttribute

public PropertyDescriptor getAttribute(int index)
For internal use only.

Supported API: false


getAttributeMethod

public Method getAttributeMethod(int aGroup,
                                 int aMtd)
For internal use only.

Supported API: false


getAttributeMethod

public Method getAttributeMethod(int index)
For internal use only.

Supported API: false


getAttributeName

public String getAttributeName(int aGroup,
                               int aMtd)
For internal use only.

Supported API: false


getHeadingName

public String getHeadingName(int index)
For internal use only.

Supported API: false


getJavaAttributeName

public String getJavaAttributeName(int aGroup,
                                   int aMtd)
For internal use only.

Supported API: false


getAttributeValue

public String getAttributeValue(int aGroup,
                                int aMtd,
                                Object aObj)
For internal use only.

Supported API: false


getAttributeValue

public String getAttributeValue(int index,
                                Object aObj)
For internal use only.

Supported API: false


writeExternal

public void writeExternal(ObjectOutput stream)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput stream)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

setFilteredContainerTypes

public void setFilteredContainerTypes(String containerTypeList)
This method is to set the list of Container Types that should be filtered. Example is all queries in Windchill PIE should not return objects in Project containers

Supported API: false


getFilteredContainerTypes

public Vector getFilteredContainerTypes()
This method is to list the set of Container Types that should be filtered. Example is all queries in Windchill PIE should not return objects in Project containers

Supported API: false


setContainer

public void setContainer(WTContainer filterContainer)
This method is to set the Container that the search should be filtered on.

Supported API: false


getContainer

public WTContainer getContainer()
This method is to list the Container that the search should filter on

Supported API: false


setUseProjects

public void setUseProjects(boolean projects)
This method is to set projects on

Supported API: false


getUseProjects

public boolean getUseProjects()
This method is to get whether to show projects or not

Supported API: false