Search in sources :

Example 91 with CompositeGUIVoidCommand

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

the class TestHandDotStyle method testSelectDotStyleSelection.

@Test
public void testSelectDotStyleSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddRec, selectionAddDot, updateIns).execute();
    DotStyle style = dotCB.getSelectionModel().getSelectedItem();
    selectNextDotStyle.execute();
    DotStyle newStyle = dotCB.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IDot) drawing.getSelection().getShapeAt(0)).getDotStyle());
    assertEquals(newStyle, ((IDot) drawing.getSelection().getShapeAt(2)).getDotStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) DotStyle(net.sf.latexdraw.models.interfaces.shape.DotStyle) Test(org.junit.Test)

Example 92 with CompositeGUIVoidCommand

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

the class TestHandDotStyle method testControllerActivatedWhenSelectionDot.

@Test
public void testControllerActivatedWhenSelectionDot() {
    new CompositeGUIVoidCommand(selectionAddDot, activateHand, updateIns).execute();
    assertTrue(ins.isActivated());
    assertTrue(titledPane.isVisible());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 93 with CompositeGUIVoidCommand

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

the class TestHandDotStyle method testSelectFillingEnabledWhenFillableStyleSelection.

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

Example 94 with CompositeGUIVoidCommand

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

the class TestHandDotStyle method testPickLineColourSelection.

@Test
public void testPickLineColourSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddBezier, selectionAddDot, setDotStyleFillable, updateIns).execute();
    Color col = fillingB.getValue();
    pickFillingColour.execute();
    assertEquals(fillingB.getValue(), ((IDot) drawing.getSelection().getShapeAt(0)).getDotFillingCol().toJFX());
    assertEquals(fillingB.getValue(), ((IDot) drawing.getSelection().getShapeAt(2)).getDotFillingCol().toJFX());
    assertNotEquals(col, fillingB.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) IDot(net.sf.latexdraw.models.interfaces.shape.IDot) Color(javafx.scene.paint.Color) Test(org.junit.Test)

Example 95 with CompositeGUIVoidCommand

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

the class TestHandDotStyle method testControllerDeactivatedWhenSelectionNotDot.

@Test
public void testControllerDeactivatedWhenSelectionNotDot() {
    new CompositeGUIVoidCommand(selectionAddRec, activateHand, updateIns).execute();
    assertFalse(ins.isActivated());
    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