use of net.sf.latexdraw.models.interfaces.shape.ArrowStyle in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectLeftArrowStyleCIRCLEINPencil.
@Test
public void testSelectLeftArrowStyleCIRCLEINPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.CIRCLE_IN);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.CIRCLE_IN, 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 testSelectLeftArrowStyleRIGHTARROWPencil.
@Test
public void testSelectLeftArrowStyleRIGHTARROWPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.RIGHT_ARROW);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.RIGHT_ARROW, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
assertTrue(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 testSelectLeftArrowStyleCIRCLEENDPencil.
@Test
public void testSelectLeftArrowStyleCIRCLEENDPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.CIRCLE_END);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.CIRCLE_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 testSelectLeftArrowStyleROUNDINPencil.
@Test
public void testSelectLeftArrowStyleROUNDINPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.ROUND_IN);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.ROUND_IN, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
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 testSelectLeftArrowStyleLEFTDBLEARROWPencil.
@Test
public void testSelectLeftArrowStyleLEFTDBLEARROWPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.LEFT_DBLE_ARROW);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.LEFT_DBLE_ARROW, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
assertTrue(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertFalse(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
Aggregations