wt.clients.beans
Class PrincipalSelectionBrowser

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bywt.clients.beans.PrincipalSelectionBrowser
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class PrincipalSelectionBrowser
extends Panel

The PrincipalSelectionBrowser bean (wt.clients.beans.PrincipalSelectionBrowser) has a dev time component and a runtime component. At dev time, you can drag this component from the component library in Visual Cafe and drop it onto a container. The properties can then be edited by using Visual Cafe's Property Editor. At runtime, this class allows you to select a WTPrincipal (WTUser or WTGroup), an Actor, or a Role. This is done by selecting one of the tabs on the left (Groups, Users, Actors or Roles) and then selecting the desired participant/participants from the list displayed on the selected tab. This bean contains a tab panel containing lists of the available participants, an "Add" button, an "Add All" button, a "Remove" button, a "Remove All" button, and a list to display all the selected participants. The following is a small example of using the PrincipalSelectionBrowser bean:

   import java.awt.*;
   import java.beans.PropertyChangeListener;
   import java.beans.PropertyChangeEvent;
   import java.util.Vector;

   import wt.clients.beans.PrincipalSelectionBrowser;
   import wt.help.*;

   import symantec.itools.awt.StatusBar;

   public class PSBTestFrame extends Frame
   {
     public PSBTestFrame()
     {
        // This code is automatically generated by Visual Cafe when you add
        // components to the visual environment. It instantiates and initializes
        // the components. To modify the code, only use code syntax that matches
        // what Visual Cafe can generate, or Visual Cafe may be unable to back
        // parse your Java file into its visual environment.
        //{{INIT_CONTROLS
        GridBagLayout gridBagLayout;
        gridBagLayout = new GridBagLayout();
        setLayout(gridBagLayout);
        setVisible(false);
        setSize(773,322);
        setBackground(new Color(12632256));
        psb = new wt.clients.beans.PrincipalSelectionBrowser();
        psb.setBounds(0,0,773,259);
        psb.setBackground(new Color(12632256));
        GridBagConstraints gbc;
        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)getLayout()).setConstraints(psb, gbc);
        add(psb);
        TestButton = new java.awt.Button();
        TestButton.setLabel("Test Button");
        TestButton.setBounds(687,259,76,23);
        TestButton.setBackground(new Color(12632256));
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 1;
        gbc.weightx = 1.0;
        gbc.anchor = GridBagConstraints.EAST;
        gbc.fill = GridBagConstraints.NONE;
        gbc.insets = new Insets(0,0,0,10);
        ((GridBagLayout)getLayout()).setConstraints(TestButton, gbc);
        add(TestButton);
        statusBar = new symantec.itools.awt.StatusBar();
        try {
           statusBar.setBevelStyle(symantec.itools.awt.StatusBar.BEVEL_LOWERED);
        }
        catch(java.beans.PropertyVetoException e) { }
        statusBar.setBounds(2,282,769,40);
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 2;
        gbc.weightx = 1.0;
        gbc.fill = GridBagConstraints.HORIZONTAL;
        gbc.insets = new Insets(0,2,0,2);
        ((GridBagLayout)getLayout()).setConstraints(statusBar, gbc);
        add(statusBar);
        setTitle("PSB Test Frame");
        //}}
        
        psb.setMultipleSelection(true);
        psb.setGroupSelectionTabVisible(true);
        psb.setUserSelectionTabVisible(true);
        psb.setActorSelectionTabVisible(true);
        psb.setRoleSelectionTabVisible(true);
        
        HelpListener helpListener = new HelpListener();
        psb.addHelpListener(helpListener);*
        //{{INIT_MENU
        //}}

        //{{REGISTER_LISTENERS
        SymWindow aSymWindow = new SymWindow();
        this.addWindowListener(aSymWindow);
        SymAction lSymAction = new SymAction();
        TestButton.addActionListener(lSymAction);
        //}}
     }

     public PSBTestFrame(String title)
     {
        this();
        setTitle(title);
     }

       public void setVisible(boolean b)
     {
        if(b)
        {
           setLocation(50, 50);
        }
        super.setVisible(b);
     }

     static public void main(String args[])
     {
        (new PSBTestFrame()).setVisible(true);
     }
     
     public void addNotify()
     {
         Dimension d = getSize();
         
        super.addNotify();

        if (fComponentsAdjusted)
           return;

        setSize(insets().left + insets().right + d.width, insets().top + insets().bottom + d.height);
        Component components[] = getComponents();
        for (int i = 0; i < components.length; i++)
        {
           Point p = components[i].getLocation();
           p.translate(insets().left, insets().top);
           components[i].setLocation(p);
        }
        fComponentsAdjusted = true;
     }

     boolean fComponentsAdjusted = false;

     //{{DECLARE_CONTROLS
     wt.clients.beans.PrincipalSelectionBrowser psb;
     java.awt.Button TestButton;
     symantec.itools.awt.StatusBar statusBar;
     //}}

     //{{DECLARE_MENUS
     //}}

     class SymWindow extends java.awt.event.WindowAdapter
     {
        public void windowClosing(java.awt.event.WindowEvent event)
        {
           Object object = event.getSource();
           if (object == PSBTestFrame.this)
              Frame1_WindowClosing(event);
        }
     }
     
     void Frame1_WindowClosing(java.awt.event.WindowEvent event)
     {
        dispose();          // free the system resources
        System.exit(0);     // close the application    
     }
     
     class HelpListener implements PropertyChangeListener
     {
         public void propertyChange(PropertyChangeEvent pce)
         {
               try 
               {
                   if (pce.getPropertyName().equals (HelpContext.TOOL_DESCRIPTION))   
                   {
                       try   
                       {
                           statusBar.setStatusText((String) pce.getNewValue());
                       }
       
                       catch (Exception e)   
                       {
                           e.printStackTrace();
                       }
                   }  
               }
               
               catch (Exception e) {}
         }
     }

     class SymAction implements java.awt.event.ActionListener
     {
        public void actionPerformed(java.awt.event.ActionEvent event)
        {
           Object object = event.getSource();
           if (object == TestButton)
              TestButton_ActionPerformed(event);
        }
     }

     void TestButton_ActionPerformed(java.awt.event.ActionEvent event)
     {
        Vector v =  new Vector();
        
        v = psb.getSelectedParticipants();
        System.out.println(v);
     }
   }
 


