Examples of IText


Examples of ag.ion.bion.officelayer.text.IText

      textTable.getCell(0,0).setValue(12412);
      textTable.getCell(0,1).setValue(4444444);
     
      // to place text in a cell we need the text service of the individual cell.
      ITextService textService = textTable.getCell(0,2).getTextService();
      IText cellText = textService.getText();
      cellText.setText("Hello World!");
     
      // so now that we have seen it in detail, there is no problem in doing
      // it the short way.
      textTable.getCell(2,2).getTextService().getText().setText("A");
      textTable.getCell(3,2).getTextService().getText().setText("Simple");
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

  }


  @Test public void testShape3() {
    assertTrue(group.getShapeAt(3) instanceof IText);
    IText txt = (IText) group.getShapeAt(3);
    assertEquals(Color.BLACK, txt.getLineColour());
    assertEquals("\\emph{\\textbf{\\scriptsize{Correspondance de schémas}}}", txt.getText()); //$NON-NLS-1$
    assertEquals(210.585929, txt.getPosition().getX(), 0.00001);
    assertEquals(61.859375, txt.getPosition().getY(), 0.00001);
    assertEquals(TextPosition.BOT_LEFT, txt.getTextPosition());
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

import org.junit.Test;

public class TestTextParsing extends TestPSTParser {
  @Test
  public void testBugParenthesis() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("{( )}").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertEquals("( )", txt.getText()); //$NON-NLS-1$
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

    assertTrue(group.getShapeAt(0) instanceof IText);
    assertEquals("\\textit{coucou}", ((IText)group.getShapeAt(0)).getText()); //$NON-NLS-1$
  }

  @Test @Ignore public void testText_withDots() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("0..n").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals("0..n", txt.getText()); //$NON-NLS-1$
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

    IText txt = (IText)parser.parsePSTCode("0..n").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals("0..n", txt.getText()); //$NON-NLS-1$
  }

  @Test @Ignore public void testText_withCommas() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("0,fi,n,,a , b").get().getShapeAt(0); //$NON-NLS-1$
    assertEquals("0,fi,n,,a , b", txt.getText()); //$NON-NLS-1$
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

    assertTrue(((IText)gp.getShapeAt(2)).getText().contains("\\bf")); //$NON-NLS-1$
    assertTrue(((IText)gp.getShapeAt(2)).getText().contains("cc")); //$NON-NLS-1$
  }

  @Test public void testText_when2usefontsTheLatestIsUsed2() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("\\usefont{T1}{ptm}{m}{n}\n aa"+ //$NON-NLS-1$
            "\\usefont{T1}{ptm}{b}{it}\n bb").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertTrue(txt.getText().contains("usefont{T1}{ptm}{m}{n}")); //$NON-NLS-1$
    assertTrue(txt.getText().contains("usefont{T1}{ptm}{b}{it}")); //$NON-NLS-1$
    assertTrue(txt.getText().contains("aa")); //$NON-NLS-1$
    assertTrue(txt.getText().contains("bb")); //$NON-NLS-1$
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

    assertTrue(txt.getText().contains("bb")); //$NON-NLS-1$
  }


  @Test public void testTextWithSpecialColour() throws ParseException {
    IText txt = (IText)parser.parsePSTCode("\\definecolor{color0}{rgb}{0.5,0.5,0.5}\\color{color0}couocu").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertNotNull(txt);
    assertEquals(new Color(0.5f,0.5f,0.5f), txt.getLineColour());
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

  @Test public void testBug722075_3() throws ParseException {
    // https://bugs.launchpad.net/latexdraw/+bug/722075
    IGroup group = parser.parsePSTCode("\\textcolor{blue}{xyz} foobar").get(); //$NON-NLS-1$
    assertEquals(2, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = (IText)group.getShapeAt(0);
    assertEquals("foobar", text.getText()); //$NON-NLS-1$
    assertEquals(Color.BLACK, text.getLineColour());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

  @Test public void testBug722075_2() throws ParseException {
    // https://bugs.launchpad.net/latexdraw/+bug/722075
    IGroup group = parser.parsePSTCode("\\textcolor{blue}{xyz}").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = (IText)group.getShapeAt(0);
    assertEquals("xyz", text.getText()); //$NON-NLS-1$
    assertEquals(Color.BLUE, text.getLineColour());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IText

  @Test public void testBug722075_1() throws ParseException {
    // https://bugs.launchpad.net/latexdraw/+bug/722075
    IGroup group = parser.parsePSTCode("\\color{blue} xyz").get(); //$NON-NLS-1$
    assertEquals(1, group.size());
    assertTrue(group.getShapeAt(0) instanceof IText);
    IText text = (IText)group.getShapeAt(0);
    assertEquals("xyz", text.getText()); //$NON-NLS-1$
    assertEquals(Color.BLUE, text.getLineColour());
    assertTrue(PSTParser.errorLogs().isEmpty());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.