com.BobCo.snapins
Class ComponentIDSnapIn

java.lang.Object
  extended bycom.BobCo.snapins.ComponentIDSnapIn
All Implemented Interfaces:
java.lang.Runnable, com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

public class ComponentIDSnapIn
extends java.lang.Object
implements com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface, java.lang.Runnable

The ComponentIDSnapIn class is a sample DMI group browser. It implements the TWGDMIGroupBrowserInterface and is registered to display instances of "DMTF|ComponentID|*".


Constructor Summary
ComponentIDSnapIn()
          Constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener to the snap-in.
 void displayAttributes(com.tivoli.twg.dmi.DMIAttributeValue[] Attributes)
          This method is called by the ComponentAttributeResponse to fill in the display fields with the attribute values.
 javax.swing.JPanel getDisplayWindow()
          The getDisplayWindow method is used to return a JPanel that will be displayed by the caller.
 com.tivoli.twg.dmi.DMIGroup getDMIGroup()
          Retrieve the DMI group object that is being displayed by the snap-in.
 javax.swing.ImageIcon getIconForDMIGroup(com.tivoli.twg.dmi.DMIGroup group)
          This method is used to get an icon image to display for a DMI group.
 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 run()
          Background thread method to start DMI processing.
 void setDMIGroup(long new_moid, com.tivoli.twg.dmi.DMIGroup new_group, int new_id)
          Set the DMI group that the snap-in will display instance for.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentIDSnapIn

public ComponentIDSnapIn()
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.dmi.TWGDMIGroupBrowserInterface

getStatus

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

Specified by:
getStatus in interface com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

setStatus

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

Specified by:
setStatus in interface com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

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.dmi.TWGDMIGroupBrowserInterface

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.dmi.TWGDMIGroupBrowserInterface

getDMIGroup

public com.tivoli.twg.dmi.DMIGroup getDMIGroup()
Retrieve the DMI group object that is being displayed by the snap-in.

Specified by:
getDMIGroup in interface com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

setDMIGroup

public void setDMIGroup(long new_moid,
                        com.tivoli.twg.dmi.DMIGroup new_group,
                        int new_id)
Set the DMI group that the snap-in will display instance for. Calling this method will start the processing to get information from the DMI service layer for display.

Specified by:
setDMIGroup in interface com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

getIconForDMIGroup

public javax.swing.ImageIcon getIconForDMIGroup(com.tivoli.twg.dmi.DMIGroup group)
This method is used to get an icon image to display for a DMI group.

Specified by:
getIconForDMIGroup in interface com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

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.dmi.TWGDMIGroupBrowserInterface

getWindowAttributes

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

Specified by:
getWindowAttributes in interface com.tivoli.twg.dmi.TWGDMIGroupBrowserInterface

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.dmi.TWGDMIGroupBrowserInterface

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.dmi.TWGDMIGroupBrowserInterface

displayAttributes

public void displayAttributes(com.tivoli.twg.dmi.DMIAttributeValue[] Attributes)
This method is called by the ComponentAttributeResponse to fill in the display fields with the attribute values.


run

public void run()
Background thread method to start DMI processing.

Specified by:
run in interface java.lang.Runnable