Supported API: true

See Also:
Serialized Form

Nested Class Summary
(package private)  class PrincipalSelectionBrowser.SymAction
           
(package private)  class PrincipalSelectionBrowser.SymItem
           
(package private)  class PrincipalSelectionBrowser.SymPropertyChange
           
 
Nested classes inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  List actorList
           
(package private)  symantec.itools.awt.BorderPanel actorSelectionTab
           
private  String actorSelectionTabLabel
           
private  boolean actorSelectionTabVisible
           
private static int actorTabIndex
           
(package private)  symantec.itools.awt.LabelButton addAllButton
           
(package private)  symantec.itools.awt.LabelButton addButton
           
private  boolean allowRemoveAll
           
(package private)  Panel buttonsPanel
           
private  WTContainerRef containerRef
           
private  ThreadGroup contextGroup
           
private  Font crossLocaleFont
           
private  boolean deletedPrincipalsVisible
           
(package private)  FindGroupPanel findGroupPanel
           
(package private)  FindOrgPanel findOrgPanel
           
(package private)  FindUserPanel findUserPanel
           
(package private)  symantec.itools.awt.BorderPanel groupSelectionTab
           
private  String groupSelectionTabLabel
           
private  boolean groupSelectionTabVisible
           
private static int groupTabIndex
           
(package private)  HelpContext helpContext
           
(package private)  HelpSystem helpSystem
           
private  LayoutManager layout
           
private  boolean layoutInitialized
           
private  boolean listsPopulated
           
private  boolean multipleSelection
           
private  Hashtable objectHolder
           
(package private)  symantec.itools.awt.BorderPanel orgSelectionTab
           
private  String orgSelectionTabLabel
           
private  boolean orgSelectionTabVisible
           
private static int orgTabIndex
           
(package private)  symantec.itools.awt.TabPanel principalSelectionTabPanel
           
private  Vector propertyChangeListeners
           
