Codota Logo
ShortTextTitle.getText
Code IndexAdd Codota to your IDE (free)

How to use
getText
method
in
org.jfree.chart.title.ShortTextTitle

Best Java code snippets using org.jfree.chart.title.ShortTextTitle.getText (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: jfree/jfreechart

/**
 * Arranges the content for this title assuming a fixed width and no bounds
 * on the height, and returns the required size.  This will reflect the
 * fact that a text title positioned on the left or right of a chart will
 * be rotated by 90 degrees.
 *
 * @param g2  the graphics target.
 * @param w  the width.
 *
 * @return The content size.
 */
@Override
protected Size2D arrangeFN(Graphics2D g2, double w) {
  g2.setFont(getFont());
  FontMetrics fm = g2.getFontMetrics(getFont());
  Rectangle2D bounds = TextUtils.getTextBounds(getText(), g2, fm);
  if (bounds.getWidth() <= w) {
    return new Size2D(w, bounds.getHeight());
  }
  else {
    return new Size2D(0.0, 0.0);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Arranges the content for this title assuming a fixed width and no bounds
 * on the height, and returns the required size.  This will reflect the
 * fact that a text title positioned on the left or right of a chart will
 * be rotated by 90 degrees.
 *
 * @param g2  the graphics target.
 * @param w  the width.
 *
 * @return The content size.
 */
protected Size2D arrangeFN(Graphics2D g2, double w) {
  g2.setFont(getFont());
  FontMetrics fm = g2.getFontMetrics(getFont());
  Rectangle2D bounds = TextUtilities.getTextBounds(getText(), g2, fm);
  if (bounds.getWidth() <= w) {
    return new Size2D(w, bounds.getHeight());
  }
  else {
    return new Size2D(0.0, 0.0);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the content size for the title.
 *
 * @param g2  the graphics device.
 * @param widthRange  the width range.
 * @param heightRange  the height range.
 *
 * @return The content size.
 */
protected Size2D arrangeRR(Graphics2D g2, Range widthRange,
    Range heightRange) {
  g2.setFont(getFont());
  FontMetrics fm = g2.getFontMetrics(getFont());
  Rectangle2D bounds = TextUtilities.getTextBounds(getText(), g2, fm);
  if (bounds.getWidth() <= widthRange.getUpperBound()
      && bounds.getHeight() <= heightRange.getUpperBound()) {
    return new Size2D(bounds.getWidth(), bounds.getHeight());
  }
  else {
    return new Size2D(0.0, 0.0);
  }
}
origin: jfree/jfreechart

/**
 * Returns the content size for the title.
 *
 * @param g2  the graphics device.
 * @param widthRange  the width range.
 * @param heightRange  the height range.
 *
 * @return The content size.
 */
@Override
protected Size2D arrangeRR(Graphics2D g2, Range widthRange,
    Range heightRange) {
  g2.setFont(getFont());
  FontMetrics fm = g2.getFontMetrics(getFont());
  Rectangle2D bounds = TextUtils.getTextBounds(getText(), g2, fm);
  if (bounds.getWidth() <= widthRange.getUpperBound()
      && bounds.getHeight() <= heightRange.getUpperBound()) {
    return new Size2D(bounds.getWidth(), bounds.getHeight());
  }
  else {
    return new Size2D(0.0, 0.0);
  }
}
origin: jfree/jfreechart

/**
 * Draws the title using the current font and paint.
 *
 * @param g2  the graphics target.
 * @param area  the title area.
 * @param params  optional parameters (ignored here).
 *
 * @return {@code null}.
 */
@Override
public Object draw(Graphics2D g2, Rectangle2D area, Object params) {
  if (area.isEmpty()) {
    return null;
  }
  area = trimMargin(area);
  drawBorder(g2, area);
  area = trimBorder(area);
  area = trimPadding(area);
  g2.setFont(getFont());
  g2.setPaint(getPaint());
  TextUtils.drawAlignedString(getText(), g2, (float) area.getMinX(),
      (float) area.getMinY(), TextAnchor.TOP_LEFT);
  return null;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Draws the title using the current font and paint.
 *
 * @param g2  the graphics target.
 * @param area  the title area.
 * @param params  optional parameters (ignored here).
 *
 * @return <code>null</code>.
 */
public Object draw(Graphics2D g2, Rectangle2D area, Object params) {
  if (area.isEmpty()) {
    return null;
  }
  area = trimMargin(area);
  drawBorder(g2, area);
  area = trimBorder(area);
  area = trimPadding(area);
  g2.setFont(getFont());
  g2.setPaint(getPaint());
  TextUtilities.drawAlignedString(getText(), g2, (float) area.getMinX(),
      (float) area.getMinY(), TextAnchor.TOP_LEFT);
  return null;
}
org.jfree.chart.titleShortTextTitlegetText

Popular methods of ShortTextTitle

  • arrangeFN
    Arranges the content for this title assuming a fixed width and no bounds on the height, and returns
  • arrangeNN
    Arranges the content for this title assuming no bounds on the width or the height, and returns the r
  • arrangeRN
    Arranges the content for this title assuming a range constraint for the width and no bounds on the h
  • arrangeRR
    Returns the content size for the title.
  • calculateTotalHeight
  • calculateTotalWidth
  • drawBorder
  • getFont
  • getPaint
  • setText
  • toContentConstraint
  • trimBorder
  • toContentConstraint,
  • trimBorder,
  • trimMargin,
  • trimPadding,
  • <init>

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ImageIO (javax.imageio)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now