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-2019 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Modifier and Type | Field and Description |
---|---|
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 |
chart, InternalUse
Constructor and Description |
---|
Shape() |
Shape(IBaseChart c) |
Modifier and Type | Method and Description |
---|---|
void |
assign(Shape s)
Assign all properties from a shape to another.
|
Bevel |
getBevel()
Sets the bevel characteristics of the Shape.
|
BevelStyle |
getBevelInner()
Obsolete.&ndsp;Please use Bevel.Inner.
|
BevelStyle |
getBevelOuter()
Obsolete. Please use Bevel.Outer
|
int |
getBevelWidth()
Obsolete. Please use Bevel.Width
|
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.
Default value: null |
ImageBevel |
getImageBevel()
Sets the bevel characteristics of the Shape.
|
ImageMode |
getImageMode()
ImageMode for rendered Shape background Image.
Default value: ImageMode.Stretch |
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.
Transparency is a value between 0 and 100 which sets the transparency percentage with respect to foreground versus background. Default value: 0 |
boolean |
getTransparent()
Enables/disables transparency of shape.
See transparency, which sets percentage transparency when Transparent is true. |
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.
Available types: None Lowered Raised |
void |
setBevelOuter(BevelStyle value)
Defines the outer bevel type of the TChart Panel border.
Available types: None Lowered Raised |
void |
setBevelWidth(int value)
Obsolete. Please use Bevel.Width
|
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.
Default value: null |
void |
setImageMode(ImageMode value)
Sets the ImageMode for rendered Shape background Image.
Default value: ImageMode.Stretch |
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.
Default value: 0 |
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.
|
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
protected transient boolean defaultVisible
protected boolean visible
protected boolean bTransparent
protected ChartPen pPen
protected Bevel bBevel
protected Shadow shadow
protected ImageBevel bImageBevel
protected ChartBrush bBrush
protected Rectangle shapeBounds
protected int bBorderRound
public Shape()
public Shape(IBaseChart c)
public Rectangle getShapeBounds()
public void setShapeBounds(Rectangle value)
value
- Rectanglepublic BevelStyle getBevelInner()
public void setBevelInner(BevelStyle value)
value
- BevelStylepublic int getBevelWidth()
public void setBevelWidth(int value)
value
- intpublic BevelStyle getBevelOuter()
public void setBevelOuter(BevelStyle value)
value
- BevelStylepublic void setChart(IBaseChart c)
public ImageBevel getImageBevel()
public Bevel getBevel()
public void setBevel(Bevel value)
public Shadow getShadow()
public ChartBrush getBrush()
public void setBrush(ChartBrush value)
public int getBorderRound()
public void setBorderRound(int value)
value
- intpublic Image getImage()
public void setDefaultVisible(boolean value)
public void setImage(Image value)
value
- Imagepublic ImageMode getImageMode()
public void setImageMode(ImageMode value)
value
- ImageModepublic boolean getImageTransparent()
public void setImageTransparent(boolean value)
value
- public Color getColor()
public void setColor(Color value)
value
- Colorpublic Gradient getGradient()
public boolean getVisible()
public void setVisible(boolean value)
value
- booleanpublic boolean getTransparent()
getTransparency()
public void setTransparent(boolean value)
value
- booleanpublic ChartPen getPen()
public void setPen(ChartPen value)
public int getLeft()
public void setLeft(int value)
public int getTop()
public void setTop(int value)
value
- intpublic int getRight()
public void setRight(int value)
value
- intpublic int getBottom()
public void setBottom(int value)
value
- intpublic int getHeight()
public void setHeight(int value)
value
- public int getWidth()
public void setWidth(int value)
value
- public void assign(Shape s)
s
- Shapepublic void paint(IGraphics3D g, Rectangle rect)
public int getTransparency()
public void setTransparency(int value)
value
- int