Search in sources :

Example 86 with CompositeGUIVoidCommand

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

the class TestHandAxeStyle method testControllerActivatedWhenSelectionAxes.

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

Example 87 with CompositeGUIVoidCommand

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

the class TestHandAxeStyle method testSelectShowTicksSelection.

@Test
public void testSelectShowTicksSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddAxes, selectionAddRec, selectionAddAxes, updateIns).execute();
    PlottingStyle style = showTicks.getSelectionModel().getSelectedItem();
    selectPlotTicks.execute();
    PlottingStyle newStyle = showTicks.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IAxesProp) drawing.getSelection().getShapeAt(0)).getTicksDisplayed());
    assertEquals(newStyle, ((IAxesProp) drawing.getSelection().getShapeAt(2)).getTicksDisplayed());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) PlottingStyle(net.sf.latexdraw.models.interfaces.shape.PlottingStyle) Test(org.junit.Test)

Example 88 with CompositeGUIVoidCommand

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

the class TestHandAxeStyle method testCheckShowOriginSelection.

@Test
public void testCheckShowOriginSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddAxes, selectionAddRec, selectionAddAxes, updateIns).execute();
    boolean sel = showOrigin.isSelected();
    selectShowOrigin.execute();
    assertEquals(!sel, ((IAxesProp) drawing.getSelection().getShapeAt(0)).isShowOrigin());
    assertEquals(!sel, ((IAxesProp) drawing.getSelection().getShapeAt(2)).isShowOrigin());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 89 with CompositeGUIVoidCommand

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

the class TestHandAxeStyle method testControllerDeactivatedWhenSelectionEmpty.

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

Example 90 with CompositeGUIVoidCommand

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

the class TestHandCoordDimStyle method testControllerActivatedWhenSelection.

@Test
public void testControllerActivatedWhenSelection() {
    new CompositeGUIVoidCommand(selectionAddArc, activateHand, updateIns).execute();
    assertTrue(ins.isActivated());
    assertTrue(tlxS.isVisible());
    assertTrue(tlyS.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