private  ReferenceDelegateFactory referenceDelegateFactory
           
(package private)  symantec.itools.awt.LabelButton removeAllButton
           
(package private)  symantec.itools.awt.LabelButton removeButton
           
private static String RESOURCE_BUNDLE
           
private  boolean returnPrincipalReferences
           
(package private)  List roleList
           
(package private)  symantec.itools.awt.BorderPanel roleSelectionTab
           
private  String roleSelectionTabLabel
           
private  boolean roleSelectionTabVisible
           
private static int roleTabIndex
           
private  String securedInfoKey
           
(package private)  WTMultiList selectedParticipantsList
           
(package private)  symantec.itools.awt.BorderPanel selectedParticipantsPanel
           
private  boolean showSelectedParticipants
           
(package private)  symantec.itools.awt.BorderPanel userSelectionTab
           
private  String userSelectionTabLabel
           
private  boolean userSelectionTabVisible
           
private static int userTabIndex
           
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PrincipalSelectionBrowser()
          This is the no arg constructor that creates the PrincipalSelectionBrowser with a TabPanel containing the various selection tabs (Groups, Users, Actors and Roles), an "Add" button, an "Add All" button, a "Remove" button, a "Remove All" button, and a list of the selected participants.
 
Method Summary
private  void actorList_DblClicked(ActionEvent event)
           
private  void addAllButton_ActionPerformed(ActionEvent event)
           
private  void addButton_ActionPerformed(ActionEvent event)
           
 void addHelpListener(PropertyChangeListener pcl)
          Method addHelpListener adds the given listener to be notified of PropertyChangeEvents in the help system.
 void addPropertyChangeListener(PropertyChangeListener pcl)
          This method adds a PropertyChangeListener to the component.
private  void addToObjectHolder(String key, Object value)
           
private  void addToSelectedParticipantsList(String displayName)
           
private  void addToSelectedParticipantsList(String key, Object value)
           
private  void addToSelectedParticipantsList(WTGroup participant_object)
           
private  void addToSelectedParticipantsList(WTUser participant_object)
           
private  boolean allowRemove(int row)
           
 void clearSelectedParticipants()
          Remove all entries from the selected Participantlist.
private  void findGroupPanel_DblClicked(PropertyChangeEvent event)
           
private  void findOrgPanel_DblClicked(PropertyChangeEvent event)
           
private  void findUserPanel_DblClicked(PropertyChangeEvent event)
           
private  void firePropertyChangeEvent(String command, Object oldValue, Object newValue)
           
 WTContainerRef getContainerRef()
          This method returns the current value for the component's container reference, or null if the component is not currently associated with a container context.
 HelpContext getHelpContext()
          This is the public getter for the HelpContext being used for the online help.
 HelpSystem getHelpSystem()
          This is the public getter for the HelpSystem being used for the online help.
 LayoutManager getLayout()
          This method returns the component's internal LayoutManager.
private  ReferenceDelegateFactory getReferenceDelegateFactory()
          Returns the ReferenceDelegateFactory

Supported API: false
 Vector getSelectedParticipants()
          This method returns a vector of all the selected participants if multiple selection is enabled.
private  void initHelpSystem()
           
private  void initializeHelp()
           
 boolean isActorSelectionTabVisible()
          This method returns the state of the visiblity flag for this tab.
 boolean isDeletedPrincipalsVisible()
          This method returns the state of the deletedPrincipalsVisible flag.
 boolean isGroupSelectionTabVisible()
          This method returns the state of the visiblity flag for this tab.
 boolean isMultipleSelection()
          This method returns the state of the multipleSelection flag.
 boolean isOrgSelectionTabVisible()
          This method returns the state of the visiblity flag for this tab.
 boolean isRoleSelectionTabVisible()
          This method returns the state of the visiblity flag for this tab.
 boolean isUserSelectionTabVisible()
          This method returns the state of the visiblity flag for this tab.
private  void localize()
           
static void main(String[] args)
          The main method used for testing purposes.
private  void populateActorList()
           
private  void populateLists()
           
private  void populateRoleList()
           
 void populateRoles(String[] roles)
          This method populates the role list with the strings in the roles array.
