Search in sources :

Example 71 with CompositeGUIVoidCommand

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

the class TestPencilLineStyle method testSelectOpenBezierPencil.

@Test
public void testSelectOpenBezierPencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
    final boolean isopen = opened.isSelected();
    checkOpened.execute();
    assertEquals(opened.isSelected(), ((IBezierCurve) pencil.createShapeInstance()).isOpened());
    assertNotEquals(isopen, opened.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 72 with CompositeGUIVoidCommand

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

the class TestPencilLineStyle method testWidgetsGoodStateWhenNotColourablePencil.

@Test
public void testWidgetsGoodStateWhenNotColourablePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesPic, updateIns).execute();
    assertFalse(thicknessField.isVisible());
    assertFalse(lineColButton.isVisible());
    assertFalse(lineCB.isVisible());
    assertFalse(bordersPosCB.isVisible());
    assertFalse(frameArcField.isVisible());
    assertFalse(showPoints.isVisible());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 73 with CompositeGUIVoidCommand

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

the class TestPencilLineStyle method testWidgetsGoodStateWhenNotBorderMovableShowPointablePencil.

@Test
public void testWidgetsGoodStateWhenNotBorderMovableShowPointablePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
    assertTrue(thicknessField.isVisible());
    assertFalse(thicknessField.isDisabled());
    assertTrue(lineColButton.isVisible());
    assertFalse(lineColButton.isDisabled());
    assertTrue(lineCB.isVisible());
    assertFalse(lineCB.isDisabled());
    assertFalse(bordersPosCB.isVisible());
    assertFalse(frameArcField.isDisabled());
    assertTrue(showPoints.isVisible());
    assertFalse(showPoints.isDisabled());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 74 with CompositeGUIVoidCommand

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

the class TestPencilLineStyle method testSelectOpenFreehandPencil.

@Test
public void testSelectOpenFreehandPencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesFreehand, updateIns).execute();
    final boolean isopen = opened.isSelected();
    checkOpened.execute();
    assertEquals(opened.isSelected(), ((IFreehand) pencil.createShapeInstance()).isOpened());
    assertNotEquals(isopen, opened.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 75 with CompositeGUIVoidCommand

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

the class TestPencilPlotStyle method testSelectDOTSStylePencil.

@Test
public void testSelectDOTSStylePencil() {
    new CompositeGUIVoidCommand(activatePencil, pencilCreatesPlot, updateIns).execute();
    PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
    selectplotStyleCB.execute(PlotStyle.DOTS);
    PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((IPlot) pencil.createShapeInstance()).getPlotStyle());
    assertNotEquals(style, newStyle);
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) PlotStyle(net.sf.latexdraw.models.interfaces.shape.PlotStyle) 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