EspressReport 6.6

quadbase.util
Interface I3DPropertySet


public interface I3DPropertySet

This interface is used to set properties controlling the navigation, illumination model, etc. of a 3D chart. A handle to this interface can be obtained by calling the geth3DProperties method in QbChart.


Field Summary
static int DOWN
           
static int LEFT
           
static int RIGHT
           
static int UP
          direction constants (UP, DOWN, LEFT, RIGHT) for moving the chart
 
Method Summary
 java.awt.Color getAmbientLight()
          This function returns the ambient color value used for shading.
 int getAnimationSpeed()
          This function returns the animation speed for the navigation panel.
 int getApproximationThreshold()
          This method returns the threshold value of 3D rendering approximation.
 float getBarWidthToThicknessRatio()
          This function returns the width to thickness ratio for a bar/line 3D chart.
 ColorSpectrum getColorSpectrum()
          This function returns the color spectrum being used.
 java.awt.Color getLight()
          Returns the intensity of the light source used for shading.
 Point_3D getLightPosition()
          This function gets the light position for shading.
 int getRenderMode()
          This function returns the 3D rendering mode.
 int getScatterCubeWidth()
          This function returns the width of the cube for a scatter 3D chart.
 Point_3D[] getViewDirection()
          Returns the viewpoint values for a 3D chart.
 Point_3D getViewTranslation()
          Returns the view translation coordinates.
 java.awt.Color getWallColor()
          This function returns the color used to draw the xy,yz,xz walls for a 3D chart.
 float getXScale()
          Returns the X dimension scaling used for a 3D chart.
 float getYScale()
          Returns the Y dimension scaling used for a 3D chart.
 int getZoomFactor()
          Returns the zoom factor used for viewing a 3D chart.
 float getZScale()
          Returns the Z dimension scaling used for a 3D chart.
 boolean is3DApproximationUsed()
          This function returns whether a 3D rendering approximation method is currently used.
 boolean isDrawSeriesOnCategoryAxis()
          Determines whether or not drawing series on category axis in 3 dimension space.
 boolean isWallFrameVisible()
          Returns whether or not a wireframe is drawn around the 3 walls of a 3D chart.
 void move(boolean rotateMode, int step, int direction)
          This function can move the chart in 4 different directions
 void set3DApproximationUsed(boolean state)
          This function sets the state of 3D rendering approximation.
 void set3DApproximationUsed(boolean state, int threshold)
          This function sets the state of 3D rendering approximation.
 void setAmbientLight(java.awt.Color c)
          This function sets an ambient color for shading.
 void setAnimationSpeed(int value)
          This function sets the animation speed for the navigation panel in radians per frame.
 void setBarWidthToThicknessRatio(float d)
          This function sets the width to thickness ratio for a bar/line 3D chart.
 void setColorSpectrum(ColorSpectrum colorSpectrum)
          This function sets the data color based on the vertical value Currently only 3D surface chart supports this feature.
 void setDrawSeriesOnCategoryAxis(boolean b)
          Set drawing series on category axis in 3 dimension space.
 void setLight(java.awt.Color light)
          Sets the light source intensity used for shading.
 void setLightPosition(Point_3D x)
          This function sets the light position for shading.
 void setRenderMode(int mode)
          This function sets the 3D rendering mode.
 void setScatterCubeWidth(int d)
          This function sets the width of the cube for a scatter 3D chart.
 void setViewDirection(Point_3D[] x)
          This function sets viewpoint for a 3D chart.
 void setViewTranslation(Point_3D x)
          This function sets the view translation of the chart from the center.
 void setWallColor(java.awt.Color c)
          This function sets the color used to draw the xy,yz, and xz walls in a 3D chart.
 void setWallFrameVisible(boolean b)
          Enables/Disables a wireframe around the 3 walls for a 3D chart.
 void setXScale(float scale)
          This function sets the X dimension scale factor for a 3D chart.
 void setYScale(float scale)
          This function sets the Y dimension scale factor for a 3D chart.
 void setZoomFactor(int f)
          This function sets the viewing zoom factor for a 3D chart.
 void setZScale(float scale)
          This function sets the Z dimension scale factor for a 3D chart.
 void useDefault3DDisplayView()
          Use default 3D Display View angle and scale
 

Field Detail

UP

static final int UP
direction constants (UP, DOWN, LEFT, RIGHT) for moving the chart

See Also:
Constant Field Values

DOWN

static final int DOWN
See Also:
Constant Field Values

LEFT

static final int LEFT
See Also:
Constant Field Values

RIGHT

static final int RIGHT
See Also:
Constant Field Values
Method Detail

getAnimationSpeed

int getAnimationSpeed()
This function returns the animation speed for the navigation panel.

Associated QbChart property: ANIMATE_SPEED

Returns:
The animation speed (between 1 and 100).

setAnimationSpeed

