3269 add class name column to DebugObjectsTab
authorStephen Talley <stephen.talley@sun.com>
Fri, 05 Sep 2008 13:49:33 -0400
changeset 47 dd9207c7e85a
parent 46 ae7bc9c4b658
child 48 b7a041dd7d98
3269 add class name column to DebugObjectsTab
usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/DebugObjectsTab.java
usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/resources/Resources.properties
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/DebugObjectsTab.java	Fri Sep 05 13:47:47 2008 -0400
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/DebugObjectsTab.java	Fri Sep 05 13:49:33 2008 -0400
@@ -39,6 +39,44 @@
     implements SwingTabControl {
 
     //
+    // Inner classes
+    //
+
+    public static class ClassPropInfo extends AbstractPropInfo<String> {
+	//
+	// Static data
+	//
+
+	private static final String LABEL =
+	    Finder.getString("property.label.class");
+
+	private static final String DESCRIPTION =
+	    Finder.getString("property.description.class");
+
+	/**
+	 * Available instance to mitigate object creation
+	 */
+	public static final ClassPropInfo instance = new ClassPropInfo();
+
+	//
+	// Constructors
+	//
+
+	public ClassPropInfo() {
+	    super(LABEL, DESCRIPTION, true, false);
+	}
+
+	//
+	// ManagedObjectPropInfo methods
+	//
+
+	@Override
+	public String getValue(ManagedObject o) {
+	    return o.getClass().getName();
+	}
+    }
+
+    //
     // Static data
     //
 
@@ -54,6 +92,7 @@
 	new ManagedObjectPropInfo[] {
 	    NamePropInfo.instance,
 	    new ReflectionPropInfo(ID_LABEL, ID_DESCRIPTION, true, false, "id"),
+	    ClassPropInfo.instance,
 	};
 
     //
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/resources/Resources.properties	Fri Sep 05 13:47:47 2008 -0400
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/resources/Resources.properties	Fri Sep 05 13:49:33 2008 -0400
@@ -26,6 +26,8 @@
 
 property.label.id = Identifier
 property.description.id = The identifier of this object
+property.label.class = Class
+property.description.class = The class of this object
 panel.activity.label = Activity
 panel.settings.label = Settings
 panel.status.label = Status