Search in sources :

Example 11 with PlotStyle

use of net.sf.latexdraw.models.interfaces.shape.PlotStyle in project latexdraw by arnobl.

the class TestPencilPlotStyle method testSelectCCURVEStylePencil.

@Test
public void testSelectCCURVEStylePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesPlot, updateIns).execute();
    PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
    selectplotStyleCB.execute(PlotStyle.CCURVE);
    PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IPlot) pencil.createShapeInstance()).getPlotStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) PlotStyle(net.sf.latexdraw.models.interfaces.shape.PlotStyle) Test(org.junit.Test)

Example 12 with PlotStyle

use of net.sf.latexdraw.models.interfaces.shape.PlotStyle in project latexdraw by arnobl.

the class TestPencilPlotStyle method testSelectPOLYGONStylePencil.

@Test
public void testSelectPOLYGONStylePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesPlot, updateIns).execute();
    PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
    selectplotStyleCB.execute(PlotStyle.POLYGON);
    PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IPlot) pencil.createShapeInstance()).getPlotStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) PlotStyle(net.sf.latexdraw.models.interfaces.shape.PlotStyle) Test(org.junit.Test)

Aggregations

CompositeGUIVoidCommand (net.sf.latexdraw.instruments.CompositeGUIVoidCommand)12 PlotStyle (net.sf.latexdraw.models.interfaces.shape.PlotStyle)12 Test (org.junit.Test)12