com.steema.teechart
Class Shape

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.Shape
Direct Known Subclasses:
Panel, SeriesMarksSymbols, TextShape, Wall

public class Shape
extends TeeBase

Title: Shape class

Description: Base class for Chart Shape elements

Example:

 
           //shape1
 tmpSeries = new Shape(myChart.getChart());
 tmpSeries.getMarks().setVisible(false);
 tmpSeries.setColor(Color.WHITE);
 tmpSeries.getBrush().setColor(Color.WHITE);
 tmpSeries.getFont().setColor(Color.NAVY);
 tmpSeries.getFont().getShadow().setHorizSize(1);
 tmpSeries.getFont().getShadow().setVertSize(1);
 tmpSeries.getGradient().setDirection(GradientDirection.HORIZONTAL);
 tmpSeries.getGradient().setMiddleColor(Color.GREEN_YELLOW);
 tmpSeries.getGradient().setUseMiddle(true);
 tmpSeries.getGradient().setVisible(true);
 tmpSeries.setStyle(ShapeStyle.CIRCLE);
 tmpSeries.setText(new String[] {"This is an ellipse"});
 tmpSeries.setX0(60);
 tmpSeries.setX1(100);
 tmpSeries.setY1(100);
           //shape2
 tmpSeries = new Shape(myChart.getChart());
 tmpSeries.getMarks().setVisible(false);
 tmpSeries.setColor(Color.PURPLE);
 tmpSeries.getBrush().setColor(Color.PURPLE);
 tmpSeries.setText(new String[] {"This is a round rectangle."});
 tmpSeries.setStyle(ShapeStyle.RECTANGLE);
 tmpSeries.getFormat().setShapeStyle(TextShapeStyle.ROUNDRECTANGLE);
 tmpSeries.setX0(12.5);
 tmpSeries.setX1(47.5);
 tmpSeries.setY0(140);
 tmpSeries.setY1(80);
 
 

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

Company: Steema Software SL


Field Summary
protected  Bevel bBevel
           
protected  int bBorderRound
           
protected  ChartBrush bBrush
           
protected  ImageBevel bImageBevel
           
protected  boolean bTransparent
           
protected  boolean defaultVisible
           
protected  ChartPen pPen
           
protected  Shadow shadow
           
protected  Rectangle shapeBounds
           
protected  boolean visible
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
Shape()
           
