use of net.sf.latexdraw.model.api.shape.PlottingStyle in project latexdraw by arnobl.
the class TestPencilAxesStyle method testSelectShowLabelsPencil.
@Test
public void testSelectShowLabelsPencil() {
Cmds.of(activatePencil, pencilCreatesAxes, updateIns).execute();
final PlottingStyle style = showLabels.getSelectionModel().getSelectedItem();
Cmds.of(selectPlotLabel).execute();
final PlottingStyle newStyle = showLabels.getSelectionModel().getSelectedItem();
assertEquals(newStyle, ((AxesProp) editing.createShapeInstance()).getLabelsDisplayed());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.model.api.shape.PlottingStyle in project latexdraw by arnobl.
the class TestHandAxeStyle method testSelectShowTicksSelection.
@Test
public void testSelectShowTicksSelection() {
Cmds.of(activateHand, selectionAddAxes, selectionAddRec, selectionAddAxes, updateIns).execute();
final PlottingStyle style = showTicks.getSelectionModel().getSelectedItem();
Cmds.of(selectPlotTicks).execute();
final PlottingStyle newStyle = showTicks.getSelectionModel().getSelectedItem();
assertEquals(newStyle, ((AxesProp) drawing.getSelection().getShapeAt(0).orElseThrow()).getTicksDisplayed());
assertEquals(newStyle, ((AxesProp) drawing.getSelection().getShapeAt(2).orElseThrow()).getTicksDisplayed());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.model.api.shape.PlottingStyle in project latexdraw by arnobl.
the class TestHandAxeStyle method testSelectShowLabelsSelection.
@Test
public void testSelectShowLabelsSelection() {
Cmds.of(activateHand, selectionAddAxes, selectionAddRec, selectionAddAxes, updateIns).execute();
final PlottingStyle style = showLabels.getSelectionModel().getSelectedItem();
Cmds.of(selectPlotLabel).execute();
final PlottingStyle newStyle = showLabels.getSelectionModel().getSelectedItem();
assertEquals(newStyle, ((AxesProp) drawing.getSelection().getShapeAt(0).orElseThrow()).getLabelsDisplayed());
assertEquals(newStyle, ((AxesProp) drawing.getSelection().getShapeAt(2).orElseThrow()).getLabelsDisplayed());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.model.api.shape.PlottingStyle in project latexdraw by arnobl.
the class TestPencilAxesStyle method testSelectShowTicksPencil.
@Test
public void testSelectShowTicksPencil() {
Cmds.of(activatePencil, pencilCreatesAxes, updateIns).execute();
final PlottingStyle style = showTicks.getSelectionModel().getSelectedItem();
Cmds.of(selectPlotTicks).execute();
final PlottingStyle newStyle = showTicks.getSelectionModel().getSelectedItem();
assertEquals(newStyle, ((AxesProp) editing.createShapeInstance()).getTicksDisplayed());
assertNotEquals(style, newStyle);
}
Aggregations