示例#1
0
 private void syncWindows(Object source) {
   if (SyncWindows.getInstance() == null) return;
   if (source == cSelector) SyncWindows.setC(this, cSelector.getValue());
   else if (source == zSelector) SyncWindows.setZ(this, zSelector.getValue());
   else if (source == tSelector) SyncWindows.setT(this, tSelector.getValue());
   else throw new RuntimeException("Unknownsource:" + source);
 }
示例#2
0
 public synchronized void adjustmentValueChanged(AdjustmentEvent e) {
   if (!running2 || imp.isHyperStack()) {
     if (e.getSource() == cSelector) {
       c = cSelector.getValue();
       if (c == imp.getChannel() && e.getAdjustmentType() == AdjustmentEvent.TRACK) return;
     } else if (e.getSource() == zSelector) {
       z = zSelector.getValue();
       int slice = hyperStack ? imp.getSlice() : imp.getCurrentSlice();
       if (z == slice && e.getAdjustmentType() == AdjustmentEvent.TRACK) return;
     } else if (e.getSource() == tSelector) {
       t = tSelector.getValue();
       if (t == imp.getFrame() && e.getAdjustmentType() == AdjustmentEvent.TRACK) return;
     }
     updatePosition();
     notify();
   }
   if (!running) syncWindows(e.getSource());
 }