Shape(IBaseChart c)
           
 
Method Summary
 void assign(Shape s)
          Assign all properties from a shape to another.
 Bevel getBevel()
          Sets the bevel characteristics of the Shape.
 BevelStyle getBevelInner()
          Obsolete.
 BevelStyle getBevelOuter()
          Obsolete.
 int getBevelWidth()
          Obsolete.
 int getBorderRound()
          Rounds the Borders of the Chart Shapes.
 int getBottom()
          Shape rectangle bottom co-ordinate.
 ChartBrush getBrush()
          Defines the kind of brush used to fill shape background.
 Color getColor()
          Defines the shape Color.
 Gradient getGradient()
          Calls the Gradient characteristics for the shape.
 int getHeight()
          The Height of the Shape.
 Image getImage()
          Rendered Image for Shape background.
 ImageBevel getImageBevel()
          Sets the bevel characteristics of the Shape.
 ImageMode getImageMode()
          ImageMode for rendered Shape background Image.
 boolean getImageTransparent()
          Sets the shape image to transparent.
 int getLeft()
          Shape rectangle left co-ordinate.
 ChartPen getPen()
          Specifies the pen used to draw the shape.
 int getRight()
          Shape rectangle right co-ordinate.
 Shadow getShadow()
          Defines the shape's Shadow characteristics.
 Rectangle getShapeBounds()
          Defines the boundaries of the Shape.
 int getTop()
          Shape rectangle top co-ordinate.
 int getTransparency()
          The Transparency level from 0 to 100% of shape.
 boolean getTransparent()
          Enables/disables transparency of shape.
 boolean getVisible()
          Shows or hides the Shape.
 int getWidth()
          The Width of the shape.
 void paint(IGraphics3D g, Rectangle rect)
           
 void setBevel(Bevel value)
          Internal use - serialization
 void setBevelInner(BevelStyle value)
          Defines the inner bevel type of the TChart Panel border.
 void setBevelOuter(BevelStyle value)
          Defines the outer bevel type of the TChart Panel border.
 void setBevelWidth(int value)
          Obsolete.
 void setBorderRound(int value)
          Rounds the Borders of the Chart Shapes.
 void setBottom(int value)
          Shape rectangle bottom co-ordinate.
 void setBrush(ChartBrush value)
          Internal use - serialization
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setColor(Color value)
          Defines the shape Color.
 void setDefaultVisible(boolean value)
           
 void setHeight(int value)
          Sets the Height of the Shape.
 void setImage(Image value)
          Sets Rendered Image for Shape background.
 void setImageMode(ImageMode value)
          Sets the ImageMode for rendered Shape background Image.
 void setImageTransparent(boolean value)
          Sets the shape image to transparent.
 void setLeft(int value)
          Shape rectangle left co-ordinate.
 void setPen(ChartPen value)
          Internal use - serialization
 void setRight(int value)
          Shape rectangle right co-ordinate.
 void setShapeBounds(Rectangle value)
          Defines the boundaries of the Shape.
 void setTop(int value)
          Shape rectangle top co-ordinate.
 void setTransparency(int value)
          Sets Transparency level from 0 to 100% of shape.
 void setTransparent(boolean value)
          Enables/disables transparency of shape.
 void setVisible(boolean value)
          Shows or hides the Shape.
 void setWidth(int value)
          Sets the Width of the shape.
 
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

defaultVisible

protected transient boolean defaultVisible

visible

protected boolean visible

bTransparent

protected boolean bTransparent

pPen

protected ChartPen pPen

bBevel

protected Bevel bBevel

shadow

protected Shadow shadow

bImageBevel

protected ImageBevel bImageBevel

bBrush

protected ChartBrush bBrush

shapeBounds

protected Rectangle shapeBounds

bBorderRound

protected int bBorderRound
Constructor Detail

Shape

public Shape()

Shape

public Shape(IBaseChart c)
Method Detail

getShapeBounds

public Rectangle getShapeBounds()
Defines the boundaries of the Shape.

Returns:
Rectangle

setShapeBounds

public void setShapeBounds(Rectangle value)
Defines the boundaries of the Shape.

Parameters:
value - Rectangle

getBevelInner

public BevelStyle getBevelInner()
Obsolete.&ndsp;Please use Bevel.Inner.

Returns:
BevelStyle

setBevelInner

public void setBevelInner(BevelStyle value)
Defines the inner bevel type of the TChart Panel border.
Available types:
None
Lowered
Raised

Parameters:
value - BevelStyle

getBevelWidth

public int getBevelWidth()
Obsolete. Please use Bevel.Width

Returns:
int

setBevelWidth

public void setBevelWidth(int value)
Obsolete. Please use Bevel.Width

Parameters:
value - int

getBevelOuter

public BevelStyle getBevelOuter()
Obsolete. Please use Bevel.Outer

Returns:
BevelStyle

setBevelOuter

public void setBevelOuter(BevelStyle value)
Defines the outer bevel type of the TChart Panel border.
Available types:
None
Lowered
Raised

Parameters:
value - BevelStyle

setChart

public void setChart(IBaseChart c)
Chart associated with this object.

Overrides:
setChart in class TeeBase
Parameters:
c - IBaseChart

getImageBevel

public ImageBevel getImageBevel()
Sets the bevel characteristics of the Shape.

Returns:
ImageBevel

getBevel

public Bevel getBevel()
Sets the bevel characteristics of the Shape.

Returns:
Bevel

setBevel