private  void principalSelectionTabPanel_propertyChange(PropertyChangeEvent event)
           
private  void removeAllButton_ActionPerformed(ActionEvent event)
           
private  void removeButton_ActionPerformed(ActionEvent event)
           
 void removeHelpListener(PropertyChangeListener pcl)
          Method removeHelpListener removes a listener which was being notified of PropertyChangeEvents in the help system.
 void removePropertyChangeListener(PropertyChangeListener pcl)
          This method removes the desired PropertyChangeListener from the component.
private  void roleList_DblClicked(ActionEvent event)
           
private  void selectedParticipantsList_actionPerformed(ActionEvent event)
           
private  void selectedParticipantsList_itemStateChanged(ItemEvent event)
           
 void setActorSelectionTabVisible(boolean b)
          This method sets the visibility flag for the actor selection tab.
 void setContainerRef(WTContainerRef containerRef)
          This method sets a reference to a container that provides context for queries against users, groups, and organizations.
 void setDeletedPrincipalsVisible(boolean b)
          This method sets the deletedPrincipalsVisible flag.
 void setFont(Font newFont)
           
 void setGroupSelectionTabVisible(boolean b)
          This method sets the visibility flag for the group selection tab.
 void setLayout(LayoutManager lm)
          This method sets the layout for the PrincipalSelectionBrowser.
 void setMultipleSelection(boolean b)
          This method sets the multipleSelection flag.
 void setOrgSelectionTabVisible(boolean b)
          This method sets the visibility flag for the organization selection tab.
 void setPrincipalReferences(boolean b)
          This method sets the returnPrincipalReferences flag.
 void setRoleSelectionTabVisible(boolean b)
          This method sets the visibility flag for the role selection tab.
 void setSelectedLabel(String title)
          Set the label of the selected participants list

Supported API: true.
 void setSelectedParticipant(Object value)
          Initialize the list of selected items.
 void setSelectedParticipant(String key, Object value)
          Initialize the list of selected items with the key and value.
 void setShowSelectedParticipants(boolean b)
          This method sets the showSelectedParticipants flag.
 void setUserSelectionTabVisible(boolean b)
          This method sets the visibility flag for the user selection tab.
 void setViewMode(boolean mode)
          Set the mode to view only by by removing the principal selection tab and buttons pane.
private  void updateButtonEnable(int currentTab)
           
private  void updateTabPanel()
           
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE_BUNDLE

private static final String RESOURCE_BUNDLE
See Also:
Constant Field Values

securedInfoKey

private String securedInfoKey

groupTabIndex

private static int groupTabIndex

userTabIndex

private static int userTabIndex

orgTabIndex

private static int orgTabIndex

actorTabIndex

private static int actorTabIndex

roleTabIndex

private static int roleTabIndex

groupSelectionTabVisible

private boolean groupSelectionTabVisible

userSelectionTabVisible

private boolean userSelectionTabVisible

orgSelectionTabVisible

private boolean orgSelectionTabVisible

actorSelectionTabVisible

private boolean actorSelectionTabVisible

roleSelectionTabVisible

private boolean roleSelectionTabVisible

layoutInitialized

private boolean layoutInitialized

layout

private LayoutManager layout

multipleSelection

private boolean multipleSelection

showSelectedParticipants

private boolean showSelectedParticipants

allowRemoveAll

private boolean allowRemoveAll

returnPrincipalReferences

private boolean returnPrincipalReferences

deletedPrincipalsVisible

private boolean deletedPrincipalsVisible

groupSelectionTabLabel

private String groupSelectionTabLabel

userSelectionTabLabel

private String userSelectionTabLabel

orgSelectionTabLabel

private String orgSelectionTabLabel

actorSelectionTabLabel

private String actorSelectionTabLabel

roleSelectionTabLabel

private String roleSelectionTabLabel

objectHolder

private Hashtable objectHolder

containerRef

private WTContainerRef containerRef

contextGroup

private ThreadGroup contextGroup

listsPopulated

private boolean listsPopulated

helpSystem

HelpSystem helpSystem

helpContext

HelpContext helpContext

propertyChangeListeners

private Vector propertyChangeListeners

referenceDelegateFactory

