Search in sources :

Example 76 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestPencilPlotStyle method testSelectLINEStylePencil.

@Test
public void testSelectLINEStylePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesPlot, updateIns).execute();
    PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
    selectplotStyleCB.execute(PlotStyle.LINE);
    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 77 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestPencilPlotStyle method testWidgetsGoodStateWhenGoodPencilUsed.

@Test
public void testWidgetsGoodStateWhenGoodPencilUsed() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesPlot, updateIns).execute();
    assertTrue(titledPane.isVisible());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 78 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestPencilShadowStyle method testPickShadowColourPencil.

@Test
public void testPickShadowColourPencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesRec, checkShadow, updateIns).execute();
    Color col = shadowColB.getValue();
    pickShadCol.execute();
    assertEquals(shadowColB.getValue(), pencil.createShapeInstance().getShadowCol().toJFX());
    assertNotEquals(col, shadowColB.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Color(javafx.scene.paint.Color) Test(org.junit.Test)

Example 79 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestPencilShadowStyle method testWidgetsGoodStateWhenGoodPencilUsed.

@Test
public void testWidgetsGoodStateWhenGoodPencilUsed() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesRec, updateIns).execute();
    assertTrue(titledPane.isVisible());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 80 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestPencilShadowStyle method testWidgetsGoodStateWhenBadPencilUsed.

@Test
public void testWidgetsGoodStateWhenBadPencilUsed() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesGrid, updateIns).execute();
    assertFalse(titledPane.isVisible());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Aggregations

CompositeGUIVoidCommand (net.sf.latexdraw.instruments.CompositeGUIVoidCommand)218 Test (org.junit.Test)218 ArrowStyle (net.sf.latexdraw.models.interfaces.shape.ArrowStyle)34 IArrowableSingleShape (net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape)34 Color (javafx.scene.paint.Color)20 PlotStyle (net.sf.latexdraw.models.interfaces.shape.PlotStyle)12 IGrid (net.sf.latexdraw.models.interfaces.shape.IGrid)4 PlottingStyle (net.sf.latexdraw.models.interfaces.shape.PlottingStyle)4 AxesStyle (net.sf.latexdraw.models.interfaces.shape.AxesStyle)2 BorderPos (net.sf.latexdraw.models.interfaces.shape.BorderPos)2 FillingStyle (net.sf.latexdraw.models.interfaces.shape.FillingStyle)2 IDot (net.sf.latexdraw.models.interfaces.shape.IDot)2 LineStyle (net.sf.latexdraw.models.interfaces.shape.LineStyle)2 TicksStyle (net.sf.latexdraw.models.interfaces.shape.TicksStyle)2 DotStyle (net.sf.latexdraw.models.interfaces.shape.DotStyle)1