public void actionPerformed(ActionEvent e) { JMenuItem jmi = (JMenuItem) e.getSource(); Iterator marks = mediator.getMarkerModel().getMarkersWithLabel(jmi.getText()); if (marks.hasNext()) { ChronicleMarker marker = (ChronicleMarker) marks.next(); Instant to = marker.getWhen(); Instant from = mediator.getMajorMoment(); viper.api.impl.Util.shiftDescriptors(new Descriptor[] {desc}, from, to); } }
public void actionPerformed(ActionEvent e) { Iterator toInterp = Collections.singleton(desc).iterator(); JMenuItem jmi = (JMenuItem) e.getSource(); Iterator marks = mediator.getMarkerModel().getMarkersWithLabel(jmi.getText()); if (marks.hasNext()) { ChronicleMarker marker = (ChronicleMarker) marks.next(); Instant to = marker.getWhen(); Instant from = mediator.getMajorMoment(); mediator.getPropagator().interpolateDescriptors(toInterp, from, to); } }