private ReferenceDelegateFactory referenceDelegateFactory

crossLocaleFont

private Font crossLocaleFont

principalSelectionTabPanel

symantec.itools.awt.TabPanel principalSelectionTabPanel

groupSelectionTab

symantec.itools.awt.BorderPanel groupSelectionTab

findGroupPanel

FindGroupPanel findGroupPanel

userSelectionTab

symantec.itools.awt.BorderPanel userSelectionTab

findUserPanel

FindUserPanel findUserPanel

orgSelectionTab

symantec.itools.awt.BorderPanel orgSelectionTab

findOrgPanel

FindOrgPanel findOrgPanel

actorSelectionTab

symantec.itools.awt.BorderPanel actorSelectionTab

actorList

List actorList

roleSelectionTab

symantec.itools.awt.BorderPanel roleSelectionTab

roleList

List roleList

buttonsPanel

Panel buttonsPanel

addButton

symantec.itools.awt.LabelButton addButton

addAllButton

symantec.itools.awt.LabelButton addAllButton

removeButton

symantec.itools.awt.LabelButton removeButton

removeAllButton

symantec.itools.awt.LabelButton removeAllButton

selectedParticipantsPanel

symantec.itools.awt.BorderPanel selectedParticipantsPanel

selectedParticipantsList

WTMultiList selectedParticipantsList
Constructor Detail

PrincipalSelectionBrowser

public PrincipalSelectionBrowser()
This is the no arg constructor that creates the PrincipalSelectionBrowser with a TabPanel containing the various selection tabs (Groups, Users, Actors and Roles), an "Add" button, an "Add All" button, a "Remove" button, a "Remove All" button, and a list of the selected participants.

Supported API: true.

Method Detail

setLayout

public void setLayout(LayoutManager lm)
This method sets the layout for the PrincipalSelectionBrowser. Once the layout has been initialized it cannot be changed. It effectively avoids the component's internal layout from being changed.

Supported API: true.

Parameters:
lm - The LayoutManager the component will have set.
See Also:
LayoutManager

setSelectedLabel

public void setSelectedLabel(String title)
Set the label of the selected participants list

Supported API: true.

Parameters:
title - the String label of the selected list.

getLayout

public LayoutManager getLayout()
This method returns the component's internal LayoutManager.

Supported API: true.

Returns:
The LayoutManager the component is currently utilizing.
See Also:
LayoutManager

setMultipleSelection

public void setMultipleSelection(boolean b)
This method sets the multipleSelection flag. If the flag is set to true the "Add", "Add All", "Remove" and "Remove All" buttons will be displayed. The "Participants" list will also be displayed. The user will be able to select multiple participants from the selection panels. If the flag is set to false, only the selection panels will be displayed, and only a single participant can be selected.

Supported API: true.

Parameters:
b - The boolean flag that determines whether or not multiple participants can be selected.

isMultipleSelection

public boolean isMultipleSelection()
This method returns the state of the multipleSelection flag.

Supported API: true.

Returns:
The boolean state of the multipleSelection flag.

setPrincipalReferences

public void setPrincipalReferences(boolean b)
This method sets the returnPrincipalReferences flag. If the flag is set to true the getSelectedParticipants method will return a Vector containing WTPrincipalReference objects for principal participants. If the flag is set to false the getSelectedParticipants method will return a Vector containing WTPrincipal objects for principal participants.

Supported API: false.

Parameters:
b - The boolean flag that determines whether principal particpants are returned as WTPrincipal or WTPrincipalReference.

setShowSelectedParticipants

public void setShowSelectedParticipants(boolean b)
This method sets the showSelectedParticipants flag. If the flag is set to true the "Add", "Add All", "Remove" and "Remove All" buttons will be displayed. The "Participants" list will also be displayed. The user will be able to select multiple praticipants from the selection panels. If the flag is set to false, only the selection panels will be displayed, and only a single participant can be selected.

Supported API: false.

Parameters:
b - The boolean flag that determines whether or not multiple participants can be selected.

setDeletedPrincipalsVisible

