Package wt.clients.beans
Class AssociationsPanel
java.lang.Object
java.awt.Component
java.awt.Container
wt.clients.beans.AssociationsPanel
- All Implemented Interfaces:
ImageObserver,ItemSelectable,MenuContainer,Serializable
This bean has a dev-time and run-time component. At dev-time,
this component can be dragged from the component library in
Visual Cafe and dropped onto a container. The properties can
also be edited by using Visual Cafe's Property Editor. At
run-time, this class retrieves the links of the object and displays
them in a multilist. The bean has an Edit and View mode.
In edit mode, the user can add new relationships, remove existing
relationships, and update existing relationships by editing the
attributes on the link. In view mode, the user can view the
relationships and view the attributes on the link. The bean
keeps track of the creates, updates, and removes and is able
to persist the changes when save() is invoked.
The following is an example of how to use the bean:
Supported API: true.
Extendable: true.
associationsPanel1 = new wt.clients.beans.AssociationsPanel();
associationsPanel1.setRole("someRole");
associationsPanel1.setChooserOptions(wt.clients.beans.query.ChooserOptions.SOME_SEARCH_LIST);
try {
java.lang.String[] tempString = new java.lang.String[5];
tempString[0] = display("nameColumn");
tempString[1] = display("numberColumn");
tempString[2] = display(SomeRB.TITLE_COLUMN);
tempString[3] = display(SomeRB.PART_TYPE_COLUMN);
tempString[4] = display(SomeRB.SOURCE_COLUMN);
associationsPanel1.setLabels(tempString);
}
catch(java.beans.PropertyVetoException e) { }
try {
associationsPanel1.setLinkClassName("someClass");
}
catch(wt.util.WTPropertyVetoException e) { }
try {
associationsPanel1.setObjectClassName("anotherClass");
}
catch(java.lang.ClassNotFoundException e) { }
try {
java.lang.String[] tempString = new java.lang.String[5];
tempString[0] = new java.lang.String("name");
tempString[1] = new java.lang.String("number");
tempString[2] = new java.lang.String("title");
tempString[3] = new java.lang.String("partType");
tempString[4] = new java.lang.String("source");
associationsPanel1.setOtherSideAttributes(tempString);
}
catch(wt.util.WTPropertyVetoException e) { }
try {
associationsPanel1.setOtherSideClassName("someClass");
}
catch(java.lang.ClassNotFoundException e) { }
associationsPanel1.setMode("Edit");
try {
java.lang.String[] tempString = new java.lang.String[1];
tempString[0] = new java.lang.String("description");
associationsPanel1.setLinkAttributes(tempString);
}
catch(wt.util.WTPropertyVetoException e) { }
associationsPanel1.setBounds(0,0,530,62);
associationsPanel1.setBackground(new Color(12632256));
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.fill = GridBagConstraints.BOTH;
gbc.insets = new Insets(0,0,0,0);
((GridBagLayout)panel3.getLayout()).setConstraints(associationsPanel1, gbc);
panel3.add(associationsPanel1);
associationsPanel1.addHelpListener(helpListener);
associationsPanel1.setObject(taskLogic.getCurrentObject());
associationsPanel1.setEnabled(true);
associationsPanel1.save(taskLogic.getCurrentObject());
associationsPanel1.getHelpContext().stopIt();
The class accommodates validating and persisting changes only when
the save() method is invoked. To turn on this behavior invoke the
setSaveUpdatesOnly(true) method. The normal behavior is to verify
and persist all association entries even though some of the entries
are not changed. When the normal behavior is used existing
described by documents that are in a checked out state by another
user will error when the save() method is invoked. This results in
adds, removes, or updates not being saved. If this is not the
desired behavior then invoke the setSaveUpdatesOnly(true) method
immediately after instantiating the class.
Supported API: true.
Extendable: true.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis class listens for the user to select an objec.Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionThis is the no arg constructor that creates the panel with a multilist, a view button, and an attributesForm which will be used to display or edit the attributes on the link.AssociationsPanel(String mode) This creates an instance of the associationsPanel and sets the mode to the parameter. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis adds the buttons that are associated with the edit mode
Supported API: true.voidMethodaddHelpListeneradds the given listener to be notified ofPropertyChangeEventsin the help system.protected voidaddSelectedObject(Persistable added_object) This creates a new link to an object selected by the user and adds it to the multilist.protected voidaddToTable(BinaryLink link) this adds a new object to the table
Supported API: true.protected voidThis creates the buttons used in edit mode
Supported API: true.protected voidcreateUI()This adds and removes fields based on the mode
Supported API: true.protected voidThis initialized the column widths of the multilist to equal widths with a hidden last column.This gets the background of the panel.This is used to get the list of classes that the user can pick from on the frame that pops up when the user clicks the Add button.getFont()This gets the font of the panel.This gets the foreground of the panel.getFrame()This is the public getter used to get the Frame that started this bean.This returns the helpContext being used for online help.This returns the helpSystem being used for online help.String[]This gets the labels that are used as the column headers for the multilist.String[]This gets the names of the attributes of the other-side class that are displayed in the columns of the multilist.This gets the name of the linkClass that to be traversed.wt.clients.beans.SchemaThis method returns the linkSchema set by the developer at dev-time
Supported API: true.This returns the minimum size that will be used at dev-time and at run-time depending on the layout.getMinimumSize(int cols, int rows) This returns the minimum size that will be used at dev-time and at run-time depending on the layout.getMode()This is the public getter that returns the current mode of the bean.String[]This gets the names of the attributes of the link class that are displayed in the columns of the multilist.This is the public getter that will return the object that is being edited or viewed.This is the public getter for the objectClass whose links are navigated & updated, or viewed.This is the public getter for the objectClassName which is the string that represents the objectClass whose links are navigated & updated, or viewed.String[]This is the public getter used to get the otherSideAttributes that are displayed in the multilist.This is the public getter that returns the class that is being navigated to along the role.This is the public getter that returns the name of the class that is being navigated to along the role.wt.clients.beans.SchemaThis method returns the otherSideSchema set by the developer at dev-time
Supported API: true.This returns the preferred size that will be used at dev-time and at run-time depending on the layout.getPreferredSize(int cols, int rows) This returns the preferred size that will be used at dev-time and at run-time depending on the layout.String[]This method is used to get the widths of the of the multilist relative to 1 which represents the smallest column width.getRole()This is the public getter for the role that is navigated.booleanThis is the public getter that returns the boolean value of the saveUpdatesOnly flag.This returns the link represented by the row that the user has selected in the multilist.This returns the object that the user has currently selected in the multilist.Object[]This returns the objects that the user has currently selected in the multilist.booleanGet whether IBA tab will show.protected booleanThis returns a boolean value representing whether or not the user has modified the current link attribute(s).booleanisDirty()This returns a boolean value representing whether or not the user has modified anything.protected voidThis launches a dialog that will allow the user to select an object and add it to the multilist, create a new link to it, and edit the link.protected voidThis launches a dialog that will allow the user to select an object and add it to the multilist, create a new link to it, and edit the link.protected voidlocalize()This method sets the text of the components to the localized string from the resource bundle.protected voidpopulate()This retrieves the links on the object and displays them in the multilist.voidrefresh()This method redraws the column widths after the multilist has been displayed.protected voidThis removes the buttons that are associated with the edit mode
Supported API: true.voidMethodremoveHelpListenerremoves a listener which was being notified ofPropertyChangeEventsin the help system.protected voidthis removes the link that the user has selected from the links hashtable and adds it to the removedLinks hashtable if it is persistent so that it can be removed from the db.voidCalling requestFocus() on this panel will set the focus to the first field in the panel which is the multilist.protected voidThis resets the hashtables
Supported API: true.protected voidThis resets the column headers with the context of the labels property and the multiListLinkAttributes property.save(Persistable persistable) This is used to save the links the toPersistablepassed in.voidsetBackground(Color color) This sets the background of the panel.voidsetChooserOptions(String options) This is used to set the list of classes that the user can pick from on the frame that pops up when the user clicks the Add button.protected voidsetCurrentLinkAttributeDirty(boolean flag) This sets the dirty flag and should be called when the user makes some action to change the state of the bean.protected voidsetDirty(boolean flag) This sets the dirty flag and should be called when the user makes some action to change the state of the bean.voidsetEnabled(boolean b) This sets the panel and it's components to enabled or disabled based on the passed in boolean.protected voidsetFieldState(boolean b, Container container) This sets the fields to either editable or enabled depending on the boolean and the type of component.voidThis sets the font of the panel.voidsetForeground(Color color) This sets the foreground of the panel.voidThis is the public setter used to set the Frame that started this bean.voidThis sets the labels that will be used as the column headers for the multilist.voidsetLinkAttributes(String[] link_attributes) This sets the names of the attributes of the other-side class that will be displayed in the columns of the multilist.voidsetLinkClassName(String class_name) This sets the name of the linkClass that is being traversed.voidsetLinkSchema(wt.clients.beans.Schema schema) This is used at dev-time when the developer uses the schema editor to select the class and the attributes of the link.voidThis is used to set the mode of the bean to either EDIT_MODE or VIEW_MODE and the GUI will be updated based on the mode.voidsetModel(AssociationsModel model) This method sets the model class used to navigate the relationship.voidsetMultiListLinkAttributes(String[] link_attributes) This sets the names of the attributes of the link class that will be displayed in the columns of the multilist.voidThis is the public setter that will set the object that to be edited or viewed.voidsetObjectClass(Class object_class) This is the public setter for the objectClass whose links will be navigated & updated, or viewed.voidsetObjectClassName(String object_class) This is the public setter for the objectClassName which is the string that represents the objectClass whose links will be navigated & updated, or viewed.voidsetOtherSideAttributes(String[] attributes) This is the public setter used to set the otherSideAttributes that are displayed in the multilist.voidsetOtherSideClass(Class other_side) This is the public setter that sets the class to be navigated to along the role.voidsetOtherSideClassName(String other_side) This is the public setter that sets the name of the class to be navigated to along the role.voidsetOtherSideSchema(wt.clients.beans.Schema schema) This is used at dev-time when the developer uses the schema editor to select the class and the attributes of the other-side object.voidsetRelativeColumnWidths(String[] widths) This method is used to set the widths of the of the multilist relative to 1 which represents the smallest column width.voidThis is the public setter for the role that will be navigated.voidsetSaveUpdatesOnly(boolean flagValue) This sets the boolean value of the saveUpdatesOnly flag.voidsetShowIBA(boolean show_iba) Used to set if IBA tab will show up.protected voidThis updates the links with the results of the user's actions
Supported API: true.protected voidupdateTableLinkValues(int row, BinaryLink link) Update the string values displayed in the MultiList.protected voidThis will use the TaskDelegate for the selected object to launch a view of that object.Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, isValidateRoot, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, update, validate, validateTreeMethods 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
AssociationsPanel
public AssociationsPanel()This is the no arg constructor that creates the panel with a multilist, a view button, and an attributesForm which will be used to display or edit the attributes on the link.
Supported API: true. -
AssociationsPanel
This creates an instance of the associationsPanel and sets the mode to the parameter.
Supported API: true.
-
-
Method Details
-
localize
protected void localize()This method sets the text of the components to the localized string from the resource bundle.
Supported API: true. -
getMinimumSize
This returns the minimum size that will be used at dev-time and at run-time depending on the layout.
Supported API: true.- Overrides:
getMinimumSizein classContainer
-
getMinimumSize
This returns the minimum size that will be used at dev-time and at run-time depending on the layout.
Supported API: true. -
getPreferredSize
This returns the preferred size that will be used at dev-time and at run-time depending on the layout.
Supported API: true.- Overrides:
getPreferredSizein classContainer
-
getPreferredSize
This returns the preferred size that will be used at dev-time and at run-time depending on the layout.
Supported API: true. -
isDirty
public boolean isDirty()This returns a boolean value representing whether or not the user has modified anything.
Supported API: true. -
setDirty
protected void setDirty(boolean flag) This sets the dirty flag and should be called when the user makes some action to change the state of the bean.
Supported API: true. -
isCurrentLinkAttributeDirty
protected boolean isCurrentLinkAttributeDirty()This returns a boolean value representing whether or not the user has modified the current link attribute(s).
Supported API: true. -
setCurrentLinkAttributeDirty
protected void setCurrentLinkAttributeDirty(boolean flag) This sets the dirty flag and should be called when the user makes some action to change the state of the bean.
Supported API: true. -
setMode
This is used to set the mode of the bean to either EDIT_MODE or VIEW_MODE and the GUI will be updated based on the mode.
Supported API: true. -
getMode
This is the public getter that returns the current mode of the bean.
Supported API: true. -
setChooserOptions
This is used to set the list of classes that the user can pick from on the frame that pops up when the user clicks the Add button.
Supported API: true. -
getChooserOptions
This is used to get the list of classes that the user can pick from on the frame that pops up when the user clicks the Add button.
Supported API: true. -
setShowIBA
public void setShowIBA(boolean show_iba) Used to set if IBA tab will show up.
Supported API: true. -
getShowIBA
public boolean getShowIBA()Get whether IBA tab will show.
Supported API: true. -
getObject
This is the public getter that will return the object that is being edited or viewed.
Supported API: true. -
setObject
This is the public setter that will set the object that to be edited or viewed. It will spawn a thread that navigates the relationships on the object and populates the multilist with the links of typelinkClass.
Supported API: true. -
setRole
This is the public setter for the role that will be navigated.
Supported API: true. -
getRole
This is the public getter for the role that is navigated.
Supported API: true. -
setObjectClass
This is the public setter for the objectClass whose links will be navigated & updated, or viewed.
Supported API: true. -
getObjectClass
This is the public getter for the objectClass whose links are navigated & updated, or viewed.
Supported API: true. -
setObjectClassName
This is the public setter for the objectClassName which is the string that represents the objectClass whose links will be navigated & updated, or viewed.
Supported API: true.- Throws:
ClassNotFoundException
-
getObjectClassName
This is the public getter for the objectClassName which is the string that represents the objectClass whose links are navigated & updated, or viewed.
Supported API: true. -
getOtherSideClass
This is the public getter that returns the class that is being navigated to along the role.
Supported API: true. -
setOtherSideClass
This is the public setter that sets the class to be navigated to along the role.
Supported API: true. -
getOtherSideClassName
This is the public getter that returns the name of the class that is being navigated to along the role.
Supported API: true. -
setOtherSideClassName
This is the public setter that sets the name of the class to be navigated to along the role.
Supported API: true.- Throws:
ClassNotFoundException
-
setLinkClassName
This sets the name of the linkClass that is being traversed.
Supported API: true.- Throws:
WTPropertyVetoException
-
getLinkClassName
This gets the name of the linkClass that to be traversed.
Supported API: true. -
setLinkAttributes
This sets the names of the attributes of the other-side class that will be displayed in the columns of the multilist.
Supported API: true.- Throws:
WTPropertyVetoException
-
getLinkAttributes
This gets the names of the attributes of the other-side class that are displayed in the columns of the multilist.
Supported API: true. -
setMultiListLinkAttributes
public void setMultiListLinkAttributes(String[] link_attributes) throws WTPropertyVetoException, PropertyVetoException, ClassNotFoundException, WTIntrospectionException This sets the names of the attributes of the link class that will be displayed in the columns of the multilist.
Supported API: true. -
getMultiListLinkAttributes
This gets the names of the attributes of the link class that are displayed in the columns of the multilist.
Supported API: true. -
setLinkSchema
This is used at dev-time when the developer uses the schema editor to select the class and the attributes of the link. This method takes the users entries and sets the linkClassName and the linkAttributes.
Supported API: true.- Throws:
PropertyVetoException
-
getLinkSchema
public wt.clients.beans.Schema getLinkSchema()This method returns the linkSchema set by the developer at dev-time
Supported API: true. -
setModel
This method sets the model class used to navigate the relationship. If no model class is defined, the bean uses PersistenceHelper.manage.navigate to return the QueryResult containing the link classes and the other side objects.
Supported API: true.- Throws:
PropertyVetoException
-
setOtherSideSchema
public void setOtherSideSchema(wt.clients.beans.Schema schema) throws PropertyVetoException, ClassNotFoundException This is used at dev-time when the developer uses the schema editor to select the class and the attributes of the other-side object. This method takes the users entries and sets the otherSideClassName and the otherSideAttributes.
Supported API: true. -
getOtherSideSchema
public wt.clients.beans.Schema getOtherSideSchema()This method returns the otherSideSchema set by the developer at dev-time
Supported API: true. -
setFrame
This is the public setter used to set the Frame that started this bean.
Supported API: true. -
getFrame
This is the public getter used to get the Frame that started this bean.
Supported API: true. -
setOtherSideAttributes
This is the public setter used to set the otherSideAttributes that are displayed in the multilist.
Supported API: true. -
getOtherSideAttributes
This is the public getter used to get the otherSideAttributes that are displayed in the multilist.
Supported API: true. -
setLabels
This sets the labels that will be used as the column headers for the multilist.
Supported API: true.- Throws:
PropertyVetoException
-
getLabels
This gets the labels that are used as the column headers for the multilist.
Supported API: true. -
getSaveUpdatesOnly
public boolean getSaveUpdatesOnly()This is the public getter that returns the boolean value of the saveUpdatesOnly flag.
Supported API: true. -
setSaveUpdatesOnly
public void setSaveUpdatesOnly(boolean flagValue) This sets the boolean value of the saveUpdatesOnly flag. The flag is used when the save() method is invoked and determines whether or not all links are validated and then persisted. When set to true, only those links that have been added are validated and persisted. When set to false, all links are validated and persisted, even though a change may not of occurred. The default value for the flag is false.
Supported API: true. -
setRelativeColumnWidths
This method is used to set the widths of the of the multilist relative to 1 which represents the smallest column width. A width of 2 will create a width twice the size of the column of width 1.
Supported API: true.- Throws:
PropertyVetoException
-
getRelativeColumnWidths
This method is used to get the widths of the of the multilist relative to 1 which represents the smallest column width. A width of 2 will create a width twice the size of the column of width 1.
Supported API: true. -
refresh
This method redraws the column widths after the multilist has been displayed.
Supported API: true.- Throws:
PropertyVetoException
-
setForeground
This sets the foreground of the panel.
Supported API: true.- Overrides:
setForegroundin classComponent
-
getForeground
This gets the foreground of the panel.
Supported API: true.- Overrides:
getForegroundin classComponent
-
setBackground
This sets the background of the panel.
Supported API: true.- Overrides:
setBackgroundin classComponent
-
getBackground
This gets the background of the panel.
Supported API: true.- Overrides:
getBackgroundin classComponent
-
setFont
This sets the font of the panel.
Supported API: true. -
getFont
This gets the font of the panel.
Supported API: true.- Specified by:
getFontin interfaceMenuContainer- Overrides:
getFontin classComponent
-
save
This is used to save the links the toPersistablepassed in. It persists the created & updated links, and deletes the removed links.
Supported API: true.- Throws:
WTExceptionWTIntrospectionException
-
createUI
This adds and removes fields based on the mode
Supported API: true.- Throws:
WTPropertyVetoException
-
removeEditButtons
protected void removeEditButtons()This removes the buttons that are associated with the edit mode
Supported API: true. -
addEditButtons
protected void addEditButtons()This adds the buttons that are associated with the edit mode
Supported API: true. -
createEditButtons
protected void createEditButtons()This creates the buttons used in edit mode
Supported API: true. -
resetHashtables
protected void resetHashtables()This resets the hashtables
Supported API: true. -
updateLinks
This updates the links with the results of the user's actions
Supported API: true.- Throws:
WTIntrospectionExceptionWTException
-
resetLabels
This resets the column headers with the context of the labels property and the multiListLinkAttributes property.
Supported API: true.- Throws:
PropertyVetoException
-
defaultColumnWidths
This initialized the column widths of the multilist to equal widths with a hidden last column.
Supported API: true.- Throws:
PropertyVetoException
-
populate
protected void populate()This retrieves the links on the object and displays them in the multilist.
Supported API: true. -
addToTable
protected void addToTable(BinaryLink link) throws InvalidRoleException, WTException, InvocationTargetException, IllegalAccessException, NoSuchMethodException this adds a new object to the table
Supported API: true. -
updateTableLinkValues
protected void updateTableLinkValues(int row, BinaryLink link) throws InvalidRoleException, WTException, InvocationTargetException, IllegalAccessException, NoSuchMethodException Update the string values displayed in the MultiList.
Supported API: true. -
addSelectedObject
protected void addSelectedObject(Persistable added_object) throws WTIntrospectionException, IllegalAccessException, NoSuchMethodException, InstantiationException, ClassNotFoundException, InvocationTargetException, WTException This creates a new link to an object selected by the user and adds it to the multilist.
Supported API: true. -
removeSelectedObject
this removes the link that the user has selected from the links hashtable and adds it to the removedLinks hashtable if it is persistent so that it can be removed from the db.
Supported API: true.- Throws:
WTExceptionInvalidRoleException
-
launchQueryDialog
This launches a dialog that will allow the user to select an object and add it to the multilist, create a new link to it, and edit the link.
Supported API: true.- Throws:
WTException
-
launchChooserDialog
This launches a dialog that will allow the user to select an object and add it to the multilist, create a new link to it, and edit the link.
Supported API: true.- Throws:
WTException
-
getSelectedObjects
This returns the objects that the user has currently selected in the multilist. If no objects are selected, null is returned. This returns the other-side Persistable object, not the link.
Supported API: true.- Specified by:
getSelectedObjectsin interfaceItemSelectable
-
getSelectedObject
This returns the object that the user has currently selected in the multilist.
Supported API: true.- Throws:
InvalidRoleExceptionWTException
-
getSelectedLink
This returns the link represented by the row that the user has selected in the multilist.
Supported API: true. -
viewSelectedObject
protected void viewSelectedObject()This will use the TaskDelegate for the selected object to launch a view of that object.
Supported API: true. -
getHelpContext
This returns the helpContext being used for online help.
Supported API: true. -
getHelpSystem
This returns the helpSystem being used for online help.
Supported API: true. -
addHelpListener
MethodaddHelpListeneradds the given listener to be notified ofPropertyChangeEventsin the help system. Tool descriptionPropertyChangeEventsare generated when the user mouses over the buttons and list ofContentItemsin this panel. The given listener will be notified of those events.
Supported API: true.- Parameters:
pcl- ThePropertyChangeListenerto be notified ofPropertyChangeEventsgenerated by the help system.- See Also:
-
removeHelpListener
MethodremoveHelpListenerremoves a listener which was being notified ofPropertyChangeEventsin the help system. If the given listener is not currently a listener, no changes are made.
Supported API: true.- Parameters:
pcl- thePropertyChangeListenerto be removed as a listener of events generated by the help system of this panel.- See Also:
-
setEnabled
public void setEnabled(boolean b) This sets the panel and it's components to enabled or disabled based on the passed in boolean.
Supported API: true.- Overrides:
setEnabledin classComponent
-
setFieldState
This sets the fields to either editable or enabled depending on the boolean and the type of component. It recurses through all of the fields in the passed container.
Supported API: true. -
requestFocus
public void requestFocus()Calling requestFocus() on this panel will set the focus to the first field in the panel which is the multilist.
Supported API: true.- Overrides:
requestFocusin classComponent
-