Search in sources :

Example 6 with CompositeGUIVoidCommand

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

the class TestHandFillingStyle method testPickGradStartColourHand.

@Test
public void testPickGradStartColourHand() {
    new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddRec, selectionAddBezier, selectGradStyle, updateIns).execute();
    Color col = gradStartColButton.getValue();
    pickgradStartCol.execute();
    assertEquals(gradStartColButton.getValue(), drawing.getSelection().getShapeAt(1).getGradColStart().toJFX());
    assertEquals(gradStartColButton.getValue(), drawing.getSelection().getShapeAt(2).getGradColStart().toJFX());
    assertNotEquals(col, gradStartColButton.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Color(javafx.scene.paint.Color) Test(org.junit.Test)

Example 7 with CompositeGUIVoidCommand

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

the class TestHandFillingStyle method testPickFillingColourHand.

@Test
public void testPickFillingColourHand() {
    new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddRec, selectionAddBezier, selectPlainStyle, updateIns).execute();
    Color col = fillColButton.getValue();
    pickfillCol.execute();
    assertEquals(fillColButton.getValue(), drawing.getSelection().getShapeAt(1).getFillingCol().toJFX());
    assertEquals(fillColButton.getValue(), drawing.getSelection().getShapeAt(2).getFillingCol().toJFX());
    assertNotEquals(col, fillColButton.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Color(javafx.scene.paint.Color) Test(org.junit.Test)

Example 8 with CompositeGUIVoidCommand

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

the class TestHandGridStyle method testSelectlabelsYInvertedCBHand.

@Test
public void testSelectlabelsYInvertedCBHand() {
    new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddGrid, selectionAddGrid, updateIns).execute();
    final boolean sel = labelsYInvertedCB.isSelected();
    clicklabelsYInvertedCB.execute();
    assertEquals(sel, ((IGrid) drawing.getSelection().getShapeAt(1)).isXLabelSouth());
    assertEquals(sel, ((IGrid) drawing.getSelection().getShapeAt(2)).isXLabelSouth());
    assertNotEquals(sel, labelsYInvertedCB.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 9 with CompositeGUIVoidCommand

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

the class TestHandGridStyle method testPickLineColourHand.

@Test
public void testPickLineColourHand() {
    new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddGrid, selectionAddGrid, updateIns).execute();
    Color col = colourSubGrid.getValue();
    pickcolourSubGrid.execute();
    assertEquals(colourSubGrid.getValue(), ((IGrid) drawing.getSelection().getShapeAt(1)).getSubGridColour().toJFX());
    assertEquals(colourSubGrid.getValue(), ((IGrid) drawing.getSelection().getShapeAt(2)).getSubGridColour().toJFX());
    assertNotEquals(col, colourSubGrid.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Color(javafx.scene.paint.Color) IGrid(net.sf.latexdraw.models.interfaces.shape.IGrid) Test(org.junit.Test)

Example 10 with CompositeGUIVoidCommand

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

the class TestHandGridStyle method testControllerActivatedWhenSelectionGrid.

@Test
public void testControllerActivatedWhenSelectionGrid() {
    new CompositeGUIVoidCommand(selectionAddGrid, activateHand, updateIns).execute();
    assertTrue(ins.isActivated());
    assertTrue(mainPane.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