Search in sources :

Example 11 with CompositeGUIVoidCommand

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

the class TestHandGridStyle method testControllerDeactivatedWhenSelectionNotGrid.

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

Example 12 with CompositeGUIVoidCommand

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

the class TestHandGridStyle method testSelectlabelsXInvertedCBHand.

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

Example 13 with CompositeGUIVoidCommand

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

the class TestHandLineStyle method testCheckCloseOKSelection.

@Test
public void testCheckCloseOKSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddBezier, selectionAddFreehand, updateIns).execute();
    assertEquals(((IClosableProp) drawing.getSelection().getShapeAt(0)).isOpened(), opened.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 14 with CompositeGUIVoidCommand

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

the class TestHandLineStyle method testCheckShowPointSelection.

@Test
public void testCheckShowPointSelection() {
    new CompositeGUIVoidCommand(activateHand, selectionAddBezier, selectionAddBezier, updateIns).execute();
    final boolean sel = showPoints.isSelected();
    checkShowPts.execute();
    assertEquals(!sel, drawing.getSelection().getShapeAt(0).isShowPts());
    assertEquals(!sel, drawing.getSelection().getShapeAt(1).isShowPts());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 15 with CompositeGUIVoidCommand

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

the class TestHandLineStyle method testOpenVisibleIfBezierAndActivated.

@Test
public void testOpenVisibleIfBezierAndActivated() {
    new CompositeGUIVoidCommand(selectionAddBezier, activateHand, updateIns).execute();
    assertTrue(opened.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