Examples of TextLine


Examples of org.jfree.text.TextLine

     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {
       
        final TextBlock b1 = new TextBlock();
        b1.addLine(new TextLine("Test"));
        final TextBlock b2 = new TextBlock();
        b2.addLine(new TextLine("Test"));
        assertTrue(b1.equals(b2));
        assertTrue(b2.equals(b1));

    }
View Full Code Here

Examples of org.jfree.text.TextLine

     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        final TextBlock b1 = new TextBlock();
        b1.addLine(new TextLine("Test"));
        TextBlock b2 = null;

        try {
            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            final ObjectOutput out = new ObjectOutputStream(buffer);
View Full Code Here

Examples of org.jfree.text.TextLine

        b2.setShadowYOffset(1.0);
        assertTrue(b1.equals(b2));
       
        // textBlock
        final TextBlock tb1 = new TextBlock();
        tb1.addLine(new TextLine("Testing"));
        b1.setTextBlock(tb1);
        assertFalse(b1.equals(b2));
        final TextBlock tb2 = new TextBlock();
        tb2.addLine(new TextLine("Testing"));
        b2.setTextBlock(tb2);
        assertTrue(b1.equals(b2));
       
    }
View Full Code Here

Examples of org.jfree.text.TextLine

    public void testEquals() {
       
        Comparable c1 = "C1";
        Comparable c2 = "C2";
        TextBlock tb1 = new TextBlock();
        tb1.addLine(new TextLine("Block 1"));
        TextBlock tb2 = new TextBlock();
        tb1.addLine(new TextLine("Block 2"));
        TextBlockAnchor tba1 = TextBlockAnchor.CENTER;
        TextBlockAnchor tba2 = TextBlockAnchor.BOTTOM_CENTER;
        TextAnchor ta1 = TextAnchor.CENTER;
        TextAnchor ta2 = TextAnchor.BASELINE_LEFT;
       
View Full Code Here

Examples of org.jfree.text.TextLine

                                    RectangleEdge edge, Graphics2D g2) {
        TextBlock label = super.createLabel(category, width, edge, g2);  
        String s = (String) this.sublabels.get(category);
        if (s != null) {
            if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
                TextLine line = new TextLine(s, this.sublabelFont, this.sublabelPaint);
                label.addLine(line);
            }
            else if (edge == RectangleEdge.LEFT || edge == RectangleEdge.RIGHT) {
                TextLine line = label.getLastLine();
                if (line != null) {
                    line.addFragment(
                        new TextFragment("  " + s, this.sublabelFont, this.sublabelPaint)
                    );
                }
            }
        }
View Full Code Here

Examples of org.kite9.diagram.adl.TextLine

      final Layout d, final Label l) {
    return new NounFormat() {
      public Connected returnElement(Container c, SimpleNoun to,
          InsertionInterface ii) {
        Label toUse = (l == null) ? (to.getLabel() == null ? null
            : new TextLine(to.getLabel())) : l;
        DiagramElement de = ii.returnContext(c, to, border ? toUse
            : null, border, d);
        if (de instanceof Connected) {
          return (Connected) de;
        } else {
View Full Code Here

Examples of org.kite9.diagram.adl.TextLine

          boolean arrowPreExists = ii.returnExisting(sr) instanceof Arrow;
         
          DiagramElement arrowEl = ii.returnConnectionBody(cont, sr,
              (String) activeVerb.getObjectForAlias());
          String fromLabel = getLabel(subject, from, ii);
          TextLine fromLabelTL = fromLabel.length() == 0 ? null
              : new TextLine(fromLabel);
          String toLabel = getLabel(object, to, ii);
          TextLine toLabelTL = toLabel.length() == 0 ? null
              : new TextLine(toLabel);

          Direction direction = d == null ? activeVerb.getDirection()
              : d;
          if (verb.getType() == RelationshipType.PASSIVE) {
            ii.returnConnection(toEl, arrowEl, or, toLabelTL, null, false, direction);
View Full Code Here

Examples of org.kite9.diagram.adl.TextLine

    Glyph hf = new Glyph("harrison_ford","Actor","Harrison Ford", null, null);
    Glyph rs = new Glyph("ridley_scott", "Director", "Ridley Scott", null, null);
    Arrow ww = new Arrow("worked_with", "worked with");
   
    new Link(ww, hf, LinkEndStyle.ARROW, null, LinkEndStyle.ARROW, null);
    new Link(ww, rs, null, new TextLine("label 1"), null, new TextLine("label 2"));
   
    Diagram d1 = new Diagram("my_diagram", listOf(hf, rs, ww), null);
    return d1;
  }
View Full Code Here

Examples of org.kite9.diagram.adl.TextLine

public class SimpleDiagramSymbolsAndTextLines {

  @Kite9Item
  public Diagram simpleDiagramWithSymbolsAndTextLines() {
    Symbol s = new Symbol("Brother of Tony Scott", 'T', SymbolShape.CIRCLE);
    Glyph rs = new Glyph("Director", "Ridley Scott", createList(new TextLine("Directed: Thelma & Louise"), new TextLine("Directed: Gladiator")),
        createList(s));
    Diagram d1 = new Diagram("my_diagram", listOf(rs), new Key("Big Movies", "", createList(s)));
    return d1;
  }
View Full Code Here

Examples of org.kite9.diagram.adl.TextLine

      Arrow ww = new Arrow("worked_with", "worked with");
     
      new Link(ww, hf, null, null, null, null, Direction.RIGHT);
      new Link(ww, rs);

      Context bladerunner = new Context("bladerunner", listOf(hf, rs, ww), true, new TextLine("Bladerunner"), null);

     
      Diagram d1 = new Diagram("my_diagram", listOf(bladerunner), null);
      return d1;
   
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.