public void setDeletedPrincipalsVisible(boolean b)
This method sets the deletedPrincipalsVisible flag. If the flag is set to true principals that have been previously deleted from the system will still be displayed. If the flag is set to false, previously deleted principals will not be diaplayed.

Supported API: true.

Parameters:
b - The boolean flag that determines whether deleted principals will be displayed.

isDeletedPrincipalsVisible

public boolean isDeletedPrincipalsVisible()
This method returns the state of the deletedPrincipalsVisible flag.

Supported API: true.

Returns:
The boolean state of the deletedPrincipalsVisible flag.

setGroupSelectionTabVisible

public void setGroupSelectionTabVisible(boolean b)
This method sets the visibility flag for the group selection tab.

Supported API: true.

Parameters:
b - The boolean flag for the visibility of this tab.

isGroupSelectionTabVisible

public boolean isGroupSelectionTabVisible()
This method returns the state of the visiblity flag for this tab.

Supported API: true.

Returns:
The boolean value of the tab's visibility flag.

setUserSelectionTabVisible

public void setUserSelectionTabVisible(boolean b)
This method sets the visibility flag for the user selection tab.

Supported API: true.

Parameters:
b - The boolean flag for the visibility of this tab.

isUserSelectionTabVisible

public boolean isUserSelectionTabVisible()
This method returns the state of the visiblity flag for this tab.

Supported API: true.

Returns:
The boolean value of the tab's visibility flag.

setOrgSelectionTabVisible

public void setOrgSelectionTabVisible(boolean b)
This method sets the visibility flag for the organization selection tab.

Supported API: true.

Parameters:
b - The boolean flag for the visibility of this tab.

isOrgSelectionTabVisible

public boolean isOrgSelectionTabVisible()
This method returns the state of the visiblity flag for this tab.

Supported API: true.

Returns:
The boolean value of the tab's visibility flag.

setActorSelectionTabVisible

public void setActorSelectionTabVisible(boolean b)
This method sets the visibility flag for the actor selection tab.

Supported API: true.

Parameters:
b - The boolean flag for the visibility of this tab.

isActorSelectionTabVisible

public boolean isActorSelectionTabVisible()
This method returns the state of the visiblity flag for this tab.

Supported API: true.

Returns:
The boolean value of the tab's visibility flag.

setRoleSelectionTabVisible

public void setRoleSelectionTabVisible(boolean b)
This method sets the visibility flag for the role selection tab.

Supported API: true.

Parameters:
b - The boolean flag for the visibility of this tab.

isRoleSelectionTabVisible

public boolean isRoleSelectionTabVisible()
This method returns the state of the visiblity flag for this tab.

Supported API: true.

Returns:
The boolean value of the tab's visibility flag.

setContainerRef

public void setContainerRef(WTContainerRef containerRef)
                     throws WTException
This method sets a reference to a container that provides context for queries against users, groups, and organizations.

Supported API: true.

Parameters:
containerRef - The container reference
Throws:
WTException
See Also:
WTContainerRef

getContainerRef

public WTContainerRef getContainerRef()
This method returns the current value for the component's container reference, or null if the component is not currently associated with a container context.

Supported API: true.

Returns:
The current container reference
See Also:
WTContainerRef

getSelectedParticipants

public Vector getSelectedParticipants()
This method returns a vector of all the selected participants if multiple selection is enabled. If multiple selection is disabled, the method returns the currently selected participant from the currently selected selection tab.

Supported API: true.

Returns:
A Vector of the selected participants/participant.
See Also:
Vector

getHelpSystem

public HelpSystem getHelpSystem()
This is the public getter for the HelpSystem being used for the online help.

Supported API: true.

Returns:
The HelpSystem for the bean
See Also:
HelpSystem

getHelpContext

public HelpContext getHelpContext()
This is the public getter for the HelpContext being used for the online help.

Supported API: true.

Returns:
The HelpContext for the bean.
See Also:
HelpContext

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

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener pcl)
This method adds a PropertyChangeListener to the component. The added listener will recieve a PropertyChangeEvent when a principal is selected in non multipleSelection mode.

Supported API: true.

Parameters:
pcl - The PropertyChangeListener
See Also:
PropertyChangeListener, PropertyChangeEvent

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener pcl)
This method removes the desired PropertyChangeListener from the component.

