use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleDISKENDPencil.
@Test
public void testSelectRightArrowStyleDISKENDPencil() {
Cmds.of(activatePencil, pencilCreatesBezier, updateIns).execute();
final ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
Cmds.of(() -> selectArrowRightCB.execute(ArrowStyle.DISK_END)).execute();
final ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.DISK_END, newStyle);
assertEquals(newStyle, ((ArrowableSingleShape) editing.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.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleCIRCLEENDPencil.
@Test
public void testSelectRightArrowStyleCIRCLEENDPencil() {
Cmds.of(activatePencil, pencilCreatesBezier, updateIns).execute();
final ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
Cmds.of(() -> selectArrowRightCB.execute(ArrowStyle.CIRCLE_END)).execute();
final ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.CIRCLE_END, newStyle);
assertEquals(newStyle, ((ArrowableSingleShape) editing.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.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectLeftArrowStyleDISKENDPencil.
@Test
public void testSelectLeftArrowStyleDISKENDPencil() {
Cmds.of(activatePencil, pencilCreatesBezier, updateIns).execute();
final ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
Cmds.of(() -> selectArrowLeftCB.execute(ArrowStyle.DISK_END)).execute();
final ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.DISK_END, newStyle);
assertEquals(newStyle, ((ArrowableSingleShape) editing.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.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectLeftArrowStyleLEFTSQUAREBRACKETPencil.
@Test
public void testSelectLeftArrowStyleLEFTSQUAREBRACKETPencil() {
Cmds.of(activatePencil, pencilCreatesBezier, updateIns).execute();
final ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
Cmds.of(() -> selectArrowLeftCB.execute(ArrowStyle.LEFT_SQUARE_BRACKET)).execute();
final ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.LEFT_SQUARE_BRACKET, newStyle);
assertEquals(newStyle, ((ArrowableSingleShape) editing.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertTrue(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.model.api.shape.ArrowableSingleShape in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleDISKINPencil.
@Test
public void testSelectRightArrowStyleDISKINPencil() {
Cmds.of(activatePencil, pencilCreatesBezier, updateIns).execute();
final ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
Cmds.of(() -> selectArrowRightCB.execute(ArrowStyle.DISK_IN)).execute();
final ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.DISK_IN, newStyle);
assertEquals(newStyle, ((ArrowableSingleShape) editing.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertTrue(dotPane.isVisible());
assertFalse(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
Aggregations