Search in sources :

Example 71 with IArrowableSingleShape

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

the class TestParsingArrow method testParamArrowInset.

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

Example 72 with IArrowableSingleShape

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

the class TestParsingArrow method testNoneNone.

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

Example 73 with IArrowableSingleShape

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

the class TestParsingArrow method testNonecc.

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

Example 74 with IArrowableSingleShape

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

the class TestParsingArrow method testLeftRoundBracketNone.

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

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

the class TestParsingArrow method testParamArrowtbarDimNum.

@Theory
public void testParamArrowtbarDimNum(final Tuple<String, String> cmd) {
    parser(cmd.a + "[arrows=<->, tbarsize=1.5cm 3]" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(1.5 * IShape.PPC, line.getTBarSizeDim(), 0.0001);
    assertEquals(3d, line.getTBarSizeNum(), 0.0001);
}
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