void setAnimationSpeed(int value)
This function sets the animation speed for the navigation panel in radians per frame.

Parameters:
value - The animation speed (should be between 1 and 100).
See Also:
getAnimationSpeed()

setRenderMode

void setRenderMode(int mode)
This function sets the 3D rendering mode.

Associated QbChart property: DRAWMODE_3D

Parameters:
mode - The rendering mode: Options are:
   QbChart.FLAT
   QbChart.WIREFRAME
   QbChart.FLAT_BORDER
   QbChart.GOURAUD_BORDER
   QbChart.GOURAUD
 

getRenderMode

int getRenderMode()
This function returns the 3D rendering mode.

Returns:
The 3D rendering mode.
See Also:
setRenderMode(int)

setViewDirection

void setViewDirection(Point_3D[] x)
This function sets viewpoint for a 3D chart.

Associated QbChart property: VIEWPOINT

Parameters:
x - An array (size 2) of Point_3D objects containing the start and end x,y,z coordinates which define the viewpoint.
See Also:
Point_3D

getViewDirection

Point_3D[] getViewDirection()
Returns the viewpoint values for a 3D chart.

Returns:
An array of Point_3D objects containing the viewpoint.
See Also:
setViewDirection(quadbase.util.Point_3D[]), Point_3D

setViewTranslation

void setViewTranslation(Point_3D x)
This function sets the view translation of the chart from the center.

Associated QbChart property: VIEW_TRANSLATION

Parameters:
x - The Point_3D object containing the x,y,z coordinates for the translation.
See Also:
Point_3D

move

void move(boolean rotateMode,
          int step,
          int direction)
This function can move the chart in 4 different directions

Parameters:
rotateMode - If rotateMode is true, rotate a chart along with direction If rotateMode is false, translate a chart along with direction
step - Step interval
direction - Options are:
 I3DPropertySet.UP
 I3DPropertySet.DOWN
 I3DPropertySet.LEFT
 I3DPropertySet.RIGHT
 

getViewTranslation

Point_3D getViewTranslation()
Returns the view translation coordinates.

Returns:
The Point_3D object containing the view translation coords.
See Also:
Point_3D

setLightPosition

void setLightPosition(Point_3D x)
This function sets the light position for shading.

Associated QbChart property: LIGHT_POSITION

Parameters:
x - The Point_3D object containing the x,y,z coordinates of the light position.
See Also:
Point_3D

getLightPosition

Point_3D getLightPosition()
This function gets the light position for shading.

Returns:
The Point_3D object containing the view translation coords.
See Also:
Point_3D

getAmbientLight

java.awt.Color getAmbientLight()
This function returns the ambient color value used for shading.

Returns:
The ambient Color object.
See Also:
Color

setAmbientLight

void setAmbientLight(java.awt.Color c)
This function sets an ambient color for shading.

Associated QbChart property: AMBIENT_COLOR

Parameters:
c - The color value to use.
See Also:
Color

getLight

java.awt.Color getLight()
Returns the intensity of the light source used for shading.

Returns:
The light color used for shading.

setLight

void setLight(java.awt.Color light)
Sets the light source intensity used for shading.

Associated QbChart property: LIGHT_INTENSITY

Parameters:
light - The light intensity to use.

getZoomFactor

int getZoomFactor()
Returns the zoom factor used for viewing a 3D chart.

Returns:
The zoom factor (0 - 100).

setZoomFactor

void setZoomFactor(int f)
This function sets the viewing zoom factor for a 3D chart.

Associated QbChart property: ZOOM_FACTOR

Parameters:
f - The zoom factor to use (0 - 100).

getXScale

float getXScale()
Returns the X dimension scaling used for a 3D chart.

Returns:
The X dimension scale factor.

setXScale

void setXScale(float scale)
This function sets the X dimension scale factor for a 3D chart.

Associated QbChart property: SPACE_XSCALE

Parameters:
scale - The X scale factor to use.

getYScale

float getYScale()
Returns the Y dimension scaling used for a 3D chart.

Returns:
The Y dimension scale factor.

setYScale

void setYScale(float scale)
This function sets the Y dimension scale factor for a 3D chart.

Associated QbChart property: SPACE_YSCALE

Parameters:
scale - The Y scale factor to use.

getZScale

float getZScale()
Returns the Z dimension scaling used for a 3D chart.

Returns:
The Z dimension scale factor.

setZScale

void setZScale(float scale)
This function sets the Z dimension scale factor for a 3D chart.

Associated QbChart property: SPACE_ZSCALE

Parameters:
scale - The Z scale factor to use.

getBarWidthToThicknessRatio

float getBarWidthToThicknessRatio()
This function returns the width to thickness ratio for a bar/line 3D chart.

Returns:
The width to thickness ratio.

setBarWidthToThicknessRatio

