com.steema.teechart
Class Shadow

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.Shadow
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Pie.PieShadow

public class Shadow
extends TeeBase

Title: Shadow class

Description: Properties to draw a shadow.

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

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
protected  ChartBrush bBrush
           
protected  boolean bSmooth
           
 boolean bVisible
           
protected  Color defaultColor
           
protected  int defaultSize
           
protected  boolean defaultVisible
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
Shadow(IBaseChart c)
          Shadow Constructor.
Shadow(IBaseChart c, int size)
          Shadow constructor, defines Shadow size.
Shadow(IBaseChart c, int size, Color color)
          Shadow constructor, defines initial size and color
 
Method Summary
 void assign(Shadow value)
          Assigns characteristics of Shadow 'value'.
Copies all properties from Source Shadow to Self.
 void draw(IGraphics3D g, double aWidth, double aHeight, java.awt.Point[] points)
           
 void draw(IGraphics3D g, int x1, int y1, int x2, int y2)
          Draws a shadow around the ellipse described by the top left and botton right parameters.
 void draw(IGraphics3D g, int x1, int y1, int x2, int y2, int z)
          Draws a shadow around the ellipse described by the top left and botton right parameters at depth z.
 void draw(IGraphics3D g, Rectangle rect)
          Draws a shadow around the Rect rectangle parameter, using the ACanvas canvas.
Uses the Height, Width and Transparency properties to draw the shadow.
 void draw(IGraphics3D g, Rectangle rect, int angle, int aZ)
          Draws a shadow around the Rect rectangle parameter.
Uses the Height, Width and Transparency properties to draw the shadow.
 ChartBrush getBrush()
          Defines the Brush characteristics to fill the shadow.
 boolean getBSmooth()
          Internal use.
 Color getColor()
          Defines the shadow Color.
 int getHeight()
          The vertical displacement of the shadow in pixels.
 int getHorizSize()
          Obsolete. Please use Width property.
 java.awt.Dimension getSize()
          Size in pixels of shadow.
Returns the biggest of the HorizSize and VertSize properties.
 int getSmoothBlur()
          Reserved for future use.
 int getTransparency()
          The Transparency level from 0 to 100% of shadow.
Transparency is a value between 0 and 100 which sets the transparency percentage with respect to foreground versus background for the shadow.
 int getVertSize()
          Obsolete. Please use Height property.
 boolean getVisible()
          Determines whether the shadow will appear on screen.
 int getWidth()
          The horizontal shadow size in pixels.
 void setBSmooth(boolean value)
          Internal use.
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setColor(Color value)
          Defines the shadow Color.
 void setColor(java.awt.Color value)
          Sets the Color used to fill shadow.
 void setDefaultSize(int value)
           
 void setDefaultVisible(boolean value)
           
 void setHeight(int value)
          Sets the vertical displacement of the shadow in pixels.
 void setHorizSize(int value)
          Obsolete. Please use Width property.
 void setSize(java.awt.Dimension value)
          Size in pixels of shadow.
 void setSize(int value)
          Sets both horizontal and vertical shadow size to same value.
 void setSmoothBlur(int value)
          Reserved for future use.
 void setTransparency(int value)
          Sets Transparency level from 0 to 100% of shadow.
 void setVertSize(int value)
          Obsolete. Please use Height property.
 void setVisible(boolean value)
          Determines whether the shadow will appear on screen.
 void setWidth(int value)
          Sets the horizontal shadow size in pixels.
protected  boolean shouldSerializeHeight()
           
protected  boolean shouldSerializeVisible()
           
protected  boolean shouldSerializeWidth()
           
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bBrush

protected ChartBrush bBrush

bSmooth

protected boolean bSmooth

bVisible

public boolean bVisible

defaultVisible

protected transient boolean defaultVisible

defaultSize

protected transient int defaultSize

defaultColor

protected transient Color defaultColor
Constructor Detail

Shadow

public Shadow(IBaseChart c)
Shadow Constructor.

Parameters:
c - IBaseChart

Shadow

public Shadow(IBaseChart c,
              int size)
Shadow constructor, defines Shadow size.

Parameters:
c - IBaseChart
size - int

Shadow

public Shadow(IBaseChart c,
              int size,
              Color color)
Shadow constructor, defines initial size and color

Parameters:
c - IBaseChart
size - int
color - Color
Method Detail

assign

public void assign(Shadow value)
Assigns characteristics of Shadow 'value'.
Copies all properties from Source Shadow to Self.

Parameters:
value - Shadow

getColor

public Color getColor()
Defines the shadow Color. Gets or sets Color used to fill shadow.

