use of net.sf.latexdraw.models.interfaces.shape.ArrowStyle in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectLeftArrowStyleBARINPencil.
@Test
public void testSelectLeftArrowStyleBARINPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.BAR_IN);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.BAR_IN, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.models.interfaces.shape.ArrowStyle in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleCIRCLEENDPencil.
@Test
public void testSelectRightArrowStyleCIRCLEENDPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.CIRCLE_END);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.CIRCLE_END, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertTrue(dotPane.isVisible());
assertFalse(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.models.interfaces.shape.ArrowStyle in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectLeftArrowStyleDISKENDPencil.
@Test
public void testSelectLeftArrowStyleDISKENDPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.DISK_END);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.DISK_END, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertTrue(dotPane.isVisible());
assertFalse(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.models.interfaces.shape.ArrowStyle in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectLeftArrowStyleNONEPencil.
@Test
public void testSelectLeftArrowStyleNONEPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
selectArrowLeftCB.execute(ArrowStyle.NONE);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.NONE, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertFalse(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.models.interfaces.shape.ArrowStyle in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleRIGHTSQUAREBRACKETPencil.
@Test
public void testSelectRightArrowStyleRIGHTSQUAREBRACKETPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.RIGHT_SQUARE_BRACKET);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertTrue(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
Aggregations