Search in sources :

Example 1 with PlottingStyle

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);
}
Also used : PlottingStyle(net.sf.latexdraw.model.api.shape.PlottingStyle) Test(org.junit.Test)

Example 2 with PlottingStyle

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);
}
Also used : PlottingStyle(net.sf.latexdraw.model.api.shape.PlottingStyle) Test(org.junit.Test)

Example 3 with PlottingStyle

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);
}
Also used : PlottingStyle(net.sf.latexdraw.model.api.shape.PlottingStyle) Test(org.junit.Test)

Example 4 with PlottingStyle

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);
}
Also used : PlottingStyle(net.sf.latexdraw.model.api.shape.PlottingStyle) Test(org.junit.Test)

Aggregations

PlottingStyle (net.sf.latexdraw.model.api.shape.PlottingStyle)4 Test (org.junit.Test)4