com.BobCo.snapins
Class LogicalDiskSnapIn

java.lang.Object
  extended bycom.BobCo.snapins.LogicalDiskSnapIn
All Implemented Interfaces:
java.lang.Runnable, com.tivoli.twg.cim.TWGCIMPropertiesBrowserInterface

public class LogicalDiskSnapIn
extends java.lang.Object
implements com.tivoli.twg.cim.TWGCIMPropertiesBrowserInterface, java.lang.Runnable

The LogicalDiskSnapIn class is a sample CIM property browser. It implements the TWGCIMPropertiesBrowserInterface and is registered to display instances of Win32_LogicalDisk.


Constructor Summary
LogicalDiskSnapIn()
          Constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener to the snap-in.
 com.tivoli.twg.cim.aCIMInstance getCIMInstance()
          Retrieve the CIM instance 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 getIconForCIMInstance(com.tivoli.twg.cim.aCIMInstance inst)
          This method is used to get an icon image to display for a CIM 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 run()
           
 void setCIMInstance(com.tivoli.twg.cim.aCIMClass newCIMClass, com.tivoli.twg.cim.aCIMInstance newCIMInstance)
          Set the CIM instance that the snap-in will 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicalDiskSnapIn

public LogicalDiskSnapIn()
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.TWGCIMPropertiesBrowserInterface

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.TWGCIMPropertiesBrowserInterface

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.TWGCIMPropertiesBrowserInterface

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.TWGCIMPropertiesBrowserInterface

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.TWGCIMPropertiesBrowserInterface

getCIMInstance

public com.tivoli.twg.cim.aCIMInstance getCIMInstance()
Retrieve the CIM instance object that is being displayed by the snap-in.

Specified by:
getCIMInstance in interface com.tivoli.twg.cim.TWGCIMPropertiesBrowserInterface

setCIMInstance

public void setCIMInstance(com.tivoli.twg.cim.aCIMClass newCIMClass,
                           com.tivoli.twg.cim.aCIMInstance newCIMInstance)
Set the CIM instance that the snap-in will display. Calling this method will start the process of getting the instance data and populating the display.

Specified by:
setCIMInstance in interface com.tivoli.twg.cim.TWGCIMPropertiesBrowserInterface

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.TWGCIMPropertiesBrowserInterface

getWindowAttributes

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

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

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.TWGCIMPropertiesBrowserInterface

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.TWGCIMPropertiesBrowserInterface

getIconForCIMInstance

public javax.swing.ImageIcon getIconForCIMInstance(com.tivoli.twg.cim.aCIMInstance inst)
This method is used to get an icon image to display for a CIM instance.

Specified by:
getIconForCIMInstance in interface com.tivoli.twg.cim.TWGCIMPropertiesBrowserInterface

run

public void run()
Specified by:
run in interface java.lang.Runnable