public void setBevel(Bevel value)
Internal use - serialization


getShadow

public Shadow getShadow()
Defines the shape's Shadow characteristics.

Returns:
Shadow

getBrush

public ChartBrush getBrush()
Defines the kind of brush used to fill shape background.

Returns:
ChartBrush

setBrush

public void setBrush(ChartBrush value)
Internal use - serialization


getBorderRound

public int getBorderRound()
Rounds the Borders of the Chart Shapes.

Returns:
int

setBorderRound

public void setBorderRound(int value)
Rounds the Borders of the Chart Shapes.

Parameters:
value - int

getImage

public Image getImage()
Rendered Image for Shape background.
Default value: null

Returns:
Image

setDefaultVisible

public void setDefaultVisible(boolean value)

setImage

public void setImage(Image value)
Sets Rendered Image for Shape background.
Default value: null

Parameters:
value - Image

getImageMode

public ImageMode getImageMode()
ImageMode for rendered Shape background Image.
Default value: ImageMode.Stretch

Returns:
ImageMode

setImageMode

public void setImageMode(ImageMode value)
Sets the ImageMode for rendered Shape background Image.
Default value: ImageMode.Stretch

Parameters:
value - ImageMode

getImageTransparent

public boolean getImageTransparent()
Sets the shape image to transparent.

Returns:
boolean

setImageTransparent

public void setImageTransparent(boolean value)
Sets the shape image to transparent.

Parameters:
value -

getColor

public Color getColor()
Defines the shape Color.

Returns:
Color

setColor

public void setColor(Color value)
Defines the shape Color.

Parameters:
value - Color

getGradient

public Gradient getGradient()
Calls the Gradient characteristics for the shape.

Returns:
Gradient

getVisible

public boolean getVisible()
Shows or hides the Shape.

Returns:
boolean

setVisible

public void setVisible(boolean value)
Shows or hides the Shape.

Parameters:
value - boolean

getTransparent

public boolean getTransparent()
Enables/disables transparency of shape.
See transparency, which sets percentage transparency when Transparent is true.

Returns:
boolean
See Also:
getTransparency()

setTransparent

public void setTransparent(boolean value)
Enables/disables transparency of shape.

Parameters:
value - boolean

getPen

public ChartPen getPen()
Specifies the pen used to draw the shape.

Returns:
ChartPen

setPen

public void setPen(ChartPen value)
Internal use - serialization


getLeft

public int getLeft()
Shape rectangle left co-ordinate.

Returns:
int

setLeft

public void setLeft(int value)
Shape rectangle left co-ordinate.


getTop

public int getTop()
Shape rectangle top co-ordinate.

Returns:
int

setTop

public void setTop(int value)
Shape rectangle top co-ordinate.

Parameters:
value - int

getRight

public int getRight()
Shape rectangle right co-ordinate.

Returns:
int

setRight

public void setRight(int value)
Shape rectangle right co-ordinate.

Parameters:
value - int

getBottom

public int getBottom()
Shape rectangle bottom co-ordinate.

Returns:
int

setBottom

public void setBottom(int value)
Shape rectangle bottom co-ordinate.

Parameters:
value - int

getHeight

public int getHeight()
The Height of the Shape.

Returns:

setHeight

public void setHeight(int value)
Sets the Height of the Shape.

Parameters:
value -

getWidth

public int getWidth()
The Width of the shape.

Returns:

setWidth

public void setWidth(int value)
Sets the Width of the shape.

Parameters:
value -

assign

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

Parameters:
s - Shape

paint

public void paint(IGraphics3D g,
                  Rectangle rect)

getTransparency

public int getTransparency()
The Transparency level from 0 to 100% of shape.
Transparency is a value between 0 and 100 which sets the transparency percentage with respect to foreground versus background.
Default value: 0

Returns:
int

setTransparency

public void setTransparency(int value)
Sets Transparency level from 0 to 100% of shape.
Default value: 0

Parameters:
value - int