void setBarWidthToThicknessRatio(float d)
This function sets the width to thickness ratio for a bar/line 3D chart.

Associated QbChart property: THICKNESS_RATIO

Parameters:
d - The width-thickness ratio to use while drawing the bars.

getScatterCubeWidth

int getScatterCubeWidth()
This function returns the width of the cube for a scatter 3D chart.

Returns:
The width of the cube.

setScatterCubeWidth

void setScatterCubeWidth(int d)
This function sets the width of the cube for a scatter 3D chart.

Parameters:
d - The width to use while drawing the scatter cube.

isWallFrameVisible

boolean isWallFrameVisible()
Returns whether or not a wireframe is drawn around the 3 walls of a 3D chart.

Returns:
True if a wireframe is drawn, false otherwise.

setWallFrameVisible

void setWallFrameVisible(boolean b)
Enables/Disables a wireframe around the 3 walls for a 3D chart.

Associated QbChart property: DRAW_WALLFRAME

Parameters:
b - Set to true if wireframe around walls is needed. False otherwise.

getWallColor

java.awt.Color getWallColor()
This function returns the color used to draw the xy,yz,xz walls for a 3D chart.

Returns:
The color used to draw the walls.

setWallColor

void setWallColor(java.awt.Color c)
This function sets the color used to draw the xy,yz, and xz walls in a 3D chart.

Associated QbChart property: WALL_COLOR

Parameters:
c - The color object to use.

getColorSpectrum

ColorSpectrum getColorSpectrum()
This function returns the color spectrum being used. Currently only 3D surface chart supports this feature.

Returns:
The color spectrum
See Also:
setColorSpectrum(quadbase.util.ColorSpectrum)

setColorSpectrum

void setColorSpectrum(ColorSpectrum colorSpectrum)
This function sets the data color based on the vertical value Currently only 3D surface chart supports this feature.

Parameters:
colorSpectrum - The color spectrum
See Also:
getColorSpectrum()

is3DApproximationUsed

boolean is3DApproximationUsed()
This function returns whether a 3D rendering approximation method is currently used. Whenever the out of memory error happens, programmers may consider using set3DApproximationUsed(true) as the option of the hidden surface algorithm. The rendering time is much shorter.

However, since it is just an approximation, a correct order of faces is not guaranteed, and thus users should make this decision carefully. This option is particularly useful for 3D scatter charts and surface charts with a lot of data points.
This option is only available for 3D scatter, surface charts and chart with secondary data.
The default value is true.

Returns:
The state of approximation
See Also:
set3DApproximationUsed(boolean)

set3DApproximationUsed

void set3DApproximationUsed(boolean state)
This function sets the state of 3D rendering approximation. Whenever the out of memory error happens, programmers may consider using set3DApproximationUsed(true) as the option of the hidden surface algorithm. The rendering time is much shorter.

However, since it is just an approximation, a correct order of faces is not guaranteed, and thus users should make this decision carefully. This option is particularly useful for 3D scatter charts and surface charts with a lot of data points.
This option is only available for 3D scatter, surface charts and chart with secondary data.
The default value is true. Same as set3DApproximationUsed(state, 100)

Parameters:
state - The state of approximation
See Also:
is3DApproximationUsed()

useDefault3DDisplayView

void useDefault3DDisplayView()
Use default 3D Display View angle and scale


set3DApproximationUsed

void set3DApproximationUsed(boolean state,
                            int threshold)
This function sets the state of 3D rendering approximation. Whenever the out of memory error happens, programmers may consider using set3DApproximationUsed(true) as the option of the hidden surface algorithm. The rendering time is much shorter.

However, since it is just an approximation, a correct order of faces is not guaranteed, and thus users should make this decision carefully. The default value is false. This option is particularly useful for 3D scatter charts and surface charts with a lot of data points.
The approximation method is triggered when the number of data points is greater than the threshold value.
This option is only available for 3D scatter and surface charts.
The default value of state is true.
The default value of threshold is 100.

Parameters:
state - The state of approximation
threshold - The number of data points (threshold) which triggers the approximation method
See Also:
is3DApproximationUsed()

getApproximationThreshold

int getApproximationThreshold()
This method returns the threshold value of 3D rendering approximation. The default value is 100. This option is only available for 3D scatter and surface charts

Returns:
The threshold value (number of data points)
See Also:
set3DApproximationUsed(boolean)

isDrawSeriesOnCategoryAxis

boolean isDrawSeriesOnCategoryAxis()
Determines whether or not drawing series on category axis in 3 dimension space.

Returns:
state The state of drawing method

setDrawSeriesOnCategoryAxis

void setDrawSeriesOnCategoryAxis(boolean b)
Set drawing series on category axis in 3 dimension space. It only applies to 3D column, bar, stack column, stack bar, and 100% column charts.

Parameters:
state - The state of drawing method

EspressReport 6.6