Search in sources :

Example 21 with CompositeGUIVoidCommand

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

the class TestHandShadowStyle method testSelectShadowCBHand.

@Test
public void testSelectShadowCBHand() {
    new CompositeGUIVoidCommand(activateHand, selectionAddGrid, selectionAddRec, selectionAddRec, updateIns).execute();
    boolean sel = shadowCB.isSelected();
    checkShadow.execute();
    assertEquals(shadowCB.isSelected(), drawing.getSelection().getShapeAt(1).hasShadow());
    assertEquals(shadowCB.isSelected(), drawing.getSelection().getShapeAt(2).hasShadow());
    assertNotEquals(sel, shadowCB.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 22 with CompositeGUIVoidCommand

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

the class TestHandShadowStyle method testPickShadowColourHand.

@Test
public void testPickShadowColourHand() {
    new CompositeGUIVoidCommand(activateHand, selectionAddGrid, selectionAddRec, selectionAddRec, checkShadow, updateIns).execute();
    Color col = shadowColB.getValue();
    pickShadCol.execute();
    assertEquals(shadowColB.getValue(), drawing.getSelection().getShapeAt(1).getShadowCol().toJFX());
    assertEquals(shadowColB.getValue(), drawing.getSelection().getShapeAt(2).getShadowCol().toJFX());
    assertNotEquals(col, shadowColB.getValue());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Color(javafx.scene.paint.Color) Test(org.junit.Test)

Example 23 with CompositeGUIVoidCommand

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

the class TestHandStdGridStyle method testControllerActivatedWhenSelectionGrid.

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

Example 24 with CompositeGUIVoidCommand

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

the class TestHandStdGridStyle method testControllerDeactivatedWhenSelectionEmpty.

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

Example 25 with CompositeGUIVoidCommand

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

the class TestHandTextStyle method testSelectTLPencil.

@Test
public void testSelectTLPencil() {
    new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
    clickOntlButton.execute();
    assertEquals(TextPosition.TOP_LEFT, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
    assertEquals(TextPosition.TOP_LEFT, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
    assertTrue(tlButton.isSelected());
}
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