use of net.sf.latexdraw.service.EditingService in project latexdraw by arnobl.
the class TestTextSetter method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
final EditingService editing = injector.getInstance(EditingService.class);
editing.getGroupParams().setPlotMinX(0d);
editing.getGroupParams().setPlotMaxX(10d);
editing.getGroupParams().setNbPlottedPoints(10);
setter = injector.getInstance(TextSetter.class);
pencil.setActivated(true);
injector.getInstance(PreferencesService.class).magneticGridProperty().set(false);
Platform.runLater(() -> setter.initialize(null, null));
WaitForAsyncUtils.waitForFxEvents(100);
Cmds.of(CmdFXVoid.of(() -> canvas.toFront())).execute();
pos = point(canvas).query();
}
use of net.sf.latexdraw.service.EditingService in project latexdraw by arnobl.
the class TestTextSetterReEdit method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
setter = injector.getInstance(TextSetter.class);
final EditingService editing = injector.getInstance(EditingService.class);
Cmds.of(CmdFXVoid.of(() -> {
editing.getGroupParams().setPlotMinX(0d);
editing.getGroupParams().setPlotMaxX(10d);
editing.getGroupParams().setNbPlottedPoints(10);
editing.setCurrentChoice(EditionChoice.HAND);
hand.setActivated(true);
setter.initialize(null, null);
canvas.toFront();
})).execute();
plot = ShapeFactory.INST.createPlot(ShapeFactory.INST.createPoint(-Canvas.ORIGIN.getX() + 100, -Canvas.ORIGIN.getY() + 300), 0, 3, "x 2.5 div", false);
}
Aggregations