Search this API

y.view
Class Graph2DPrinter.DefaultTitleDrawable

java.lang.Object
  extended by y.view.Graph2DPrinter.DefaultTitleDrawable
All Implemented Interfaces:
Drawable, Graph2DPrinter.TitleDrawable
Enclosing class:
Graph2DPrinter

public static class Graph2DPrinter.DefaultTitleDrawable
extends Object
implements Graph2DPrinter.TitleDrawable

Default title drawable implementation.

 

Constructor Summary
Graph2DPrinter.DefaultTitleDrawable()
           
 
Method Summary
 Rectangle getBounds()
          returns the bounds of this drawable.
 Font getFont()
          Returns the font used in the title.
 Graph2DPrinter.PrintContext getPrintContext()
          Returns the print context of the title.
 String getText()
          Returns the text of the title.
 Color getTextColor()
          Returns the text color used in the title.
 Color getTitleBarColor()
          Returns the title bar color.
 void paint(Graphics2D gfx)
          Paints itself on the given graphics context.
 void setContext(Graph2DPrinter.PrintContext printContext)
          This method will be invoked by the surrounding class to set the PrintContext used for drawing the title.
 void setFont(Font font)
          Sets the font for the title.
 void setPrintContext(Graph2DPrinter.PrintContext printContext)
          Sets the print context for the title.
 void setText(String text)
          Sets the text of the title.
 void setTextColor(Color textColor)
          Sets the text color for the title.
 void setTitleBarColor(Color titleBarColor)
          Sets the title bar color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph2DPrinter.DefaultTitleDrawable

public Graph2DPrinter.DefaultTitleDrawable()
Method Detail

setContext

public void setContext(Graph2DPrinter.PrintContext printContext)
Description copied from interface: Graph2DPrinter.TitleDrawable
This method will be invoked by the surrounding class to set the PrintContext used for drawing the title.

Specified by:
setContext in interface Graph2DPrinter.TitleDrawable

paint

public void paint(Graphics2D gfx)
Description copied from interface: Drawable
Paints itself on the given graphics context.

Specified by:
paint in interface Drawable

getBounds

public Rectangle getBounds()
Description copied from interface: Drawable
returns the bounds of this drawable.

Specified by:
getBounds in interface Drawable

getFont

public Font getFont()
Returns the font used in the title.


setFont

public void setFont(Font font)
Sets the font for the title.

Parameters:
font - The font to set.

getPrintContext

public Graph2DPrinter.PrintContext getPrintContext()
Returns the print context of the title.


setPrintContext

public void setPrintContext(Graph2DPrinter.PrintContext printContext)
Sets the print context for the title.

Parameters:
printContext - The print context to set.

getText

public String getText()
Returns the text of the title.


setText

public void setText(String text)
Sets the text of the title.

Parameters:
text - The text to set.

getTextColor

public Color getTextColor()
Returns the text color used in the title.


setTextColor

public void setTextColor(Color textColor)
Sets the text color for the title.

Parameters:
textColor - The text color to set.

getTitleBarColor

public Color getTitleBarColor()
Returns the title bar color.


setTitleBarColor

public void setTitleBarColor(Color titleBarColor)
Sets the title bar color.

Parameters:
titleBarColor - The title bar color to set.

© Copyright 2000-2011,
yWorks GmbH.
All rights reserved.