use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilLineStyle method testSelectOpenBezierPencil.
@Test
public void testSelectOpenBezierPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
final boolean isopen = opened.isSelected();
checkOpened.execute();
assertEquals(opened.isSelected(), ((IBezierCurve) pencil.createShapeInstance()).isOpened());
assertNotEquals(isopen, opened.isSelected());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilLineStyle method testWidgetsGoodStateWhenNotColourablePencil.
@Test
public void testWidgetsGoodStateWhenNotColourablePencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesPic, updateIns).execute();
assertFalse(thicknessField.isVisible());
assertFalse(lineColButton.isVisible());
assertFalse(lineCB.isVisible());
assertFalse(bordersPosCB.isVisible());
assertFalse(frameArcField.isVisible());
assertFalse(showPoints.isVisible());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilLineStyle method testWidgetsGoodStateWhenNotBorderMovableShowPointablePencil.
@Test
public void testWidgetsGoodStateWhenNotBorderMovableShowPointablePencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesBezier, updateIns).execute();
assertTrue(thicknessField.isVisible());
assertFalse(thicknessField.isDisabled());
assertTrue(lineColButton.isVisible());
assertFalse(lineColButton.isDisabled());
assertTrue(lineCB.isVisible());
assertFalse(lineCB.isDisabled());
assertFalse(bordersPosCB.isVisible());
assertFalse(frameArcField.isDisabled());
assertTrue(showPoints.isVisible());
assertFalse(showPoints.isDisabled());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilLineStyle method testSelectOpenFreehandPencil.
@Test
public void testSelectOpenFreehandPencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesFreehand, updateIns).execute();
final boolean isopen = opened.isSelected();
checkOpened.execute();
assertEquals(opened.isSelected(), ((IFreehand) pencil.createShapeInstance()).isOpened());
assertNotEquals(isopen, opened.isSelected());
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestPencilPlotStyle method testSelectDOTSStylePencil.
@Test
public void testSelectDOTSStylePencil() {
new CompositeGUIVoidCommand(activatePencil, pencilCreatesPlot, updateIns).execute();
PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
selectplotStyleCB.execute(PlotStyle.DOTS);
PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
assertEquals(newStyle, ((IPlot) pencil.createShapeInstance()).getPlotStyle());
assertNotEquals(style, newStyle);
}
Aggregations