Returns:
Color

setColor

public void setColor(Color value)
Defines the shadow Color. Gets or sets Color used to fill shadow.

Parameters:
value - Color

setColor

public void setColor(java.awt.Color value)
Sets the Color used to fill shadow.

Parameters:
value -

setDefaultSize

public void setDefaultSize(int value)

setDefaultVisible

public void setDefaultVisible(boolean value)

shouldSerializeHeight

protected boolean shouldSerializeHeight()

getTransparency

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

Returns:
int

setTransparency

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

Parameters:
value - int

getHeight

public int getHeight()
The vertical displacement of the shadow in pixels.

Returns:
int

setHeight

public void setHeight(int value)
Sets the vertical displacement of the shadow in pixels.

Example:


 pieSeries = new com.steema.teechart.styles.Pie(myChart.getChart());
 pieSeries.getMarks().setVisible(true);
 pieSeries.getShadow().setVisible(true);
 pieSeries.getShadow().setWidth(30);
 pieSeries.getShadow().setHeight(50);
 pieSeries.getShadow().setColor(Color.SILVER);
 pieSeries.fillSampleValues(9);

Parameters:
value - int

getHorizSize

public int getHorizSize()
Obsolete. Please use Width property.

Returns:
int

setHorizSize

public void setHorizSize(int value)
Obsolete. Please use Width property.

Parameters:
value - int

getVertSize

public int getVertSize()
Obsolete. Please use Height property.

Returns:
int

setVertSize

public void setVertSize(int value)
Obsolete. Please use Height property.

Parameters:
value - int

shouldSerializeWidth

protected boolean shouldSerializeWidth()

getWidth

public int getWidth()
The horizontal shadow size in pixels.

Returns:
int

setWidth

public void setWidth(int value)
Sets the horizontal shadow size in pixels.

Example:


 pieSeries = new com.steema.teechart.styles.Pie(myChart.getChart());
 pieSeries.getMarks().setVisible(true);
 pieSeries.getShadow().setVisible(true);
 pieSeries.getShadow().setWidth(30);
 pieSeries.getShadow().setHeight(50);
 pieSeries.getShadow().setColor(Color.SILVER);
 pieSeries.fillSampleValues(9);

Parameters:
value - int

getBrush

public ChartBrush getBrush()
Defines the Brush characteristics to fill the shadow.

Returns:
ChartBrush

getSize

public java.awt.Dimension getSize()
Size in pixels of shadow.
Returns the biggest of the HorizSize and VertSize properties. When setting Size, it will set both HorizSize and VertSize to the same value.

Returns:
Dimension

setSize

public void setSize(int value)
Sets both horizontal and vertical shadow size to same value.

Parameters:
value - int

setSize

public void setSize(java.awt.Dimension value)
Size in pixels of shadow.

Parameters:
value - Dimension

shouldSerializeVisible

protected boolean shouldSerializeVisible()

getVisible

public boolean getVisible()
Determines whether the shadow will appear on screen.

Returns:
boolean

setVisible

public void setVisible(boolean value)
Determines whether the shadow will appear on screen.

Parameters:
value - boolean

draw

public void draw(IGraphics3D g,
                 Rectangle rect)
Draws a shadow around the Rect rectangle parameter, using the ACanvas canvas.
Uses the Height, Width and Transparency properties to draw the shadow.

Parameters:
g - IGraphics3D
rect - Rectangle

draw

public void draw(IGraphics3D g,
                 Rectangle rect,
                 int angle,
                 int aZ)
Draws a shadow around the Rect rectangle parameter.
Uses the Height, Width and Transparency properties to draw the shadow.

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

draw

public void draw(IGraphics3D g,
                 double aWidth,
                 double aHeight,
                 java.awt.Point[] points)

draw

public void draw(IGraphics3D g,
                 int x1,
                 int y1,
                 int x2,
                 int y2)
Draws a shadow around the ellipse described by the top left and botton right parameters.


draw

public void draw(IGraphics3D g,
                 int x1,
                 int y1,
                 int x2,
                 int y2,
                 int z)
Draws a shadow around the ellipse described by the top left and botton right parameters at depth z.


setChart

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

Overrides:
setChart in class TeeBase
Parameters:
c - IBaseChart

getBSmooth

public boolean getBSmooth()
Internal use.

Returns:

setBSmooth

public void setBSmooth(boolean value)
Internal use.

Parameters:
value -

getSmoothBlur

public int getSmoothBlur()
Reserved for future use.

Returns:

setSmoothBlur

public void setSmoothBlur(int value)
Reserved for future use.

Parameters:
value -