com.BobCo.snapins
Class ProgramGroupSnapIn

java.lang.Object
  extended bycom.BobCo.snapins.ProgramGroupSnapIn
All Implemented Interfaces:
java.util.EventListener, com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface, com.tivoli.uif.core.UFEventListener, com.tivoli.twg.guilibs.UFTreeListViewListener

public class ProgramGroupSnapIn
extends java.lang.Object
implements com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface, com.tivoli.twg.guilibs.UFTreeListViewListener

The ProgramGroupSnapIn class is a sample CIM instance browser. It implements the TWGCIMInstanceBrowserInterface and is registered to display instances of Win32_ProgramGroup.


Field Summary
 
Fields inherited from interface com.tivoli.uif.core.UFEventListener
COPYRIGHT
 
Constructor Summary
ProgramGroupSnapIn()
          Constructor.
 
Method Summary
 void addProgramGroups(com.tivoli.twg.libs.Vect list)
          This internal method is used to add a list of program group instances to the tree.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener to the snap-in.
 com.tivoli.twg.cim.aCIMClass getCIMClass()
          Retrieve the CIM class object that is being displayed by the snap-in.
 javax.swing.JPanel getDisplayWindow()
          The getDisplayWindow method is used to return a JPanel that will be displayed by the caller.
 javax.swing.ImageIcon getIconForCIMClass(com.tivoli.twg.cim.aCIMClass c)
          This method is used to get an icon image to display for a CIM class.
 com.tivoli.twg.cim.aCIMInstance getSelectedCIMInstance()
          Retrieve the currently selected instance.
 int getStatus()
          Retrieve the current status of the snap-in.
 java.lang.String getStatusText()
          Retrieve a text string that describes the current status of the snap-in.
 com.tivoli.twg.guilibs.WindowAttributes getWindowAttributes()
          Retrieve the current window attributes
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a property change listener from the snap-in.
 void setCIMClass(com.tivoli.twg.cim.aCIMClass newCIMclass)
          Set the CIM class that the snap-in will display instance for.
 void setSelectedCIMInstance(com.tivoli.twg.cim.aCIMInstance newCIMinstance)
          This method is used to select a given CIM instance in the current display.
 void setStatus(int newStatus)
          Set the current status of the snap-in.
 void setStatusText(java.lang.String newStatusText)
          Set the current status text message for the snap-in.
 void setWindowAttributes(com.tivoli.twg.guilibs.WindowAttributes wa)
          This method is called by the parent of the snap-in to update the window attributes so that they match the rest of the current user console.
 void ufTreeListViewEvent(com.tivoli.twg.guilibs.UFTreeListViewEvent evt)
          This method is part of the UFTreeListViewListener interface and is used to handle selection events in the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramGroupSnapIn

public ProgramGroupSnapIn()
Constructor. The snap-in interface requires a default constructor that does not have any parameters.

Method Detail

getDisplayWindow

public javax.swing.JPanel getDisplayWindow()
The getDisplayWindow method is used to return a JPanel that will be displayed by the caller. The snap-in is responsible for the contents and appearance of the panel.

Specified by:
getDisplayWindow in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

getStatus

public int getStatus()
Retrieve the current status of the snap-in. Status values should be one of the constants defined in TWGCIMConstants.

Specified by:
getStatus in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

setStatus

public void setStatus(int newStatus)
Set the current status of the snap-in. Status values should be one of the constants defined in TWGCIMConstants. After changing the status, any property change listeners are notified of the change.

Specified by:
setStatus in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

getStatusText

public java.lang.String getStatusText()
Retrieve a text string that describes the current status of the snap-in. This string may be used by the parent of the snap-in to update the status area at the bottom of the window.

Specified by:
getStatusText in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

setStatusText

public void setStatusText(java.lang.String newStatusText)
Set the current status text message for the snap-in.

Specified by:
setStatusText in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

getCIMClass

public com.tivoli.twg.cim.aCIMClass getCIMClass()
Retrieve the CIM class object that is being displayed by the snap-in.

Specified by:
getCIMClass in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

setCIMClass

public void setCIMClass(com.tivoli.twg.cim.aCIMClass newCIMclass)
Set the CIM class that the snap-in will display instance for. Calling this method will start the CIM enumeration process to get the list of instances and populate the display window.

Specified by:
setCIMClass in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

getSelectedCIMInstance

public com.tivoli.twg.cim.aCIMInstance getSelectedCIMInstance()
Retrieve the currently selected instance.

Specified by:
getSelectedCIMInstance in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

setSelectedCIMInstance

public void setSelectedCIMInstance(com.tivoli.twg.cim.aCIMInstance newCIMinstance)
This method is used to select a given CIM instance in the current display.

Specified by:
setSelectedCIMInstance in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

getIconForCIMClass

public javax.swing.ImageIcon getIconForCIMClass(com.tivoli.twg.cim.aCIMClass c)
This method is used to get an icon image to display for a CIM class.

Specified by:
getIconForCIMClass in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

setWindowAttributes

public void setWindowAttributes(com.tivoli.twg.guilibs.WindowAttributes wa)
This method is called by the parent of the snap-in to update the window attributes so that they match the rest of the current user console.

Specified by:
setWindowAttributes in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

getWindowAttributes

public com.tivoli.twg.guilibs.WindowAttributes getWindowAttributes()
Retrieve the current window attributes

Specified by:
getWindowAttributes in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to the snap-in.

Specified by:
addPropertyChangeListener in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from the snap-in.

Specified by:
removePropertyChangeListener in interface com.tivoli.twg.cim.TWGCIMInstanceBrowserInterface

ufTreeListViewEvent

public void ufTreeListViewEvent(com.tivoli.twg.guilibs.UFTreeListViewEvent evt)
This method is part of the UFTreeListViewListener interface and is used to handle selection events in the tree.

Specified by:
ufTreeListViewEvent in interface com.tivoli.twg.guilibs.UFTreeListViewListener

addProgramGroups

public void addProgramGroups(com.tivoli.twg.libs.Vect list)
This internal method is used to add a list of program group instances to the tree.