File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
src/main/java/org/scijava/ui/swing/widget Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 3131
3232import java .awt .event .ActionEvent ;
3333import java .awt .event .ActionListener ;
34+ import java .util .Arrays ;
3435
3536import javax .swing .JComboBox ;
3637import javax .swing .JPanel ;
@@ -102,7 +103,7 @@ public boolean supports(final WidgetModel model) {
102103 public void doRefresh () {
103104 final String [] choices = get ().getChoices ();
104105
105- if (!areListsEqual (choices , comboBoxItems ())) {
106+ if (!Arrays . equals (choices , comboBoxItems ())) {
106107 comboBox .removeAllItems ();
107108 for (int i =0 ; i <choices .length ; i ++)
108109 comboBox .addItem (choices [i ]);
@@ -113,17 +114,6 @@ public void doRefresh() {
113114 }
114115 }
115116
116- private boolean areListsEqual (String [] list1 , String [] list2 ) {
117- if (list1 .length != list2 .length )
118- return false ;
119-
120- for (int i =0 ; i < list1 .length ; i ++)
121- if (!list1 [i ].equals (list2 [i ]))
122- return false ;
123-
124- return true ;
125- }
126-
127117 private String [] comboBoxItems () {
128118 String [] comboItems = new String [comboBox .getItemCount ()];
129119 for (int i =0 ; i <comboBox .getItemCount (); i ++)
You can’t perform that action at this time.
0 commit comments