Search in sources :

Example 31 with IArrowableSingleShape

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

the class TestParsingArrow method testSquareRightBracketTbarEnd.

@Theory
public void testSquareRightBracketTbarEnd(final Tuple<String, String> cmd) {
    parser(cmd.a + "{[-}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET, 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 32 with IArrowableSingleShape

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

the class TestParsingArrow method testParamArrowtRBracketLength.

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

Example 33 with IArrowableSingleShape

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

the class TestParsingArrow method testRoundRightBracketNone.

@Theory
public void testRoundRightBracketNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{(-}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, 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 34 with IArrowableSingleShape

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

the class TestParsingArrow method testNoneLeftRoundBracket.

@Theory
public void testNoneLeftRoundBracket(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.RIGHT_ROUND_BRACKET, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 35 with IArrowableSingleShape

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

the class TestParsingArrow method testNoneLeftSquareBracket.

@Theory
public void testNoneLeftSquareBracket(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.RIGHT_SQUARE_BRACKET, 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