com.steema.teechart
Class TextShape

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.Shape
          extended by com.steema.teechart.TextShape
Direct Known Subclasses:
AxisLabelItem, AxisLabels, AxisTitle, Calendar.CalendarCell, LegendTitle, MarksItem, SeriesMarks, TextShapePosition

public class TextShape
extends Shape

Title: TextShape class

Description: Base class for Chart shape elements with text

Copyright (c) 2005-2012 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Field Summary
protected  java.lang.String defaultText
           
 boolean drawText
           
 
Fields inherited from class com.steema.teechart.Shape
bBevel, bBorderRound, bBrush, bImageBevel, bTransparent, defaultVisible, pPen, shadow, shapeBounds, visible
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
TextShape()
           
TextShape(IBaseChart c)
           
 
Method Summary
 void assign(TextShape s)
          Assign all properties from a TextShape to another.
 void drawRectRotated(IGraphics3D g, Rectangle rect, int angle, int aZ)
          Draws the Shape rectangle rotated by Angle degrees.
protected  void drawString(Graphics3D g, int x, int y, int t, int tmpHeight, java.lang.String[] s)
           
protected  void drawText(Graphics3D g, Rectangle rect)
           
 boolean getAutoSize()
           
 ChartFont getFont()
          Determines the font attributes used to output ShapeSeries.
 java.lang.String[] getLines()
          Accesses the array of Text lines.
protected  int getLinesLength()
           
 int getShadowSize()
          Obsolete.
 TextShapeStyle getShapeStyle()
          Shape may be rectagular or rounded rectangular in shape.
 java.lang.String getText()
          Displays customized strings inside Shapes.
 TextFormat getTextFormat()
          Determines if Text is drawn as Normal or HTML styles.
 void paint()
          Paints the TextShape object on the Chart Canvas.
 void paint(Graphics3D g, Rectangle rect)
           
 void paint(IGraphics3D g, Rectangle rect)
          Paints the TextShape object on the Chart Canvas.
protected  java.lang.Object readResolve()
           
 void setAutoSize(boolean value)
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setDrawText(boolean value)
           
 void setLines(java.lang.String[] value)
          Accesses the array of Text lines.
 void setShadowSize(int value)
          Obsolete.
 void setShapeStyle(TextShapeStyle value)
          Shape may be rectagular or rounded rectangular in shape.
 void setText(java.lang.String value)
          Displays customized strings inside Shapes.
 void setTextFormat(TextFormat value)
           
 
Methods inherited from class com.steema.teechart.Shape
assign, getBevel, getBevelInner, getBevelOuter, getBevelWidth, getBorderRound, getBottom, getBrush, getColor, getGradient, getHeight, getImage, getImageBevel, getImageMode, getImageTransparent, getLeft, getPen, getRight, getShadow, getShapeBounds, getTop, getTransparency, getTransparent, getVisible, getWidth, setBevel, setBevelInner, setBevelOuter, setBevelWidth, setBorderRound, setBottom, setBrush, setColor, setDefaultVisible, setHeight, setImage, setImageMode, setImageTransparent, setLeft, setPen, setRight, setShapeBounds, setTop, setTransparency, setTransparent, setVisible, setWidth
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

drawText

public transient boolean drawText

defaultText

protected transient java.lang.String defaultText
Constructor Detail

TextShape

public TextShape()

TextShape

public TextShape(IBaseChart c)
Method Detail

readResolve

protected java.lang.Object readResolve()

setChart

public void setChart(IBaseChart c)
Description copied from class: Shape
Chart associated with this object.

Overrides:
setChart in class Shape
Parameters:
c - IBaseChart

getShapeStyle

public TextShapeStyle getShapeStyle()
Shape may be rectagular or rounded rectangular in shape.
Default value: TextShapeStyle.Rectangle

Returns:
TextShapeStyle

setDrawText

public void setDrawText(boolean value)
Parameters:
value -

setShapeStyle

public void setShapeStyle(TextShapeStyle value)
Shape may be rectagular or rounded rectangular in shape.
Default value: TextShapeStyle.Rectangle

Parameters:
value - TextShapeStyle

getTextFormat

public TextFormat getTextFormat()
Determines if Text is drawn as Normal or HTML styles. Default value: TextFormat.Normal


setTextFormat

public void setTextFormat(TextFormat value)

getShadowSize

public int getShadowSize()
Obsolete. Please use Shadow.Size.

Returns:
int

setShadowSize

public void setShadowSize(int value)
Obsolete. Please use Shadow.Size.

Parameters:
value - int

getLinesLength

protected int getLinesLength()

getText

public java.lang.String getText()
Displays customized strings inside Shapes.
You can use Font and Aligment to control Text display.

Note: You would maybe need to change Shape Font size to a different value when creating metafiles or when zooming Charts.

Returns:
String

setText

public void setText(java.lang.String value)
Displays customized strings inside Shapes.

Parameters:
value - String

getLines

public java.lang.String[] getLines()
Accesses the array of Text lines.
Use lines to add multiline text to TeeChart's text objects (TeeChart Header, TeeChart Axis Titles etc.).
Default value: null

Returns:
String[]

setLines

public void setLines(java.lang.String[] value)
Accesses the array of Text lines.
Default value: null

Parameters:
value - String[]

getFont

public ChartFont getFont()
Determines the font attributes used to output ShapeSeries.Text Strings.

Returns:
ChartFont

assign

public void assign(TextShape s)
Assign all properties from a TextShape to another.

Parameters:
s - TextShape

paint

public void paint()
Paints the TextShape object on the Chart Canvas.


paint

public void paint(Graphics3D g,
                  Rectangle rect)

drawText

protected void drawText(Graphics3D g,
                        Rectangle rect)

drawString

protected void drawString(Graphics3D g,
                          int x,
                          int y,
                          int t,
                          int tmpHeight,
                          java.lang.String[] s)

paint

public void paint(IGraphics3D g,
                  Rectangle rect)
Paints the TextShape object on the Chart Canvas.

Overrides:
paint in class Shape
Parameters:
g - IGraphics3D
rect - Rectangle

drawRectRotated

public void drawRectRotated(IGraphics3D g,
                            Rectangle rect,
                            int angle,
                            int aZ)
Draws the Shape rectangle rotated by Angle degrees.

Parameters:
g - IGraphics3D
rect - Rectangle
angle - int
aZ - int

getAutoSize

public boolean getAutoSize()

setAutoSize

public void setAutoSize(boolean value)