--- a/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/swing/SwingErrorPanelDescriptor.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/swing/SwingErrorPanelDescriptor.java Wed Apr 15 12:47:03 2009 -0400
@@ -53,9 +53,7 @@
// Inner classes
//
- static class ErrorTab extends SwingControl<PanelDescriptor, JScrollPane>
- implements SwingTabControl {
-
+ static class ErrorTab extends SwingControl<PanelDescriptor, JScrollPane> {
//
// Instance data
//
@@ -76,7 +74,7 @@
}
//
- // SwingComponent methods
+ // SwingControl methods
//
@Override
@@ -98,11 +96,6 @@
return new JScrollPane(area);
}
-
- @Override
- public Component getTabComponent() {
- return getComponent();
- }
}
//
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/DebugObjectsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/DebugObjectsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -36,8 +36,7 @@
import org.opensolaris.os.vp.util.swing.CommonScrollPane;
public class DebugObjectsTab extends SwingControl<PanelDescriptor, JScrollPane>
- implements SwingTabControl {
-
+{
//
// Inner classes
//
@@ -110,25 +109,16 @@
//
public DebugObjectsTab(ClientContext context, ManagedObject pObject) {
- super(ID, NAME_OBJECTS, context);
+ super(ID, pObject.getName(), context);
this.pObject = pObject;
}
public DebugObjectsTab(PanelDescriptor descriptor) {
- super(ID, NAME_OBJECTS, descriptor);
+ super(ID, descriptor.getName(), descriptor);
this.pObject = descriptor;
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return getComponentCreate();
- }
-
- //
// SwingControl methods
//
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/HasTabComponent.java Wed Apr 15 12:47:03 2009 -0400
@@ -0,0 +1,33 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+package org.opensolaris.os.vp.panel.swing.control;
+
+import java.awt.Component;
+
+public interface HasTabComponent {
+ Component getTabComponent();
+}
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/SwingTabControl.java Tue Apr 14 17:43:25 2009 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-package org.opensolaris.os.vp.panel.swing.control;
-
-import java.awt.Component;
-import org.opensolaris.os.vp.util.misc.Finder;
-
-public interface SwingTabControl {
- //
- // Static data
- //
-
- String ID_ACTIVITY = "activity";
-
- String NAME_ACTIVITY = Finder.getString("panel.activity.label");
-
- String ID_OBJECTS = "objects";
-
- String NAME_OBJECTS = Finder.getString("panel.objects.label");
-
- String ID_SETTINGS = "settings";
-
- String NAME_SETTINGS = Finder.getString("panel.settings.label");
-
- String ID_STATUS = "status";
-
- String NAME_STATUS = Finder.getString("panel.status.label");
-
- //
- // SwingTabControl methods
- //
-
- Component getTabComponent();
-}
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/TabbedControl.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/TabbedControl.java Wed Apr 15 12:47:03 2009 -0400
@@ -34,7 +34,14 @@
import org.opensolaris.os.vp.util.misc.IconUtil;
import org.opensolaris.os.vp.util.swing.*;
-@SuppressWarnings({"serial"})
+/**
+ * The {@code TabbedControl} displays its child {@link Control}s as tabs within
+ * a {@code JTabbedPane}. Selection of the tabs is coordinated with navigation
+ * to the child {@link Control}s, and vice-versa. The {@code Component} for
+ * each tab is determined by the child's {@link HasTabComponent#getTabComponent}
+ * method, if it implements {@link HasTabComponent}, or its {@link
+ * SwingControl#getComponentCreate} method, if it extends {@link SwingControl}.
+ */
public class TabbedControl<P extends PanelDescriptor>
extends SwingControl<P, JTabbedPane> {
@@ -139,21 +146,23 @@
tabs.setOpaque(false);
// Add tabs *before* wrapping the model
- for (Control tab : children) {
+ for (Control child : children) {
Icon icon = null;
- if (tab instanceof HasIcon) {
- icon = ((HasIcon)tab).getIcon(ICON_HEIGHT_TAB);
+ if (child instanceof HasIcon) {
+ icon = ((HasIcon)child).getIcon(ICON_HEIGHT_TAB);
icon = IconUtil.ensureIconHeight(icon, ICON_HEIGHT_TAB);
}
- Component comp = tab instanceof SwingTabControl ?
- ((SwingTabControl)tab).getTabComponent() : new JLabel();
-
- if (tab instanceof SwingControl) {
- ((SwingControl)tab).getComponentCreate();
+ Component comp = null;
+ if (child instanceof SwingControl) {
+ comp = ((SwingControl)child).getComponentCreate();
}
- tabs.addTab(tab.getName(), icon, comp);
+ Component tabComp = child instanceof HasTabComponent ?
+ ((HasTabComponent)child).getTabComponent() :
+ (comp != null ? comp : new JLabel());
+
+ tabs.addTab(child.getName(), icon, tabComp);
}
tabSelModel = new NavTabSelectionModel();
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/resources/Resources.properties Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/resources/Resources.properties Wed Apr 15 12:47:03 2009 -0400
@@ -20,7 +20,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -28,10 +28,6 @@
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
-panel.objects.label = Objects
settings.unsavedchanges.title = Unsaved changes
settings.unsavedchanges.message = There are unsaved changes. Save these changes now?
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/smf/ServiceSettingsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/smf/ServiceSettingsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -30,12 +30,20 @@
import org.opensolaris.os.scf.common.ScfException;
import org.opensolaris.os.vp.panel.common.action.ActionFailedException;
import org.opensolaris.os.vp.panel.common.model.PanelDescriptor;
-import org.opensolaris.os.vp.panel.swing.control.*;
-import org.opensolaris.os.vp.util.misc.Changeable;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
+import org.opensolaris.os.vp.util.misc.*;
public class ServiceSettingsTab extends
- SwingSettingsControl<ServiceSwingPanelDescriptor, ServiceSettingsPanel>
- implements SwingTabControl {
+ SwingSettingsControl<ServiceSwingPanelDescriptor, ServiceSettingsPanel> {
+
+ //
+ // Static data
+ //
+
+ private static final String ID = "settings";
+
+ private static final String NAME =
+ Finder.getString("service.settings.name");
//
// Constructors
@@ -44,7 +52,7 @@
public ServiceSettingsTab(ServiceSwingPanelDescriptor descriptor,
ServiceSettingsPanel panel) {
- super(ID_SETTINGS, NAME_SETTINGS, descriptor);
+ super(ID, NAME, descriptor);
addDefaultResetAction(panel);
addDefaultApplyAction(panel);
@@ -52,15 +60,6 @@
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return getComponentCreate();
- }
-
- //
// SwingControl methods
//
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/smf/ServiceStatusTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/smf/ServiceStatusTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -31,11 +31,20 @@
import javax.management.ObjectName;
import org.opensolaris.os.vp.panel.common.ClientContext;
import org.opensolaris.os.vp.panel.common.model.PanelDescriptor;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
+import org.opensolaris.os.vp.util.misc.Finder;
public class ServiceStatusTab extends
- SwingSettingsControl<ServiceSwingPanelDescriptor, ServiceStatusPanel>
- implements SwingTabControl {
+ SwingSettingsControl<ServiceSwingPanelDescriptor, ServiceStatusPanel> {
+
+ //
+ // Static data
+ //
+
+ private static final String ID = "status";
+
+ private static final String NAME =
+ Finder.getString("service.status.name");
//
// Instance data
@@ -50,20 +59,11 @@
public ServiceStatusTab(ServiceSwingPanelDescriptor descriptor,
ObjectName oName) {
- super(ID_STATUS, NAME_STATUS, descriptor);
+ super(ID, NAME, descriptor);
this.oName = oName;
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return getComponentCreate();
- }
-
- //
// SwingControl methods
//
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/smf/resources/Resources.properties Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/smf/resources/Resources.properties Wed Apr 15 12:47:03 2009 -0400
@@ -20,7 +20,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -49,6 +49,7 @@
service.task.tip.refresh = Perform this operation only if you have made changes to this service''s configuration that have not yet taken affect.
service.task.tip.restart = Under most circumstances, restarting a service should not be necessary. If the service does not reflect changes made to its configuration, refresh the service instead.
+service.status.name = Status
service.status.label.description = Overview
service.status.label.status = Status
service.status.label.tasks = Tasks
@@ -58,6 +59,7 @@
error.scf.general = unexpected error accessing SMF repository
error.jmx.general = unexpected error communicating with JMX host
+service.settings.name = Settings
service.settings.property.label = {0}:
service.settings.nosettings.label = This service has no settings.
service.settings.propertygroups = Property groups:
--- a/usr/src/java/vpanels/panels/apache/org/opensolaris/os/vp/panels/apache/client/swing/VirtualHostGeneralControl.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/apache/org/opensolaris/os/vp/panels/apache/client/swing/VirtualHostGeneralControl.java Wed Apr 15 12:47:03 2009 -0400
@@ -34,13 +34,13 @@
import org.opensolaris.os.vp.panel.common.action.*;
import org.opensolaris.os.vp.panel.common.control.*;
import org.opensolaris.os.vp.panel.common.smf.ScfUtil;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
import org.opensolaris.os.vp.util.misc.Finder;
import org.opensolaris.os.vp.util.wrapper.DataWrapper;
public class VirtualHostGeneralControl
extends SwingSettingsControl<ApachePanelDescriptor, VirtualHostGeneralPanel>
- implements HasMimeTypes, SwingTabControl {
+ implements HasMimeTypes {
//
// Static data
@@ -75,15 +75,6 @@
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return getComponentCreate();
- }
-
- //
// Control methods
//
--- a/usr/src/java/vpanels/panels/apache/org/opensolaris/os/vp/panels/apache/client/swing/VirtualHostSSLControl.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/apache/org/opensolaris/os/vp/panels/apache/client/swing/VirtualHostSSLControl.java Wed Apr 15 12:47:03 2009 -0400
@@ -33,13 +33,12 @@
import org.opensolaris.os.vp.panel.common.action.*;
import org.opensolaris.os.vp.panel.common.control.*;
import org.opensolaris.os.vp.panel.common.smf.ScfUtil;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
import org.opensolaris.os.vp.util.misc.Finder;
import org.opensolaris.os.vp.util.wrapper.DataWrapper;
public class VirtualHostSSLControl
- extends SwingSettingsControl<ApachePanelDescriptor, VirtualHostSSLPanel>
- implements SwingTabControl {
+ extends SwingSettingsControl<ApachePanelDescriptor, VirtualHostSSLPanel> {
//
// Static data
@@ -64,15 +63,6 @@
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return getComponentCreate();
- }
-
- //
// Control methods
//
--- a/usr/src/java/vpanels/panels/coreadm/org/opensolaris/os/vp/panels/coreadm/client/swing/CoreAdmSettingsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/coreadm/org/opensolaris/os/vp/panels/coreadm/client/swing/CoreAdmSettingsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -35,12 +35,20 @@
import org.opensolaris.os.vp.panel.common.control.*;
import org.opensolaris.os.vp.panel.common.smf.ScfUtil;
import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.util.misc.Finder;
import org.opensolaris.os.vp.util.swing.ReplacingStackPanel;
import org.opensolaris.os.vp.util.wrapper.DataWrapper;
public class CoreAdmSettingsTab
extends SwingSettingsControl<CoreAdmPanelDescriptor, CoreAdmSettingsPanel>
- implements SwingTabControl {
+ implements HasTabComponent {
+
+ //
+ // Static data
+ //
+
+ private static final String ID = "settings";
+ private static final String NAME = Finder.getString("settings.name");
//
// Instance data
@@ -53,7 +61,7 @@
//
public CoreAdmSettingsTab(CoreAdmPanelDescriptor descriptor) {
- super(ID_SETTINGS, NAME_SETTINGS, descriptor);
+ super(ID, NAME, descriptor);
descriptor.addPropertyChangeListener(this);
@@ -65,7 +73,7 @@
}
//
- // SwingTabControl methods
+ // HasTabComponent methods
//
@Override
@@ -73,11 +81,6 @@
return stack;
}
- @Override
- public URL getHelpURL() {
- return buildHelpURL("help/coreadm.html", "#coreadm-settings");
- }
-
//
// Control methods
//
@@ -120,6 +123,15 @@
}
//
+ // DefaultControl methods
+ //
+
+ @Override
+ public URL getHelpURL() {
+ return buildHelpURL("help/coreadm.html", "#coreadm-settings");
+ }
+
+ //
// SwingControl methods
//
--- a/usr/src/java/vpanels/panels/coreadm/org/opensolaris/os/vp/panels/coreadm/client/swing/CoresTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/coreadm/org/opensolaris/os/vp/panels/coreadm/client/swing/CoresTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -33,16 +33,16 @@
import org.opensolaris.os.vp.panel.common.control.*;
import org.opensolaris.os.vp.panel.swing.control.*;
import org.opensolaris.os.vp.util.misc.Finder;
-import org.opensolaris.os.vp.util.swing.ReplacingStackPanel;
public class CoresTab
- extends SwingSettingsControl<CoreAdmPanelDescriptor, CoresPanel>
- implements SwingTabControl {
+ extends SwingSettingsControl<CoreAdmPanelDescriptor, CoresPanel> {
//
// Static data
//
+ private static final String ID = "activity";
+
private static final String NAME = Finder.getString("core.objects.title");
//
@@ -57,23 +57,12 @@
updateAction
};
- private ReplacingStackPanel stack = new ReplacingStackPanel();
-
//
// Constructors
//
public CoresTab(CoreAdmPanelDescriptor descriptor) {
- super(ID_ACTIVITY, NAME, descriptor);
- }
-
- //
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return stack;
+ super(ID, NAME, descriptor);
}
//
@@ -100,8 +89,6 @@
@Override
protected CoresPanel createComponent() {
CoresPanel panel = new CoresPanel(getPanelDescriptor(), actions, null);
- stack.push(panel);
- setComponentStack(stack);
addDefaultHelpAction(panel);
return panel;
--- a/usr/src/java/vpanels/panels/coreadm/org/opensolaris/os/vp/panels/coreadm/client/swing/resources/Resources.properties Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/coreadm/org/opensolaris/os/vp/panels/coreadm/client/swing/resources/Resources.properties Wed Apr 15 12:47:03 2009 -0400
@@ -44,6 +44,7 @@
coreadm.contents.symtab = Symbol table
coreadm.contents.text = Readable/executable private mappings
+settings.name = Settings
settings.scheme.title = Core File Scheme
settings.scheme.none = Don''t Generate Core Files
settings.scheme.classic = Classic
--- a/usr/src/java/vpanels/panels/firewall/org/opensolaris/os/vp/panels/firewall/client/swing/FirewallSettingsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/firewall/org/opensolaris/os/vp/panels/firewall/client/swing/FirewallSettingsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -27,7 +27,6 @@
package org.opensolaris.os.vp.panels.firewall.client.swing;
import java.awt.Component;
-import java.beans.*;
import java.net.UnknownHostException;
import java.util.Map;
import java.util.logging.*;
@@ -35,32 +34,29 @@
import org.opensolaris.os.vp.panel.common.action.*;
import org.opensolaris.os.vp.panel.common.control.*;
import org.opensolaris.os.vp.panel.common.smf.ScfUtil;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
import org.opensolaris.os.vp.util.misc.Finder;
public class FirewallSettingsTab
extends SwingSettingsControl<FirewallPanelDescriptor, FirewallSettingsPanel>
- implements SwingTabControl {
+{
+ //
+ // Static data
+ //
+
+ private static final String ID = "settings";
+ private static final String NAME = Finder.getString("settings.name");
//
// Constructors
//
public FirewallSettingsTab(FirewallPanelDescriptor descriptor) {
- super(ID_SETTINGS, NAME_SETTINGS, descriptor);
+ super(ID, NAME, descriptor);
descriptor.addPropertyChangeListener(this);
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return getComponentCreate();
- }
-
- //
// Control methods
//
--- a/usr/src/java/vpanels/panels/firewall/org/opensolaris/os/vp/panels/firewall/client/swing/ServicesTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/firewall/org/opensolaris/os/vp/panels/firewall/client/swing/ServicesTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -37,12 +37,14 @@
public class ServicesTab
extends SwingSettingsControl<FirewallPanelDescriptor, ServicesPanel>
- implements SwingTabControl {
+ implements HasTabComponent {
//
// Static data
//
+ private static final String ID = "objects";
+
private static final String NAME =
Finder.getString("service.objects.title");
@@ -73,12 +75,12 @@
//
public ServicesTab(FirewallPanelDescriptor descriptor) {
- super(ID_OBJECTS, NAME, descriptor);
+ super(ID, NAME, descriptor);
addChildren(new ServiceEditControl(descriptor));
}
//
- // SwingTabControl methods
+ // HasTabComponent methods
//
@Override
--- a/usr/src/java/vpanels/panels/firewall/org/opensolaris/os/vp/panels/firewall/client/swing/resources/Resources.properties Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/firewall/org/opensolaris/os/vp/panels/firewall/client/swing/resources/Resources.properties Wed Apr 15 12:47:03 2009 -0400
@@ -35,6 +35,7 @@
property.label.access = Access
property.description.access = the access policy
+settings.name = Settings
settings.access.title = Default Access Policy
access.value.long.USE_GLOBAL = default Firewall access policy
--- a/usr/src/java/vpanels/panels/mysql/org/opensolaris/os/vp/panels/mysql/client/swing/MysqlAdmSettingsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/mysql/org/opensolaris/os/vp/panels/mysql/client/swing/MysqlAdmSettingsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -28,39 +28,28 @@
import java.awt.Component;
import org.opensolaris.os.vp.panel.common.action.*;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
import org.opensolaris.os.vp.util.misc.Finder;
-import org.opensolaris.os.vp.util.swing.ReplacingStackPanel;
import org.opensolaris.os.vp.util.wrapper.DataWrapper;
public class MysqlAdmSettingsTab
extends SwingSettingsControl<MysqlAdmPanelDescriptor, MysqlAdmSettingsPanel>
- implements SwingTabControl {
-
+{
//
// Instance data
//
+ private static final String ID = "settings";
+
private static final String NAME = Finder.getString(
"mysql.panel.dba-admin.tab.title");
- private ReplacingStackPanel stack = new ReplacingStackPanel();
-
//
// Constructors
//
public MysqlAdmSettingsTab(MysqlAdmPanelDescriptor descriptor) {
- super(ID_SETTINGS, NAME, descriptor);
- }
-
- //
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return stack;
+ super(ID, NAME, descriptor);
}
//
@@ -72,9 +61,6 @@
MysqlAdmSettingsPanel panel = new MysqlAdmSettingsPanel(
getPanelDescriptor());
- stack.push(panel);
- setComponentStack(stack);
-
addDefaultResetAction(panel);
addDefaultApplyAction(panel);
--- a/usr/src/java/vpanels/panels/mysql/org/opensolaris/os/vp/panels/mysql/client/swing/MysqlLogsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/mysql/org/opensolaris/os/vp/panels/mysql/client/swing/MysqlLogsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -27,22 +27,20 @@
package org.opensolaris.os.vp.panels.mysql.client.swing;
import java.awt.Component;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
import org.opensolaris.os.vp.util.misc.Finder;
-import org.opensolaris.os.vp.util.swing.ReplacingStackPanel;
public class MysqlLogsTab
- extends SwingSettingsControl<MysqlAdmPanelDescriptor, MysqlLogsPanel>
- implements SwingTabControl {
+ extends SwingSettingsControl<MysqlAdmPanelDescriptor, MysqlLogsPanel> {
//
// Instance data
//
- private ReplacingStackPanel stack = new ReplacingStackPanel();
- private static final String ID = "mysql_logs";
- private static final String NAME = Finder.getString(
- "mysql.panel.logs.panelName");
+ private static final String ID = "logs";
+
+ private static final String NAME =
+ Finder.getString("mysql.panel.logs.panelName");
//
// Constructors
@@ -54,25 +52,12 @@
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return stack;
- }
-
- //
// SwingControl methods
//
@Override
protected MysqlLogsPanel createComponent() {
- MysqlLogsPanel panel = new MysqlLogsPanel(getPanelDescriptor());
- stack.push(panel);
- setComponentStack(stack);
-
- return panel;
+ return new MysqlLogsPanel(getPanelDescriptor());
}
@Override
--- a/usr/src/java/vpanels/panels/mysql/org/opensolaris/os/vp/panels/mysql/client/swing/MysqlRuntimeStatisticsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/mysql/org/opensolaris/os/vp/panels/mysql/client/swing/MysqlRuntimeStatisticsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -27,22 +27,20 @@
package org.opensolaris.os.vp.panels.mysql.client.swing;
import java.awt.Component;
-import org.opensolaris.os.vp.panel.swing.control.*;
+import org.opensolaris.os.vp.panel.swing.control.SwingSettingsControl;
import org.opensolaris.os.vp.util.misc.Finder;
-import org.opensolaris.os.vp.util.swing.ReplacingStackPanel;
public class MysqlRuntimeStatisticsTab extends
- SwingSettingsControl<MysqlAdmPanelDescriptor, MysqlRuntimeStatisticsPanel>
- implements SwingTabControl {
+ SwingSettingsControl<MysqlAdmPanelDescriptor, MysqlRuntimeStatisticsPanel> {
//
// Instance data
//
- private ReplacingStackPanel stack = new ReplacingStackPanel();
- private static final String ID = "mysql_runtime_status";
- private static final String NAME = Finder.getString(
- "mysql.panel.runtimeStats.tab.title");
+ private static final String ID = "statistics";
+
+ private static final String NAME =
+ Finder.getString("mysql.panel.runtimeStats.tab.title");
//
// Constructors
@@ -53,27 +51,12 @@
}
//
- // SwingTabControl methods
- //
-
- @Override
- public Component getTabComponent() {
- return stack;
- }
-
- //
// SwingControl methods
//
@Override
protected MysqlRuntimeStatisticsPanel createComponent() {
- MysqlRuntimeStatisticsPanel panel = new MysqlRuntimeStatisticsPanel(
- getPanelDescriptor());
-
- stack.push(panel);
- setComponentStack(stack);
-
- return panel;
+ return new MysqlRuntimeStatisticsPanel(getPanelDescriptor());
}
@Override
--- a/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/client/swing/GroupsTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/sharemgr/org/opensolaris/os/vp/panels/sharemgr/client/swing/GroupsTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -38,12 +38,13 @@
public class GroupsTab
extends SwingSettingsControl<SharemgrPanelDescriptor, GroupsPanel>
- implements SwingTabControl {
+ implements HasTabComponent {
//
// Static data
//
+ private static final String ID = "objects";
private static final String NAME = Finder.getString("objects.title");
//
@@ -76,7 +77,7 @@
//
public GroupsTab(SharemgrPanelDescriptor descriptor) {
- super(ID_OBJECTS, NAME, descriptor);
+ super(ID, NAME, descriptor);
Set<Protocol> protocols = descriptor.getSharemgr().getProtocols();
@@ -86,7 +87,7 @@
}
//
- // SwingTabControl methods
+ // HasTabComponent methods
//
@Override
--- a/usr/src/java/vpanels/panels/smf/org/opensolaris/os/vp/panels/smf/client/swing/InstancesTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/smf/org/opensolaris/os/vp/panels/smf/client/swing/InstancesTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -38,8 +38,8 @@
public class InstancesTab
extends SwingSettingsControl<SMFPanelDescriptor, InstancesPanel>
- implements SwingTabControl
-{
+ implements HasTabComponent {
+
/*
* Static data
*/
@@ -79,7 +79,7 @@
}
/*
- * SwingTabControl methods
+ * HasTabComponent methods
*/
@Override
--- a/usr/src/java/vpanels/panels/smf/org/opensolaris/os/vp/panels/smf/client/swing/ServicesTab.java Tue Apr 14 17:43:25 2009 -0700
+++ b/usr/src/java/vpanels/panels/smf/org/opensolaris/os/vp/panels/smf/client/swing/ServicesTab.java Wed Apr 15 12:47:03 2009 -0400
@@ -38,8 +38,8 @@
public class ServicesTab
extends SwingSettingsControl<SMFPanelDescriptor, ServicesPanel>
- implements SwingTabControl
-{
+ implements HasTabComponent {
+
/*
* Static data
*/
@@ -74,7 +74,7 @@
}
/*
- * SwingTabControl methods
+ * HasTabComponent methods
*/
@Override