Save This Page
Home » jcommon-1.0.13 » org.jfree » chart » title » [javadoc | source]
org.jfree.chart.title
public class: TextTitle [javadoc | source]
java.lang.Object
   org.jfree.chart.block.AbstractBlock
      org.jfree.chart.title.Title
         org.jfree.chart.title.TextTitle

All Implemented Interfaces:
    PublicCloneable, Cloneable, Serializable, Block

Direct Known Subclasses:
    ShortTextTitle, DateTitle

A chart title that displays a text string with automatic wrapping as required.
Field Summary
public static final  Font DEFAULT_FONT    The default font. 
public static final  Paint DEFAULT_TEXT_PAINT    The default text color. 
Fields inherited from org.jfree.chart.title.Title:
DEFAULT_POSITION,  DEFAULT_HORIZONTAL_ALIGNMENT,  DEFAULT_VERTICAL_ALIGNMENT,  DEFAULT_PADDING
Constructor:
 public TextTitle() 
 public TextTitle(String text) 
    Creates a new title, using default attributes where necessary.
    Parameters:
    text - the title text (null not permitted).
 public TextTitle(String text,
    Font font) 
    Creates a new title, using default attributes where necessary.
    Parameters:
    text - the title text (null not permitted).
    font - the title font (null not permitted).
 public TextTitle(String text,
    Font font,
    Paint paint,
    RectangleEdge position,
    HorizontalAlignment horizontalAlignment,
    VerticalAlignment verticalAlignment,
    RectangleInsets padding) 
    Creates a new title.
    Parameters:
    text - the text for the title (null not permitted).
    font - the title font (null not permitted).
    paint - the title paint (null not permitted).
    position - the title position (null not permitted).
    horizontalAlignment - the horizontal alignment (null not permitted).
    verticalAlignment - the vertical alignment (null not permitted).
    padding - the space to leave around the outside of the title.
Method from org.jfree.chart.title.TextTitle Summary:
arrange,   arrangeFN,   arrangeNN,   arrangeRN,   arrangeRR,   clone,   draw,   draw,   drawHorizontal,   drawVertical,   equals,   getBackgroundPaint,   getExpandToFitSpace,   getFont,   getMaximumLinesToDisplay,   getPaint,   getText,   getTextAlignment,   getToolTipText,   getURLText,   hashCode,   setBackgroundPaint,   setExpandToFitSpace,   setFont,   setMaximumLinesToDisplay,   setPaint,   setText,   setTextAlignment,   setToolTipText,   setURLText
Methods from org.jfree.chart.title.Title:
addChangeListener,   clone,   draw,   equals,   getHorizontalAlignment,   getNotify,   getPosition,   getVerticalAlignment,   hashCode,   notifyListeners,   removeChangeListener,   setHorizontalAlignment,   setNotify,   setPosition,   setVerticalAlignment
Methods from org.jfree.chart.block.AbstractBlock:
arrange,   arrange,   calculateTotalHeight,   calculateTotalWidth,   clone,   drawBorder,   equals,   getBorder,   getBounds,   getContentXOffset,   getContentYOffset,   getFrame,   getHeight,   getID,   getMargin,   getPadding,   getWidth,   setBorder,   setBorder,   setBounds,   setFrame,   setHeight,   setID,   setMargin,   setMargin,   setPadding,   setPadding,   setWidth,   toContentConstraint,   trimBorder,   trimMargin,   trimPadding,   trimToContentHeight,   trimToContentWidth
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.chart.title.TextTitle Detail:
 public Size2D arrange(Graphics2D g2,
    RectangleConstraint constraint) 
    Arranges the contents of the block, within the given constraints, and returns the block size.
 protected Size2D arrangeFN(Graphics2D g2,
    double w) 
    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.
 protected Size2D arrangeNN(Graphics2D g2) 
    Arranges the content for this title assuming no bounds on the width or 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.
 protected Size2D arrangeRN(Graphics2D g2,
    Range widthRange) 
    Arranges the content for this title assuming a range constraint for the 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.
 protected Size2D arrangeRR(Graphics2D g2,
    Range widthRange,
    Range heightRange) 
    Returns the content size for the title. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated 90 degrees.
 public Object clone() throws CloneNotSupportedException 
    Returns a clone of this object.
 public  void draw(Graphics2D g2,
    Rectangle2D area) 
    Draws the title on a Java 2D graphics device (such as the screen or a printer).
 public Object draw(Graphics2D g2,
    Rectangle2D area,
    Object params) 
    Draws the block within the specified area.
 protected  void drawHorizontal(Graphics2D g2,
    Rectangle2D area) 
    Draws a the title horizontally within the specified area. This method will be called from the draw method.
 protected  void drawVertical(Graphics2D g2,
    Rectangle2D area) 
    Draws a the title vertically within the specified area. This method will be called from the draw method.
 public boolean equals(Object obj) 
    Tests this title for equality with another object.
 public Paint getBackgroundPaint() 
    Returns the background paint.
 public boolean getExpandToFitSpace() 
    Returns the flag that controls whether or not the title expands to fit the available space.
 public Font getFont() 
    Returns the font used to display the title string.
 public int getMaximumLinesToDisplay() 
    Returns the maximum number of lines to display.
 public Paint getPaint() 
    Returns the paint used to display the title string.
 public String getText() 
    Returns the title text.
 public HorizontalAlignment getTextAlignment() 
    Returns the text alignment. This controls how the text is aligned within the title's bounds, whereas the title's horizontal alignment controls how the title's bounding rectangle is aligned within the drawing space.
 public String getToolTipText() 
    Returns the tool tip text.
 public String getURLText() 
    Returns the URL text.
 public int hashCode() 
    Returns a hash code.
 public  void setBackgroundPaint(Paint paint) 
    Sets the background paint and sends a TitleChangeEvent to all registered listeners. If you set this attribute to null, no background is painted (which makes the title background transparent).
 public  void setExpandToFitSpace(boolean expand) 
    Sets the flag that controls whether the title expands to fit the available space, and sends a TitleChangeEvent to all registered listeners.
 public  void setFont(Font font) 
    Sets the font used to display the title string. Registered listeners are notified that the title has been modified.
 public  void setMaximumLinesToDisplay(int max) 
    Sets the maximum number of lines to display and sends a TitleChangeEvent to all registered listeners.
 public  void setPaint(Paint paint) 
    Sets the paint used to display the title string. Registered listeners are notified that the title has been modified.
 public  void setText(String text) 
    Sets the title to the specified text and sends a TitleChangeEvent to all registered listeners.
 public  void setTextAlignment(HorizontalAlignment alignment) 
    Sets the text alignment and sends a TitleChangeEvent to all registered listeners.
 public  void setToolTipText(String text) 
    Sets the tool tip text to the specified text and sends a TitleChangeEvent to all registered listeners.
 public  void setURLText(String text) 
    Sets the URL text to the specified text and sends a TitleChangeEvent to all registered listeners.