X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.charts%2Fsrc%2Forg%2Fsimantics%2Fcharts%2Feditor%2FMoveHairlineAction.java;fp=bundles%2Forg.simantics.charts%2Fsrc%2Forg%2Fsimantics%2Fcharts%2Feditor%2FMoveHairlineAction.java;h=9a94b656ddf60a5faf438ff9fc5196199f395480;hp=54b027190540ea964cf04d9d1a006a8e73d6a311;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/editor/MoveHairlineAction.java b/bundles/org.simantics.charts/src/org/simantics/charts/editor/MoveHairlineAction.java index 54b027190..9a94b656d 100644 --- a/bundles/org.simantics.charts/src/org/simantics/charts/editor/MoveHairlineAction.java +++ b/bundles/org.simantics.charts/src/org/simantics/charts/editor/MoveHairlineAction.java @@ -1,39 +1,39 @@ -package org.simantics.charts.editor; - -import org.eclipse.jface.action.Action; -import org.simantics.db.Resource; -import org.simantics.trend.impl.TrendNode; - -/** - * @author Tuukka Lehtonen - */ -public class MoveHairlineAction extends Action { - - private final Resource chart; - private final TrendNode trend; - private final double time; - private final Boolean setTrackExperimentTime; - - public MoveHairlineAction(String name, Resource chart, boolean enabled, TrendNode trend, double time) { - this(name, chart, enabled, trend, time, null); - } - - public MoveHairlineAction(String name, Resource chart, boolean enabled, TrendNode trend, double time, Boolean setTrackExperimentTime) { - super(name); - setEnabled(enabled); - this.chart = chart; - this.trend = trend; - this.time = time; - this.setTrackExperimentTime = setTrackExperimentTime; - } - - @Override - public void run() { - trend.valueTipTime = time; - trend.repaint(); - if (setTrackExperimentTime != null) { - TrackExperimentTimeAction.setTracking(chart, setTrackExperimentTime); - } - } - +package org.simantics.charts.editor; + +import org.eclipse.jface.action.Action; +import org.simantics.db.Resource; +import org.simantics.trend.impl.TrendNode; + +/** + * @author Tuukka Lehtonen + */ +public class MoveHairlineAction extends Action { + + private final Resource chart; + private final TrendNode trend; + private final double time; + private final Boolean setTrackExperimentTime; + + public MoveHairlineAction(String name, Resource chart, boolean enabled, TrendNode trend, double time) { + this(name, chart, enabled, trend, time, null); + } + + public MoveHairlineAction(String name, Resource chart, boolean enabled, TrendNode trend, double time, Boolean setTrackExperimentTime) { + super(name); + setEnabled(enabled); + this.chart = chart; + this.trend = trend; + this.time = time; + this.setTrackExperimentTime = setTrackExperimentTime; + } + + @Override + public void run() { + trend.valueTipTime = time; + trend.repaint(); + if (setTrackExperimentTime != null) { + TrackExperimentTimeAction.setTracking(chart, setTrackExperimentTime); + } + } + } \ No newline at end of file