示例#1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   final XMLFormatVersion other = (XMLFormatVersion) obj;
   return this.xmlVersion == other.xmlVersion
       && CompareUtils.equals(this.officeVersion, other.officeVersion);
 }
示例#2
0
 private void columnsChanged(final ItemListener listener) {
   final String currentID = ((Column) this.comboColonnePourRecherche.getSelectedItem()).getID();
   fillColumnCombo(listener);
   final ListComboBoxModel comboModel =
       (ListComboBoxModel) this.comboColonnePourRecherche.getModel();
   // no selection since the model was just emptied
   assert this.comboColonnePourRecherche.getSelectedIndex() == -1
       && this.comboColonnePourRecherche.getSelectedItem() == null;
   // try to reselect the same column if it's still there
   for (final Object o : comboModel.getList()) {
     final Column col = (Column) o;
     if (CompareUtils.equals(col.getID(), currentID))
       this.comboColonnePourRecherche.setSelectedItem(o);
   }
   if (comboModel.getSelectedItem() == null) selectAllColumnsItem();
 }