use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandPlotStyle method testSelectPOLYGONStyleHand.
@Test
public void testSelectPOLYGONStyleHand() {
new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddPlot, selectionAddPlot, updateIns).execute();
PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
selectplotStyleCB.execute(PlotStyle.POLYGON);
PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
assertEquals(plotStyleCB.getSelectionModel().getSelectedItem(), ((IPlot) drawing.getSelection().getShapeAt(1)).getPlotStyle());
assertEquals(plotStyleCB.getSelectionModel().getSelectedItem(), ((IPlot) drawing.getSelection().getShapeAt(2)).getPlotStyle());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandPlotStyle method testSelectCCURVEStyleHand.
@Test
public void testSelectCCURVEStyleHand() {
new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddPlot, selectionAddPlot, updateIns).execute();
PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
selectplotStyleCB.execute(PlotStyle.CCURVE);
PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
assertEquals(plotStyleCB.getSelectionModel().getSelectedItem(), ((IPlot) drawing.getSelection().getShapeAt(1)).getPlotStyle());
assertEquals(plotStyleCB.getSelectionModel().getSelectedItem(), ((IPlot) drawing.getSelection().getShapeAt(2)).getPlotStyle());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandPlotStyle method testSelectECURVEStyleHand.
@Test
public void testSelectECURVEStyleHand() {
new CompositeGUIVoidCommand(activateHand, selectionAddDot, selectionAddPlot, selectionAddPlot, updateIns).execute();
PlotStyle style = plotStyleCB.getSelectionModel().getSelectedItem();
selectplotStyleCB.execute(PlotStyle.ECURVE);
PlotStyle newStyle = plotStyleCB.getSelectionModel().getSelectedItem();
assertEquals(plotStyleCB.getSelectionModel().getSelectedItem(), ((IPlot) drawing.getSelection().getShapeAt(1)).getPlotStyle());
assertEquals(plotStyleCB.getSelectionModel().getSelectedItem(), ((IPlot) drawing.getSelection().getShapeAt(2)).getPlotStyle());
assertNotEquals(style, newStyle);
}
use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.
the class TestHandPlotStyle 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 TestHandPlotStyle method testControllerActivatedWhenSelectionGrid.
@Test
public void testControllerActivatedWhenSelectionGrid() {
new CompositeGUIVoidCommand(selectionAddPlot, activateHand, updateIns).execute();
assertTrue(ins.isActivated());
assertTrue(titledPane.isVisible());
}
Aggregations