@@ -116,7 +116,7 @@ private void makePanel(Dimension size) {
116
116
JPanel shapePanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
117
117
shapePanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
118
118
shapePanel .add (new JLabel ("Shape:" ));
119
- shapeCombo = new JComboBox (new String []{"Line" , "Path" , "Polygon" , "Circle" , "Ellipse" , "Square" , "Rectangle" });
119
+ shapeCombo = new JComboBox <> (new String []{"Line" , "Path" , "Polygon" , "Circle" , "Ellipse" , "Square" , "Rectangle" });
120
120
shapeCombo .addActionListener ((ActionEvent event ) -> {
121
121
String item = (String ) ((JComboBox ) event .getSource ()).getSelectedItem ();
122
122
switch (item ) {
@@ -151,7 +151,7 @@ private void makePanel(Dimension size) {
151
151
JPanel pathTypePanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
152
152
pathTypePanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
153
153
pathTypePanel .add (new JLabel ("Path type:" ));
154
- pathTypeCombo = new JComboBox (new String []{"Linear" , "Rhumb" , "Great circle" });
154
+ pathTypeCombo = new JComboBox <> (new String []{"Linear" , "Rhumb" , "Great circle" });
155
155
pathTypeCombo .setSelectedIndex (2 );
156
156
pathTypeCombo .addActionListener ((ActionEvent event ) -> {
157
157
String item = (String ) ((JComboBox ) event .getSource ()).getSelectedItem ();
@@ -175,7 +175,7 @@ private void makePanel(Dimension size) {
175
175
JPanel unitsPanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
176
176
unitsPanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
177
177
unitsPanel .add (new JLabel ("Units:" ));
178
- unitsCombo = new JComboBox (new String []{"M/M\u00b2 " , "KM/KM\u00b2 " , "KM/Hectare" , "Feet/Feet\u00b2 " ,
178
+ unitsCombo = new JComboBox <> (new String []{"M/M\u00b2 " , "KM/KM\u00b2 " , "KM/Hectare" , "Feet/Feet\u00b2 " ,
179
179
"Miles/Miles\u00b2 " , "Nm/Miles\u00b2 " , "Yards/Acres" });
180
180
unitsCombo .setSelectedItem ("KM/KM\u00b2 " );
181
181
unitsCombo .addActionListener ((ActionEvent event ) -> {
@@ -219,7 +219,7 @@ private void makePanel(Dimension size) {
219
219
JPanel anglesPanel = new JPanel (new GridLayout (1 , 2 , 5 , 5 ));
220
220
anglesPanel .setBorder (BorderFactory .createEmptyBorder (4 , 4 , 4 , 4 ));
221
221
anglesPanel .add (new JLabel ("Angle Format:" ));
222
- anglesCombo = new JComboBox (new String []{"DD" , "DMS" });
222
+ anglesCombo = new JComboBox <> (new String []{"DD" , "DMS" });
223
223
anglesCombo .setSelectedItem ("DD" );
224
224
anglesCombo .addActionListener ((ActionEvent event ) -> {
225
225
String item = (String ) ((JComboBox ) event .getSource ()).getSelectedItem ();
0 commit comments