Supported API: true.

Parameters:
pcl - The PropertyChangeListener
See Also:
PropertyChangeListener, PropertyChangeEvent

populateRoles

public void populateRoles(String[] roles)
This method populates the role list with the strings in the roles array. By default the roles list is popluated with roles defined in the Role enumerated type. If this method is used to set the role list, the getSelectedParticipants method will return the role strings rather than Role objects.

Supported API: false.

Parameters:
roles - The Vector of Role Strings to populate the role list with.

setSelectedParticipant

public void setSelectedParticipant(String key,
                                   Object value)
Initialize the list of selected items with the key and value.

Supported API: true.

Parameters:
key - the String to be displayed
value - the selected Object

setSelectedParticipant

public void setSelectedParticipant(Object value)
Initialize the list of selected items. If the value is a WTGroup or reference to a WTGroup, the display key will be the name. If the value is a WTUser or a reference to a WTUser, the display key will be the name and full name. If the value is a Role, the display key is the getDisplay() value. Any other object type will display value.toString().

Supported API: true.

Parameters:
value - the selected Object

clearSelectedParticipants

public void clearSelectedParticipants()
Remove all entries from the selected Participantlist.

Supported API: true.


setViewMode

public void setViewMode(boolean mode)
Set the mode to view only by by removing the principal selection tab and buttons pane. By default update mode is assumed.

Supported API: false.

Parameters:
mode - true for view only, false otherwise.

updateTabPanel

private void updateTabPanel()

setFont

public void setFont(Font newFont)

localize

private void localize()

allowRemove

private boolean allowRemove(int row)

populateActorList

private void populateActorList()
                        throws Exception
Throws:
Exception

populateRoleList

private void populateRoleList()
                       throws Exception
Throws:
Exception

addToObjectHolder

private void addToObjectHolder(String key,
                               Object value)

principalSelectionTabPanel_propertyChange

private void principalSelectionTabPanel_propertyChange(PropertyChangeEvent event)

updateButtonEnable

private void updateButtonEnable(int currentTab)

addButton_ActionPerformed

private void addButton_ActionPerformed(ActionEvent event)

addAllButton_ActionPerformed

private void addAllButton_ActionPerformed(ActionEvent event)

getReferenceDelegateFactory

private ReferenceDelegateFactory getReferenceDelegateFactory()
                                                      throws WTException
Returns the ReferenceDelegateFactory

Supported API: false

Returns:
the Reference Delegate Factory.
Throws:
WTException - if an error occurs in obtaining the factory.

addToSelectedParticipantsList

private void addToSelectedParticipantsList(WTGroup participant_object)

addToSelectedParticipantsList

private void addToSelectedParticipantsList(WTUser participant_object)

addToSelectedParticipantsList

private void addToSelectedParticipantsList(String displayName)

addToSelectedParticipantsList

private void addToSelectedParticipantsList(String key,
                                           Object value)

removeButton_ActionPerformed

private void removeButton_ActionPerformed(ActionEvent event)

selectedParticipantsList_itemStateChanged

private void selectedParticipantsList_itemStateChanged(ItemEvent event)

removeAllButton_ActionPerformed

private void removeAllButton_ActionPerformed(ActionEvent event)

populateLists

private void populateLists()

findUserPanel_DblClicked

private void findUserPanel_DblClicked(PropertyChangeEvent event)

findGroupPanel_DblClicked

private void findGroupPanel_DblClicked(PropertyChangeEvent event)

findOrgPanel_DblClicked

private void findOrgPanel_DblClicked(PropertyChangeEvent event)

actorList_DblClicked

private void actorList_DblClicked(ActionEvent event)

roleList_DblClicked

private void roleList_DblClicked(ActionEvent event)

selectedParticipantsList_actionPerformed

private void selectedParticipantsList_actionPerformed(ActionEvent event)

initializeHelp

private void initializeHelp()

initHelpSystem

private void initHelpSystem()

firePropertyChangeEvent

private void firePropertyChangeEvent(String command,
                                     Object oldValue,
                                     Object newValue)

main

public static void main(String[] args)
The main method used for testing purposes.