use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandDotStyle method testSelectDotStyleSelection.
@Test
public void testSelectDotStyleSelection() {
new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddRec, selectionAddDot, updateIns).execute();
DotStyle style = dotCB.getSelectionModel().getSelectedItem();
selectNextDotStyle.execute();
DotStyle newStyle = dotCB.getSelectionModel().getSelectedItem();
assertEquals(newStyle, ((IDot) drawing.getSelection().getShapeAt(0)).getDotStyle());
assertEquals(newStyle, ((IDot) drawing.getSelection().getShapeAt(2)).getDotStyle());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandDotStyle method testControllerActivatedWhenSelectionDot.
@Test
public void testControllerActivatedWhenSelectionDot() {
new CompositeGUIVoidCommand(selectionAddDot, activateHand, updateIns).execute();
assertTrue(ins.isActivated());
assertTrue(titledPane.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandDotStyle method testSelectFillingEnabledWhenFillableStyleSelection.
@Test
public void testSelectFillingEnabledWhenFillableStyleSelection() {
new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddRec, selectionAddDot, updateIns, setDotStyleFillable).execute();
assertFalse(fillingB.isDisabled());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandDotStyle method testPickLineColourSelection.
@Test
public void testPickLineColourSelection() {
new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddBezier, selectionAddDot, setDotStyleFillable, updateIns).execute();
Color col = fillingB.getValue();
pickFillingColour.execute();
assertEquals(fillingB.getValue(), ((IDot) drawing.getSelection().getShapeAt(0)).getDotFillingCol().toJFX());
assertEquals(fillingB.getValue(), ((IDot) drawing.getSelection().getShapeAt(2)).getDotFillingCol().toJFX());
assertNotEquals(col, fillingB.getValue());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandDotStyle method testControllerDeactivatedWhenSelectionNotDot.
@Test
public void testControllerDeactivatedWhenSelectionNotDot() {
new CompositeGUIVoidCommand(selectionAddRec, activateHand, updateIns).execute();
assertFalse(ins.isActivated());
assertFalse(titledPane.isVisible());
}
Aggregations