public final class IlvChart3DView extends Object implements Serializable
The IlvChart3DView
class lets you control the appearance of an
IlvChart
when it is drawn in 3-D.
IlvChart.is3D()
,
IlvChart.get3DView()
,
IlvChart3DViewInteractor
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
IlvChart3DView.ZLayer
Holds a set of renderers that are drawn at the same depth.
|
Modifier and Type | Field and Description |
---|---|
static int |
BACK_WALL
Constant identifying the back wall of a Cartesian chart.
|
static int |
BOTTOM_WALL
Constant identifying the bottom wall of a Cartesian chart.
|
static int |
LEFT_WALL
Constant identifying the left wall of a Cartesian chart.
|
static int |
OBLIQUE
Type constant for oblique projection.
|
static int |
ORTHOGRAPHIC
Type constant for orthographic projection.
|
static int |
RIGHT_WALL
Constant identifying the right wall of a Cartesian chart.
|
static int |
TOP_WALL
Constant identifying the left wall of a Cartesian chart.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener lst)
Adds a listener to listen to the modification of all
properties.
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener lst)
Adds a listener to listen to the modification of the specified
property.
|
void |
draw(Graphics g)
Draws the contents of the 3-D view.
|
float |
getAmbientLight()
Returns the intensity of the ambient light.
|
double |
getBackDepth()
Returns the depth of the back plane (minimum z).
|
IlvChart |
getChart()
Returns the chart associated with the 3-D view.
|
int |
getDepth()
Returns the depth of the chart.
|
int |
getDepthGap()
Returns the depth gap between two consecutive layers along the z-axis.
|
double |
getElevation()
Returns the elevation angle.
|
double |
getFrontDepth()
Returns the depth of the front plane (maximum z).
|
double |
getLightLatitude()
Returns the light latitude.
|
double |
getLightLongitude()
Returns the light longitude.
|
int |
getProjectionType()
Returns the projection type.
|
double |
getRotation()
Returns the rotation angle.
|
ilog.views.chart.view3d.IlvChart3DScene |
getScene()
Internal method.
|
IlvLabelRenderer |
getZAnnotationRenderer()
Returns the renderer used to display the text annotations along the
depth axis.
|
Paint |
getZGridPaint()
Returns the paint used to draw the grid lines along the depth axis.
|
Stroke |
getZGridStroke()
Returns the stroke used to draw the grid lines along the depth axis.
|
List<IlvChart3DView.ZLayer> |
getZLayers()
Returns the depth layers.
|
double |
getZoom()
Returns the zooming factor.
|
boolean |
isAutoScaling()
Indicates whether the automatic scaling of the view is active.
|
boolean |
isZAnnotationColorVarying()
Returns
true if the text annotations along the depth axis
take the color of the corresponding data series. |
boolean |
isZAnnotationVisible()
Indicates whether text annotations are displayed along the depth axis.
|
boolean |
isZGridVisible()
Indicates whether z grid lines are drawn.
|
void |
removePropertyChangeListener(PropertyChangeListener lst)
Removes a listener so that it no longer listens to the
modification of the properties.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener lst)
Removes a listener so that it no longer listens to the
modification of the specified property.
|
void |
setAmbientLight(float intensity)
Sets the intensity of the ambient light.
|
void |
setAutoScaling(boolean auto)
Toggles the automatic scaling of the view.
|
void |
setDepth(int depth)
Sets the depth of the chart relatively to its width.
|
void |
setDepthGap(int gap)
Sets the depth gap between two consecutive renderers.
|
void |
setElevation(double angle)
Sets the elevation angle.
|
void |
setLightLatitude(double latitude)
Sets the light latitude.
|
void |
setLightLongitude(double longitude)
Sets the light longitude.
|
void |
setProjectionType(int projectionType)
Sets the projection type.
|
void |
setRotation(double angle)
Sets the rotation angle.
|
void |
setViewAngles(double rotation,
double elevation)
Sets the view angles.
|
void |
setWallStyle(int mask,
IlvStyle style)
Sets the rendering styles for the walls of a 3-D Cartesian chart.
|
void |
setZAnnotationColorVarying(boolean varying)
Specifies whether the text annotations along the depth axis
take the color of the corresponding data series, or whether they
are all of the same color.
|
void |
setZAnnotationRenderer(IlvLabelRenderer renderer)
Sets the renderer used to display the text annotations along the
depth axis.
|
void |
setZAnnotationVisible(boolean visible)
Specifies whether text annotations are displayed along the depth axis.
|
void |
setZGridPaint(Paint paint)
Specifies the paint used to draw the grid lines along the depth axis.
|
void |
setZGridStroke(Stroke stroke)
Specifies the stroke used to draw the grid lines along the depth axis.
|
void |
setZGridVisible(boolean visible)
Specifies whether z grid lines are drawn.
|
void |
setZoom(double zoomFactor)
Sets the zooming factor.
|
IlvDoublePoints |
toDisplay(IlvDoublePoints pts,
int yAxis,
double z)
Projects the specified points.
|
public static final int LEFT_WALL
public static final int RIGHT_WALL
public static final int TOP_WALL
public static final int BOTTOM_WALL
public static final int BACK_WALL
public static final int ORTHOGRAPHIC
setProjectionType(int)
,
Constant Field Valuespublic static final int OBLIQUE
setProjectionType(int)
,
Constant Field Valuespublic void addPropertyChangeListener(PropertyChangeListener lst)
lst
- The listener to add.public void addPropertyChangeListener(String propertyName, PropertyChangeListener lst)
propertyName
- The name of the property.lst
- The listener to add.public void removePropertyChangeListener(PropertyChangeListener lst)
lst
- The listener to remove.public void removePropertyChangeListener(String propertyName, PropertyChangeListener lst)
propertyName
- The name of the property.lst
- The listener to remove.public ilog.views.chart.view3d.IlvChart3DScene getScene()
public IlvChart getChart()
public void draw(Graphics g)
public double getFrontDepth()
public double getBackDepth()
public IlvLabelRenderer getZAnnotationRenderer()
public void setZAnnotationRenderer(IlvLabelRenderer renderer)
Note: The color of the text annotation will be taken from
the data set renderer if isZAnnotationColorVarying()
is true
.
public boolean isZAnnotationColorVarying()
true
if the text annotations along the depth axis
take the color of the corresponding data series.public void setZAnnotationColorVarying(boolean varying)
public boolean isZAnnotationVisible()
public void setZAnnotationVisible(boolean visible)
public boolean isZGridVisible()
public void setZGridVisible(boolean visible)
public Stroke getZGridStroke()
public void setZGridStroke(Stroke stroke)
public Paint getZGridPaint()
public void setZGridPaint(Paint paint)
public double getLightLatitude()
setLightLatitude(double)
public void setLightLatitude(double latitude)
The light location is specified using spherical coordinates in the projected space. It determines the direction of the light rays, which affects the color of a rendered surface.
latitude
- The light latitude in degrees. The default value is
0
(the light is located at the eye).setLightLongitude(double)
public double getLightLongitude()
setLightLongitude(double)
public void setLightLongitude(double longitude)
The light location is specified using spherical coordinates in the projected space. It determines the direction of the light rays, which affects the color of a rendered surface.
longitude
- The light longitude in degrees. The default value is
0
(the light is located at the eye).setLightLatitude(double)
public float getAmbientLight()
setAmbientLight(float)
public void setAmbientLight(float intensity)
This intensity defines the ambient lighting and affects the color of a rendered surface independently of its orientation.
intensity
- The intensity, in the range [0 1]
.
A value of 0
means that the light is turned off. A value
of 1
indicates a maximum intensity and produces a white
shading for all surfaces.getAmbientLight()
public int getProjectionType()
setProjectionType(int)
public void setProjectionType(int projectionType)
Note: The oblique projection preserves the orthogonality of the x- and y-axes. It can only be used with Cartesian charts.
projectionType
- The new projection type.OBLIQUE
,
ORTHOGRAPHIC
public double getElevation()
public void setElevation(double angle)
angle
- The elevation angle in degrees, within the
range [-90 .. 90]
.public double getRotation()
public void setRotation(double angle)
angle
- The rotation angle in degrees. The angle must be within the
range [-90 .. 90]
for Cartesian charts. It can take any
values for pie charts.public void setViewAngles(double rotation, double elevation)
rotation
- The rotation angle in degrees.elevation
- The elevation angle in degrees.setRotation(double)
,
setElevation(double)
public int getDepth()
setDepth(int)
public void setDepth(int depth)
20
.depth
- A percentage of the width, between 1
and
100
.getDepth()
public int getDepthGap()
setDepthGap(int)
public void setDepthGap(int gap)
0
.gap
- The gap, expressed as a percentage of the available depth.getDepthGap()
public double getZoom()
setZoom(double)
public void setZoom(double zoomFactor)
zoomFactor
- The zooming factor, which is multiplied to the x- and
y- scaling factors of the projection.getZoom()
public boolean isAutoScaling()
setAutoScaling(boolean)
public void setAutoScaling(boolean auto)
auto
- If set to true
, the view tries to compute the
x- and y- scaling factors so that the drawing fits the rectangle
of the chart area. Note that the computed scaling factors are then
multiplied by the zoom factor specified by the setZoom(double)
method.
If set to false
, no automatic scaling is applied.public void setWallStyle(int mask, IlvStyle style)
mask
- An XOR combination of the constants that references the walls.
For example, you can change the style of the left and right walls with the
following code: view3D.setWallStyle(view3D.LEFT_WALL|view3D.RIGHT_WALL,style)
.style
- The rendering style for the specified walls. If
null
, the style of the chart plotting area is used.LEFT_WALL
,
RIGHT_WALL
,
TOP_WALL
,
BOTTOM_WALL
,
BACK_WALL
,
IlvChart.Area.getPlotStyle()
public IlvDoublePoints toDisplay(IlvDoublePoints pts, int yAxis, double z)
pts
- The considered points.yAxis
- The index of the considered y-axis.z
- The z-coordinate of the points.public List<IlvChart3DView.ZLayer> getZLayers()
IlvChart3DView.ZLayer
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.