Search in sources :

Example 61 with CompositeGUIVoidCommand

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

the class TestPencilDotStyle method testSelectFillingEnabledWhenFillableStylePencil.

@Test
public void testSelectFillingEnabledWhenFillableStylePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesDot, updateIns, setDotStyleFillable).execute();
    assertFalse(fillingB.isDisabled());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 62 with CompositeGUIVoidCommand

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

the class TestPencilDoubleLineStyle method testNotDbledWidgetsNotEnabledPencil.

@Test
public void testNotDbledWidgetsNotEnabledPencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesRec, updateIns).execute();
    assertFalse(dbleBoundCB.isDisabled());
    assertTrue(dbleBoundColB.isDisabled());
    assertTrue(dbleSepField.isDisabled());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 63 with CompositeGUIVoidCommand

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

the class TestPencilDoubleLineStyle 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 64 with CompositeGUIVoidCommand

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

the class TestPencilDoubleLineStyle method testPickDbleColourPencil.

@Test
public void testPickDbleColourPencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesRec, selectdbleLine, updateIns).execute();
    Color col = dbleBoundColB.getValue();
    pickDbleColour.execute();
    assertEquals(dbleBoundColB.getValue(), pencil.createShapeInstance().getDbleBordCol().toJFX());
    assertNotEquals(col, dbleBoundColB.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Color(javafx.scene.paint.Color) Test(org.junit.Test)

Example 65 with CompositeGUIVoidCommand

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

the class TestPencilFillingStyle method testSelectFillingPlainPencil.

@Test
public void testSelectFillingPlainPencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesRec, updateIns).execute();
    FillingStyle style = fillStyleCB.getSelectionModel().getSelectedItem();
    selectStyle.execute(FillingStyle.PLAIN);
    FillingStyle newStyle = fillStyleCB.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, pencil.createShapeInstance().getFillingStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) FillingStyle(net.sf.latexdraw.models.interfaces.shape.FillingStyle) 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