summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-07-04 22:21:31 +0200
committerJose <jose@zeroc.com>2013-07-04 22:21:31 +0200
commitfc7fc8af52548043dca3b3ee9ddbccaf1477008c (patch)
treef6a45c482eb1bef1470b175aed53bba186c790a0 /java/src/IceGridGUI
parentFixed ICE-5346 - return empty map rather than no maps for metrics view if the... (diff)
downloadice-fc7fc8af52548043dca3b3ee9ddbccaf1477008c.tar.bz2
ice-fc7fc8af52548043dca3b3ee9ddbccaf1477008c.tar.xz
ice-fc7fc8af52548043dca3b3ee9ddbccaf1477008c.zip
Fixed ICE-5344 - IceGrid Admin without JavaFX?
Diffstat (limited to 'java/src/IceGridGUI')
-rw-r--r--java/src/IceGridGUI/Application/AdapterEditor.java9
-rw-r--r--java/src/IceGridGUI/Application/ApplicationEditor.java5
-rw-r--r--java/src/IceGridGUI/Application/DbEnvEditor.java3
-rw-r--r--java/src/IceGridGUI/Application/ListTreeNode.java6
-rw-r--r--java/src/IceGridGUI/Application/ParameterValuesField.java8
-rw-r--r--java/src/IceGridGUI/Application/ParametersField.java3
-rw-r--r--java/src/IceGridGUI/Application/ReplicaGroupEditor.java5
-rw-r--r--java/src/IceGridGUI/Application/ServerInstanceEditor.java3
-rw-r--r--java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java5
-rw-r--r--java/src/IceGridGUI/Application/ServerSubEditor.java7
-rw-r--r--java/src/IceGridGUI/Application/ServiceInstanceEditor.java3
-rw-r--r--java/src/IceGridGUI/Coordinator.java79
-rw-r--r--java/src/IceGridGUI/Fallback.java9
-rw-r--r--java/src/IceGridGUI/LiveDeployment/GraphView.java2
-rw-r--r--java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java15
-rw-r--r--java/src/IceGridGUI/LiveDeployment/ObjectDialog.java3
-rw-r--r--java/src/IceGridGUI/SessionKeeper.java19
17 files changed, 124 insertions, 60 deletions
diff --git a/java/src/IceGridGUI/Application/AdapterEditor.java b/java/src/IceGridGUI/Application/AdapterEditor.java
index e70590ab0c4..13f3872c334 100644
--- a/java/src/IceGridGUI/Application/AdapterEditor.java
+++ b/java/src/IceGridGUI/Application/AdapterEditor.java
@@ -33,6 +33,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.*;
import IceGridGUI.*;
+@SuppressWarnings("unchecked")
class AdapterEditor extends CommunicatorChildEditor
{
AdapterEditor()
@@ -356,7 +357,7 @@ class AdapterEditor extends CommunicatorChildEditor
private void refreshId()
{
Object id = _id.getSelectedItem();
- _id.setModel(new DefaultComboBoxModel<Object>(new Object[]{DEFAULT_ADAPTER_ID}));
+ _id.setModel(new DefaultComboBoxModel(new Object[]{DEFAULT_ADAPTER_ID}));
_id.setSelectedItem(id);
}
@@ -620,14 +621,14 @@ class AdapterEditor extends CommunicatorChildEditor
private JTextField _name = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
- private JComboBox<Object> _id = new JComboBox<Object>(new Object[] {DEFAULT_ADAPTER_ID});
- private JComboBox<Object> _replicaGroupId = new JComboBox<Object>();
+ private JComboBox _id = new JComboBox(new Object[] {DEFAULT_ADAPTER_ID});
+ private JComboBox _replicaGroupId = new JComboBox();
private JButton _replicaGroupButton;
private JTextField _priority = new JTextField(20);
private JTextField _endpoints = new JTextField(20);
- private JComboBox<Object> _publishedEndpoints = new JComboBox<Object>(new Object[]{PUBLISH_ACTUAL});
+ private JComboBox _publishedEndpoints = new JComboBox(new Object[]{PUBLISH_ACTUAL});
private JTextField _proxyOptions = new JTextField(20);
private JTextField _currentStatus = new JTextField(20);
diff --git a/java/src/IceGridGUI/Application/ApplicationEditor.java b/java/src/IceGridGUI/Application/ApplicationEditor.java
index 81ff878b138..dc618ead77a 100644
--- a/java/src/IceGridGUI/Application/ApplicationEditor.java
+++ b/java/src/IceGridGUI/Application/ApplicationEditor.java
@@ -27,6 +27,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.*;
import IceGridGUI.*;
+@SuppressWarnings("unchecked")
class ApplicationEditor extends Editor
{
protected boolean applyUpdate(boolean refresh)
@@ -100,7 +101,7 @@ class ApplicationEditor extends Editor
//
// Distrib
//
- _distrib = new JComboBox<Object>(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
+ _distrib = new JComboBox(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
_distrib.setEditable(true);
_distrib.setToolTipText("The proxy to the IcePatch2 server holding your files");
@@ -253,6 +254,6 @@ class ApplicationEditor extends Editor
private JTextField _name = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
private SimpleMapField _variables;
- private JComboBox<Object> _distrib;
+ private JComboBox _distrib;
private ListTextField _distribDirs = new ListTextField(20);
}
diff --git a/java/src/IceGridGUI/Application/DbEnvEditor.java b/java/src/IceGridGUI/Application/DbEnvEditor.java
index 1f387c19e7a..31b1be9a2c0 100644
--- a/java/src/IceGridGUI/Application/DbEnvEditor.java
+++ b/java/src/IceGridGUI/Application/DbEnvEditor.java
@@ -183,7 +183,8 @@ class DbEnvEditor extends CommunicatorChildEditor
private JTextField _name = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
- private JComboBox<Object> _dbHome = new JComboBox<Object>(new Object[]{NO_DB_HOME});
+ @SuppressWarnings("unchecked")
+ private JComboBox _dbHome = new JComboBox(new Object[]{NO_DB_HOME});
private PropertiesField _properties;
static private final Object NO_DB_HOME = new Object()
diff --git a/java/src/IceGridGUI/Application/ListTreeNode.java b/java/src/IceGridGUI/Application/ListTreeNode.java
index b8711bfc663..25af68b9bd8 100644
--- a/java/src/IceGridGUI/Application/ListTreeNode.java
+++ b/java/src/IceGridGUI/Application/ListTreeNode.java
@@ -154,12 +154,12 @@ abstract class ListTreeNode extends TreeNode
return _editable;
}
- javax.swing.ComboBoxModel<Object> createComboBoxModel()
+ javax.swing.ComboBoxModel createComboBoxModel()
{
return new ComboBoxModel();
}
- javax.swing.ComboBoxModel<Object> createComboBoxModel(Object item)
+ javax.swing.ComboBoxModel createComboBoxModel(Object item)
{
return new ComboBoxModel(item);
}
@@ -167,7 +167,7 @@ abstract class ListTreeNode extends TreeNode
//
// Adapts ListTreeNode to a ComboBoxModel
//
- class ComboBoxModel extends javax.swing.AbstractListModel<Object> implements javax.swing.ComboBoxModel<Object>
+ class ComboBoxModel extends javax.swing.AbstractListModel implements javax.swing.ComboBoxModel
{
public Object getElementAt(int index)
{
diff --git a/java/src/IceGridGUI/Application/ParameterValuesField.java b/java/src/IceGridGUI/Application/ParameterValuesField.java
index 9a661be086c..682e30ab2d2 100644
--- a/java/src/IceGridGUI/Application/ParameterValuesField.java
+++ b/java/src/IceGridGUI/Application/ParameterValuesField.java
@@ -31,7 +31,7 @@ import javax.swing.table.TableColumn;
//
// A special field used to show/edit parameter values
//
-
+@SuppressWarnings("unchecked")
public class ParameterValuesField extends JTable
{
public ParameterValuesField(Editor editor)
@@ -130,7 +130,7 @@ public class ParameterValuesField extends JTable
{
getCellEditor().stopCellEditing();
}
- @SuppressWarnings("unchecked")
+
java.util.Vector<java.util.Vector<String>> vector =
(java.util.Vector<java.util.Vector<String>>)_model.getDataVector();
@@ -172,9 +172,9 @@ public class ParameterValuesField extends JTable
private static final String _notSet = "Not set";
- private JComboBox<String> _useDefaultCombo = new JComboBox<String>(new String[]{_useDefault});
+ private JComboBox _useDefaultCombo = new JComboBox(new String[]{_useDefault});
- private JComboBox<String> _notSetCombo = new JComboBox<String>(new String[]{_notSet});
+ private JComboBox _notSetCombo = new JComboBox(new String[]{_notSet});
private TableCellEditor _useDefaultEditor = new DefaultCellEditor(_useDefaultCombo);
private TableCellEditor _notSetEditor = new DefaultCellEditor(_notSetCombo);
diff --git a/java/src/IceGridGUI/Application/ParametersField.java b/java/src/IceGridGUI/Application/ParametersField.java
index f7cb48269b6..b6f6d6a3398 100644
--- a/java/src/IceGridGUI/Application/ParametersField.java
+++ b/java/src/IceGridGUI/Application/ParametersField.java
@@ -32,6 +32,7 @@ import javax.swing.table.TableColumn;
// A special field used to show/edit parameters
//
+@SuppressWarnings("unchecked")
public class ParametersField extends JTable
{
public ParametersField(Editor editor)
@@ -42,7 +43,7 @@ public class ParametersField extends JTable
_columnNames.add("Name");
_columnNames.add("Default value");
- JComboBox<String> comboBox = new JComboBox<String>(new String[]{_noDefault});
+ JComboBox comboBox = new JComboBox(new String[]{_noDefault});
comboBox.setEditable(true);
_cellEditor = new DefaultCellEditor(comboBox);
diff --git a/java/src/IceGridGUI/Application/ReplicaGroupEditor.java b/java/src/IceGridGUI/Application/ReplicaGroupEditor.java
index b121d392d80..c63c3633f3b 100644
--- a/java/src/IceGridGUI/Application/ReplicaGroupEditor.java
+++ b/java/src/IceGridGUI/Application/ReplicaGroupEditor.java
@@ -31,6 +31,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.*;
import IceGridGUI.*;
+@SuppressWarnings("unchecked")
class ReplicaGroupEditor extends Editor
{
protected boolean applyUpdate(boolean refresh)
@@ -459,7 +460,7 @@ class ReplicaGroupEditor extends Editor
private JTextArea _description = new JTextArea(3, 20);
private JTextField _proxyOptions = new JTextField(20);
- private JComboBox<String> _loadBalancing = new JComboBox<String>(new String[] {ADAPTIVE,
+ private JComboBox _loadBalancing = new JComboBox(new String[] {ADAPTIVE,
ORDERED,
RANDOM,
ROUND_ROBIN});
@@ -467,7 +468,7 @@ class ReplicaGroupEditor extends Editor
private JTextField _nReplicas = new JTextField(20);
private JLabel _loadSampleLabel;
- private JComboBox<String> _loadSample = new JComboBox<String>(new String[] {"1", "5", "15"});
+ private JComboBox _loadSample = new JComboBox(new String[] {"1", "5", "15"});
private ArrayMapField _objects;
private java.util.LinkedList<ObjectDescriptor> _objectList;
diff --git a/java/src/IceGridGUI/Application/ServerInstanceEditor.java b/java/src/IceGridGUI/Application/ServerInstanceEditor.java
index 69dd447dbf9..d0bb5c45ae8 100644
--- a/java/src/IceGridGUI/Application/ServerInstanceEditor.java
+++ b/java/src/IceGridGUI/Application/ServerInstanceEditor.java
@@ -27,6 +27,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.*;
import IceGridGUI.*;
+@SuppressWarnings("unchecked")
class ServerInstanceEditor extends AbstractServerEditor
{
protected void writeDescriptor()
@@ -215,7 +216,7 @@ class ServerInstanceEditor extends AbstractServerEditor
}
}
- private JComboBox<Object> _template = new JComboBox<Object>();
+ private JComboBox _template = new JComboBox();
private JButton _templateButton;
private ParameterValuesField _parameters;
diff --git a/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java b/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java
index 6518ba1b5d0..bc11a570415 100644
--- a/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java
+++ b/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java
@@ -51,17 +51,18 @@ class ServerInstancePropertySetEditor extends PropertySetEditor
}
}
+ @SuppressWarnings("unchecked")
protected void showId(String unsubstitutedId, Utils.Resolver resolver)
{
ServerInstance s = (ServerInstance)_target.getParent();
_id.setEnabled(true);
_id.setEditable(true);
- _id.setModel(new DefaultComboBoxModel<String>(s.getServiceNames()));
+ _id.setModel(new DefaultComboBoxModel(s.getServiceNames()));
_id.setSelectedItem(Utils.substitute(unsubstitutedId, resolver));
_id.setEditable(resolver == null);
_id.setEnabled(resolver == null);
}
- private JComboBox<String> _id = new JComboBox<String>();
+ private JComboBox _id = new JComboBox();
}
diff --git a/java/src/IceGridGUI/Application/ServerSubEditor.java b/java/src/IceGridGUI/Application/ServerSubEditor.java
index 09e474ea806..9fb3f059a35 100644
--- a/java/src/IceGridGUI/Application/ServerSubEditor.java
+++ b/java/src/IceGridGUI/Application/ServerSubEditor.java
@@ -26,6 +26,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.*;
import IceGridGUI.*;
+@SuppressWarnings("unchecked")
class ServerSubEditor extends CommunicatorSubEditor
{
ServerSubEditor(Editor mainEditor)
@@ -65,7 +66,7 @@ class ServerSubEditor extends CommunicatorSubEditor
_envs = new SimpleMapField(mainEditor, true, "Name", "Value");
- _activation = new JComboBox<String>(new String[]{ALWAYS, MANUAL, ON_DEMAND, SESSION});
+ _activation = new JComboBox(new String[]{ALWAYS, MANUAL, ON_DEMAND, SESSION});
_activation.setToolTipText("<html>always: IceGrid starts and keeps the server up all the time<br>"
+ "manual: you start the server yourself<br>"
+ "on-demand: IceGrid starts the server when a client needs it<br>"
@@ -109,7 +110,7 @@ class ServerSubEditor extends CommunicatorSubEditor
_applicationDistrib = new JCheckBox(appDistrib);
- _distrib = new JComboBox<Object>(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
+ _distrib = new JComboBox(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
_distrib.setToolTipText("The proxy to the IcePatch2 server holding your files");
JTextField distribTextField = (JTextField)_distrib.getEditor().getEditorComponent();
@@ -370,7 +371,7 @@ class ServerSubEditor extends CommunicatorSubEditor
private JTextField _user = new JTextField(20);
private SimpleMapField _envs;
- private JComboBox<String> _activation;
+ private JComboBox _activation;
private JTextField _activationTimeout = new JTextField(20);
private JTextField _deactivationTimeout = new JTextField(20);
private JCheckBox _allocatable;
diff --git a/java/src/IceGridGUI/Application/ServiceInstanceEditor.java b/java/src/IceGridGUI/Application/ServiceInstanceEditor.java
index bd4c0a80668..c70c1657392 100644
--- a/java/src/IceGridGUI/Application/ServiceInstanceEditor.java
+++ b/java/src/IceGridGUI/Application/ServiceInstanceEditor.java
@@ -27,6 +27,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.*;
import IceGridGUI.*;
+@SuppressWarnings("unchecked")
class ServiceInstanceEditor extends CommunicatorChildEditor
{
ServiceInstanceEditor()
@@ -224,7 +225,7 @@ class ServiceInstanceEditor extends CommunicatorChildEditor
}
}
- private JComboBox<Object> _template = new JComboBox<Object>();
+ private JComboBox _template = new JComboBox();
private JButton _templateButton;
private ParameterValuesField _parameters;
private ListTextField _propertySets = new ListTextField(20);
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java
index 06993c479d5..1567459edd3 100644
--- a/java/src/IceGridGUI/Coordinator.java
+++ b/java/src/IceGridGUI/Coordinator.java
@@ -9,6 +9,8 @@
package IceGridGUI;
+import java.lang.reflect.Constructor;
+
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
import java.util.Enumeration;
@@ -57,7 +59,7 @@ import IceGrid.*;
import javax.naming.ldap.LdapName;
import javax.naming.ldap.Rdn;
-import IceGridGUI.LiveDeployment.GraphView;
+import IceGridGUI.LiveDeployment.MetricsViewEditor.MetricsViewTransferableData;
//
// This class coordinates the communications between the various objects
@@ -66,6 +68,13 @@ import IceGridGUI.LiveDeployment.GraphView;
//
public class Coordinator
{
+ public interface IGraphView
+ {
+ public void close();
+ public void addSeries(final MetricsViewTransferableData data);
+ public String getTitle();
+ }
+
private class StatusBarI extends JPanel implements StatusBar
{
StatusBarI()
@@ -1233,8 +1242,8 @@ public class Coordinator
//
// Close al graphs
//
- java.util.List<GraphView> views = new java.util.ArrayList<GraphView>(_graphViews);
- for(GraphView v : views)
+ java.util.List<IGraphView> views = new java.util.ArrayList<IGraphView>(_graphViews);
+ for(IGraphView v : views)
{
v.close();
}
@@ -2656,8 +2665,8 @@ public class Coordinator
return;
}
- java.util.List<GraphView> views = new java.util.ArrayList<GraphView>(_graphViews);
- for(GraphView v : views)
+ java.util.List<IGraphView> views = new java.util.ArrayList<IGraphView>(_graphViews);
+ for(IGraphView v : views)
{
v.close();
}
@@ -3120,17 +3129,49 @@ public class Coordinator
_mainFrame.getContentPane().add(_mainPane, BorderLayout.CENTER);
}
- public GraphView createGraphView()
+ public IGraphView createGraphView()
{
- StringBuilder title = new StringBuilder();
- title.append("Metrics Graph");
- if(_graphViews.size() > 0)
+ Class<?> c1 = IceInternal.Util.findClass("IceGridGUI.LiveDeployment.GraphView", null);
+ Class<?> c2 = IceInternal.Util.findClass("javafx.embed.swing.JFXPanel", null);
+
+ IGraphView view = null;
+ if(c1 != null && c2 != null)
+ {
+ StringBuilder title = new StringBuilder();
+ title.append("Metrics Graph");
+ if(_graphViews.size() > 0)
+ {
+ title.append(" - ");
+ title.append(Integer.toString(_graphViews.size()));
+ }
+
+ try
+ {
+ Constructor ctor = c1.getConstructor(new Class[] { Coordinator.class, String.class });
+ view = (IGraphView)ctor.newInstance(new Object[] { Coordinator.this, title.toString() });
+ _graphViews.add(view);
+ }
+ catch(NoSuchMethodException ex)
+ {
+ }
+ catch(InstantiationException ex)
+ {
+ }
+ catch(IllegalAccessException ex)
+ {
+ }
+ catch(java.lang.reflect.InvocationTargetException ex)
+ {
+ }
+ }
+
+ if(view == null)
{
- title.append(" - ");
- title.append(Integer.toString(_graphViews.size()));
+ JOptionPane.showMessageDialog(_mainFrame,
+ "The Metrics Graph view requires JavaFX 2",
+ "IceGrid Admin Info",
+ JOptionPane.INFORMATION_MESSAGE);
}
- GraphView view = new GraphView(Coordinator.this, title.toString());
- _graphViews.add(view);
return view;
}
@@ -3258,8 +3299,8 @@ public class Coordinator
return;
}
- java.util.List<GraphView> views = new java.util.ArrayList<GraphView>(_graphViews);
- for(GraphView v : views)
+ java.util.List<IGraphView> views = new java.util.ArrayList<IGraphView>(_graphViews);
+ for(IGraphView v : views)
{
v.close();
}
@@ -3476,7 +3517,7 @@ public class Coordinator
enableTreeEditActions();
}
- public void removeGraphView(GraphView view)
+ public void removeGraphView(IGraphView view)
{
_graphViews.remove(view);
}
@@ -3576,9 +3617,9 @@ public class Coordinator
return _dataDir;
}
- public GraphView[] getGraphViews()
+ public IGraphView[] getGraphViews()
{
- return _graphViews.toArray(new GraphView[_graphViews.size()]);
+ return _graphViews.toArray(new IGraphView[_graphViews.size()]);
}
//
@@ -3827,7 +3868,7 @@ public class Coordinator
private X509Certificate _trasientCert;
- private java.util.List<GraphView> _graphViews = new java.util.ArrayList<GraphView>();
+ private java.util.List<IGraphView> _graphViews = new java.util.ArrayList<IGraphView>();
static private final int HISTORY_MAX_SIZE = 20;
}
diff --git a/java/src/IceGridGUI/Fallback.java b/java/src/IceGridGUI/Fallback.java
new file mode 100644
index 00000000000..82ce6d8f223
--- /dev/null
+++ b/java/src/IceGridGUI/Fallback.java
@@ -0,0 +1,9 @@
+package IceGridGUI;
+
+public class Fallback extends javax.swing.JApplet
+{
+ public Fallback()
+ {
+ IceGridGUI.Main.main(new String[]{});
+ }
+} \ No newline at end of file
diff --git a/java/src/IceGridGUI/LiveDeployment/GraphView.java b/java/src/IceGridGUI/LiveDeployment/GraphView.java
index c9e5ed3c55e..f859a0e5196 100644
--- a/java/src/IceGridGUI/LiveDeployment/GraphView.java
+++ b/java/src/IceGridGUI/LiveDeployment/GraphView.java
@@ -129,7 +129,7 @@ import IceGridGUI.LiveDeployment.MetricsViewEditor.FormatedNumberRenderer;
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
-public class GraphView extends JFrame implements MetricsFieldContext
+public class GraphView extends JFrame implements MetricsFieldContext, Coordinator.IGraphView
{
class WorkQueue extends Thread
{
diff --git a/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java b/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java
index 23d30c7da3f..947f52b2642 100644
--- a/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java
+++ b/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java
@@ -734,15 +734,18 @@ public class MetricsViewEditor extends Editor implements MetricsFieldContext
{
public void actionPerformed(ActionEvent e)
{
- GraphView view = node.getCoordinator().createGraphView();
- view.addSeries(new MetricsViewTransferableData(new MetricsViewInfo(node),
- entry.getKey(), rows));
+ Coordinator.IGraphView view = node.getCoordinator().createGraphView();
+ if(view != null)
+ {
+ view.addSeries(new MetricsViewTransferableData(new MetricsViewInfo(node),
+ entry.getKey(), rows));
+ }
}
});
addToGraph.add(newGraph);
- GraphView[] graphs = node.getCoordinator().getGraphViews();
- for(final GraphView view : graphs)
+ Coordinator.IGraphView[] graphs = node.getCoordinator().getGraphViews();
+ for(final Coordinator.IGraphView view : graphs)
{
JMenuItem item = new JMenuItem(view.getTitle());
addToGraph.add(item);
@@ -1143,7 +1146,7 @@ public class MetricsViewEditor extends Editor implements MetricsFieldContext
public MetricsField createField()
{
- return createField(_node, _prefix, _metricsName, _fieldName, _objectField, _context);
+ return MetricsViewEditor.createField(_node, _prefix, _metricsName, _fieldName, _objectField, _context);
}
public String getPropertyPrefix()
diff --git a/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java b/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java
index 8daa0f31ac3..e91f4527470 100644
--- a/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java
+++ b/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java
@@ -35,6 +35,7 @@ import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.util.LayoutStyle;
+@SuppressWarnings("unchecked")
class ObjectDialog extends JDialog
{
ObjectDialog(final Root root, boolean readOnly)
@@ -163,7 +164,7 @@ class ObjectDialog extends JDialog
private JTextArea _proxy = new JTextArea(3, 40);
private JTextField _type = new JTextField(40);
- private JComboBox<Object> _typeCombo = new JComboBox<Object>(new Object[]{QUERY_OBJECT});
+ private JComboBox _typeCombo = new JComboBox(new Object[]{QUERY_OBJECT});
private JFrame _mainFrame;
static private final Object QUERY_OBJECT = new Object()
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java
index 12c4a2df2b7..31bec72075f 100644
--- a/java/src/IceGridGUI/SessionKeeper.java
+++ b/java/src/IceGridGUI/SessionKeeper.java
@@ -79,6 +79,7 @@ import IceGrid.*;
// and keeping them alive.
//
+@SuppressWarnings("unchecked")
public class SessionKeeper
{
//
@@ -1521,7 +1522,7 @@ public class SessionKeeper
// Direct X509 credentials panel
{
- _directCertificateAliases = new JComboBox<String>();
+ _directCertificateAliases = new JComboBox();
_directCertificateAliases.addActionListener (new ActionListener ()
{
public void actionPerformed(ActionEvent e)
@@ -1585,7 +1586,7 @@ public class SessionKeeper
// Routed X509 credentials panel
{
- _routedCertificateAliases = new JComboBox<String>();
+ _routedCertificateAliases = new JComboBox();
_routedCertificateAliases.addActionListener (new ActionListener ()
{
public void actionPerformed(ActionEvent e)
@@ -2631,13 +2632,13 @@ public class SessionKeeper
return true;
}
- public void loadCertificateAliases(JComboBox<String> component)
+ public void loadCertificateAliases(JComboBox component)
{
CertificateManagerDialog certificateManager = certificateManager(this);
if(certificateManager != null)
{
String item = (String)component.getSelectedItem();
- component.setModel(new DefaultComboBoxModel<String>(certificateManager.myCertsAliases()));
+ component.setModel(new DefaultComboBoxModel(certificateManager.myCertsAliases()));
if(item != null)
{
component.setSelectedItem(item);
@@ -2870,12 +2871,12 @@ public class SessionKeeper
private JRadioButton _x509CertificateYesButton;
// Direct X509 Credentials
- private JComboBox<String> _directCertificateAliases;
+ private JComboBox _directCertificateAliases;
private JButton _directImportCertificate;
private JPasswordField _directCertificatePassword;
// Routed X509 Credentials
- private JComboBox<String> _routedCertificateAliases;
+ private JComboBox _routedCertificateAliases;
private JButton _routedImportCertificate;
private JPasswordField _routedCertificatePassword;
@@ -3230,7 +3231,7 @@ public class SessionKeeper
return label;
}
}
- _connectionList = new JList<ConnectionInfo>(_connectionListModel)
+ _connectionList = new JList(_connectionListModel)
{
public String getToolTipText(MouseEvent evt)
{
@@ -3401,7 +3402,7 @@ public class SessionKeeper
}
}
- class ConnectionListModel extends DefaultListModel<ConnectionInfo>
+ class ConnectionListModel extends DefaultListModel
{
public void setDefault()
{
@@ -3441,7 +3442,7 @@ public class SessionKeeper
}
}
- private JList<ConnectionInfo> _connectionList;
+ private JList _connectionList;
private ConnectionListModel _connectionListModel;
private JButton _newConnectionButton;