use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleLEFTROUNDBRACKETPencil.
@Test
public void testSelectRightArrowStyleLEFTROUNDBRACKETPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.LEFT_ROUND_BRACKET);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.LEFT_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 testSelectLeftArrowStyleRIGHTDBLEARROWPencil.
@Test
public void testSelectLeftArrowStyleRIGHTDBLEARROWPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.RIGHT_DBLE_ARROW);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.RIGHT_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());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleBARINPencil.
@Test
public void testSelectRightArrowStyleBARINPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.BAR_IN);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.BAR_IN, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertFalse(rbracketPane.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilArrowStyle method testSelectRightArrowStyleLEFTDBLEARROWPencil.
@Test
public void testSelectRightArrowStyleLEFTDBLEARROWPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowRightCB.getSelectionModel().getSelectedItem();
selectArrowRightCB.execute(ArrowStyle.LEFT_DBLE_ARROW);
ArrowStyle newStyle = arrowRightCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.LEFT_DBLE_ARROW, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(-1).getArrowStyle());
assertNotEquals(style, newStyle);
assertTrue(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 testSelectLeftArrowStyleLEFTROUNDBRACKETPencil.
@Test
public void testSelectLeftArrowStyleLEFTROUNDBRACKETPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
ArrowStyle style = arrowLeftCB.getSelectionModel().getSelectedItem();
selectArrowLeftCB.execute(ArrowStyle.LEFT_ROUND_BRACKET);
ArrowStyle newStyle = arrowLeftCB.getSelectionModel().getSelectedItem();
assertEquals(ArrowStyle.LEFT_ROUND_BRACKET, newStyle);
assertEquals(newStyle, ((IArrowableSingleShape) pencil.createShapeInstance()).getArrowAt(0).getArrowStyle());
assertNotEquals(style, newStyle);
assertFalse(arrowPane.isVisible());
assertFalse(dotPane.isVisible());
assertTrue(barPane.isVisible());
assertFalse(bracketPane.isVisible());
assertTrue(rbracketPane.isVisible());
}
Aggregations