Package org.tinyuml.draw.MultilineLayouter

Examples of org.tinyuml.draw.MultilineLayouter.MultilineLayout


  /**
   * {@inheritDoc}
   */
  public void insertUpdate(DocumentEvent e) {
    // Here we need to implement the resizing method
    MultilineLayout layout = MultilineLayouter.getInstance().calculateLayout(
      ((Graphics2D) getGraphics()).getFontRenderContext(), getFont(),
      getText(), getSize().getWidth());
    Dimension2D size2D = layout.getSize();
    Dimension size = new Dimension((int) size2D.getWidth(),
      (int) size2D.getHeight() + MAGIC_OFFSET);
    setSize(size);
  }
View Full Code Here


  /**
   * {@inheritDoc}
   */
  public void insertUpdate(DocumentEvent e) {
    // Here we need to implement the resizing method
    MultilineLayout layout = MultilineLayouter.getInstance().calculateLayout(
      ((Graphics2D) getGraphics()).getFontRenderContext(), getFont(),
      getText(), getSize().getWidth());
    Dimension2D size2D = layout.getSize();
    Dimension size = new Dimension((int) size2D.getWidth(),
      (int) size2D.getHeight() + MAGIC_OFFSET);
    setSize(size);
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.draw.MultilineLayouter.MultilineLayout

Copyright © 2018 www.massapicom. 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.