use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleNONEPencil.
@Test
public void testSelectRightArrowStyleNONEPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
selectArrowRightCB.execute(ArrowStyle.NONE);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.NONE, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertFalse(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleRIGHTROUNDBRACKETPencil.
@Test
public void testSelectRightArrowStyleRIGHTROUNDBRACKETPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.RIGHT_ROUND_BRACKET);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertTrue(rbracketPane.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleCIRCLEINPencil.
@Test
public void testSelectRightArrowStyleCIRCLEINPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.CIRCLE_IN);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.CIRCLE_IN, 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.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleDISKINPencil.
@Test
public void testSelectRightArrowStyleDISKINPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.DISK_IN);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.DISK_IN, 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.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectArrowStyleDiskRBracketPencil.
@Test
public void testSelectArrowStyleDiskRBracketPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
selectArrowRightCB.execute(ArrowStyle.DISK_END);
selectArrowLeftCB.execute(ArrowStyle.LEFT_ROUND_BRACKET);
assertFalse(arrowPane.isVisible());
assertTrue(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertTrue(rbracketPane.isVisible());
}
Aggregations