Search in sources :

Example 26 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestHandTextStyle method testSelectBRPencil.

@Test
public void testSelectBRPencil() {
    new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
    clickOnbrButton.execute();
    assertEquals(TextPosition.BOT_RIGHT, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
    assertEquals(TextPosition.BOT_RIGHT, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
    assertTrue(brButton.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 27 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestHandTextStyle method testSelectBPencil.

@Test
public void testSelectBPencil() {
    new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
    clickOnbButton.execute();
    assertEquals(TextPosition.BOT, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
    assertEquals(TextPosition.BOT, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
    assertTrue(bButton.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 28 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestHandTextStyle method testSelectTRPencil.

@Test
public void testSelectTRPencil() {
    new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
    clickOntrButton.execute();
    assertEquals(TextPosition.TOP_RIGHT, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
    assertEquals(TextPosition.TOP_RIGHT, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
    assertTrue(trButton.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 29 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestHandTextStyle method testSelectTPencil.

@Test
public void testSelectTPencil() {
    new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
    clickOntButton.execute();
    assertEquals(TextPosition.TOP, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
    assertEquals(TextPosition.TOP, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
    assertTrue(tButton.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Example 30 with CompositeGUIVoidCommand

use of net.sf.latexdraw.instruments.CompositeGUIVoidCommand in project latexdraw by arnobl.

the class TestHandTextStyle method testSelectCentrePencil.

@Test
public void testSelectCentrePencil() {
    new CompositeGUIVoidCommand(activateHand, selectionAddText, selectionAddGrid, selectionAddText, updateIns).execute();
    clickOncentreButton.execute();
    assertEquals(TextPosition.CENTER, ((IText) drawing.getSelection().getShapeAt(0)).getTextPosition());
    assertEquals(TextPosition.CENTER, ((IText) drawing.getSelection().getShapeAt(2)).getTextPosition());
    assertTrue(centreButton.isSelected());
}
Also used : CompositeGUIVoidCommand(net.sf.latexdraw.instruments.CompositeGUIVoidCommand) Test(org.junit.Test)

Aggregations

CompositeGUIVoidCommand (net.sf.latexdraw.instruments.CompositeGUIVoidCommand)218 Test (org.junit.Test)218 ArrowStyle (net.sf.latexdraw.models.interfaces.shape.ArrowStyle)34 IArrowableSingleShape (net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape)34 Color (javafx.scene.paint.Color)20 PlotStyle (net.sf.latexdraw.models.interfaces.shape.PlotStyle)12 IGrid (net.sf.latexdraw.models.interfaces.shape.IGrid)4 PlottingStyle (net.sf.latexdraw.models.interfaces.shape.PlottingStyle)4 AxesStyle (net.sf.latexdraw.models.interfaces.shape.AxesStyle)2 BorderPos (net.sf.latexdraw.models.interfaces.shape.BorderPos)2 FillingStyle (net.sf.latexdraw.models.interfaces.shape.FillingStyle)2 IDot (net.sf.latexdraw.models.interfaces.shape.IDot)2 LineStyle (net.sf.latexdraw.models.interfaces.shape.LineStyle)2 TicksStyle (net.sf.latexdraw.models.interfaces.shape.TicksStyle)2 DotStyle (net.sf.latexdraw.models.interfaces.shape.DotStyle)1