Example #1
0
 /*
  * (non-Javadoc)
  *
  * @see
  * java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
  */
 @Override
 public void actionPerformed(final ActionEvent e) {
   if (e instanceof ContrastActionEvent) {
     final ContrastActionEvent event = (ContrastActionEvent) e;
     strategy.changeLut(event.lut, event.histogram, additionalParameters.clone());
   }
 }
Example #2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + Arrays.hashCode(additionalParameters);
   result = prime * result + (strategy == null ? 0 : strategy.hashCode());
   return result;
 }
Example #3
0
 @Override
 public boolean equals(final Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   final AutoContrast other = (AutoContrast) obj;
   if (!Arrays.equals(additionalParameters, other.additionalParameters)) {
     return false;
   }
   if (strategy == null) {
     if (other.strategy != null) {
       return false;
     }
   } else if (!strategy.equals(other.strategy)) {
     return false;
   }
   if (this.enabled != other.enabled) {
     return false;
   }
   if (getKeys() == null) {
     return other.getKeys() == null;
   }
   for (final Object key : getKeys()) {
     if (key instanceof String) {
       final String str = (String) key;
       if (!getValue(str).equals(other.getValue(str))) {
         return false;
       }
     }
   }
   return true;
 }