summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Application
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/Application
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/Application')
-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
11 files changed, 33 insertions, 24 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);