use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandShadowStyle method testSelectShadowCBHand.
@Test
public void testSelectShadowCBHand() {
new CompositeGUIVoidCommand(activateHand, selectionAddGrid, selectionAddRec, selectionAddRec, updateIns).execute();
boolean sel = shadowCB.isSelected();
checkShadow.execute();
assertEquals(shadowCB.isSelected(), drawing.getSelection().getShapeAt(1).hasShadow());
assertEquals(shadowCB.isSelected(), drawing.getSelection().getShapeAt(2).hasShadow());
assertNotEquals(sel, shadowCB.isSelected());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandShadowStyle method testPickShadowColourHand.
@Test
public void testPickShadowColourHand() {
new CompositeGUIVoidCommand(activateHand, selectionAddGrid, selectionAddRec, selectionAddRec, checkShadow, updateIns).execute();
Color col = shadowColB.getValue();
pickShadCol.execute();
assertEquals(shadowColB.getValue(), drawing.getSelection().getShapeAt(1).getShadowCol().toJFX());
assertEquals(shadowColB.getValue(), drawing.getSelection().getShapeAt(2).getShadowCol().toJFX());
assertNotEquals(col, shadowColB.getValue());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandStdGridStyle method testControllerActivatedWhenSelectionGrid.
@Test
public void testControllerActivatedWhenSelectionGrid() {
new CompositeGUIVoidCommand(selectionAddGrid, activateHand, updateIns).execute();
assertTrue(ins.isActivated());
assertTrue(titledPane.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandStdGridStyle method testControllerDeactivatedWhenSelectionEmpty.
@Test
public void testControllerDeactivatedWhenSelectionEmpty() {
new CompositeGUIVoidCommand(activateHand, updateIns).execute();
assertFalse(ins.isActivated());
assertFalse(titledPane.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandTextStyle method testSelectTLPencil.
@Test
public void testSelectTLPencil() {
new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
clickOntlButton.execute();
assertEquals(TextPosition.TOP_LEFT, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
assertEquals(TextPosition.TOP_LEFT, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
assertTrue(tlButton.isSelected());
}
Aggregations