Search in sources :

Example 81 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testNoneDiskEnd.

@Theory
public void testNoneDiskEnd(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-*}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.DISK_END, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 82 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testArrowheadRightNone.

@Theory
public void testArrowheadRightNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{>-}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 83 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testParamArrowlength.

@Theory
public void testParamArrowlength(final Tuple<String, String> cmd) {
    parser(cmd.a + "[arrows=<->, arrowlength=1.5]" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(1.5, line.getArrowLength(), 0.0001);
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 84 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testNoneCircleEnd.

@Theory
public void testNoneCircleEnd(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-o}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.CIRCLE_END, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 85 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testArrowheadLeftNone.

@Theory
public void testArrowheadLeftNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{<-}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Aggregations

IArrowableSingleShape (net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape)93 Theory (org.junit.experimental.theories.Theory)57 ArrowStyle (net.sf.latexdraw.models.interfaces.shape.ArrowStyle)36 CompositeGUIVoidCommand (net.sf.latexdraw.instruments.CompositeGUIVoidCommand)34 Test (org.junit.Test)34 IAxes (net.sf.latexdraw.models.interfaces.shape.IAxes)10