EspressReport 6.6

quadbase.util
Interface ICanvas

All Superinterfaces:
IGradientPropertySet, IGradientSupport

public interface ICanvas
extends IGradientPropertySet

This interface is used to set/get properties associated with the main drawing canvas containing the chart. A handle to an object that implements this interface can be obtained by calling the gethCanvas method in QbChart.


Field Summary
static int SCROLLBARS_ALWAYS
           
static int SCROLLBARS_AS_NEEDED
           
static int SCROLLBARS_NEVER
           
 
Method Summary
 java.awt.Color getBackgroundColor()
          This function returns the color of the desktop background.
 java.net.URL getBackgroundImageURL()
          Returns the URL of the background image drawn on the canvas.
 java.awt.Component getCanvasArea()
          Returns canvas area component
 float getFontResizeRatio()
          Returns the ratio of font auto-resize to the chart canvas size change.
 int getImageMode()
          Returns the mode of the background image.
 int getScrollBarOption()
          Returns the scrollbar option for the main chart panel.
 java.awt.Dimension getSize()
          Returns the size of the main canvas containing the chart as a Dimension object.
 boolean isBackgroundVisible()
          Determines whether the desktop background area drawing (i.e., the rest of canvas other than the chart plot area) is enabled or not.
 boolean isChartVisible()
          Determines whether chart is visible or not.
 boolean isFitOnCanvas()
          Returns whether reposition chart location or reduce chart size in order to fit chart on canvas.
 boolean isReferenceAtTop()
          Returns whether the reference position of legend and annotation text is top or not
 void setBackgroundColor(java.awt.Color c)
          Sets the color of the desktop background.
 void setBackgroundImageURL(java.net.URL l)
          Sets the URL of the image drawn on the background.
 void setBackgroundVisible(boolean b)
          Sets whether the desktop background area drawing (i.e., the rest of canvas other than the chart plot area) is enabled or not.
 void setChartVisible(boolean b)
          Sets the visibility of chart.
 void setFitOnCanvas(boolean state)
          Try to fit a chart on canvas.
 void setFontResizeRatio(float ratio)
          Sets the ratio of font auto-resize to the chart canvas size change.
 void setImageMode(int x)
          Sets the display option for the background image.
 void setReferenceAtTop(boolean state)
          Sets the reference position of legend and annotation text to the top
 void setScrollBarOption(int option)
          Sets the scrollbar option for the main chart panel.
 void setSize(java.awt.Dimension d)
          Sets the size of the main canvas containing the chart.
 
Methods inherited from interface quadbase.util.IGradientPropertySet
set3DShadingEnabled, setGradientCyclic, setGradientDesColor, setGradientEnabled, setGradientEndX, setGradientEndY, setGradientShade, setGradientStartX, setGradientStartY
 
Methods inherited from interface quadbase.util.IGradientSupport
getGradientDesColor, getGradientEndX, getGradientEndY, getGradientShade, getGradientStartX, getGradientStartY, is3DShadingEnabled, isGradientCyclic, isGradientEnabled
 

Field Detail

SCROLLBARS_AS_NEEDED

static final int SCROLLBARS_AS_NEEDED
See Also:
Constant Field Values

SCROLLBARS_ALWAYS

static final int SCROLLBARS_ALWAYS
See Also:
Constant Field Values

SCROLLBARS_NEVER

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

getSize

java.awt.Dimension getSize()
Returns the size of the main canvas containing the chart as a Dimension object.

Returns:
The size of the main canvas, in a Dimension object.

setSize

void setSize(java.awt.Dimension d)
Sets the size of the main canvas containing the chart.

Associated QbChart property: SIZE

Parameters:
d - The Dimension object containing the new size for the drawing canvas.

getFontResizeRatio

float getFontResizeRatio()
Returns the ratio of font auto-resize to the chart canvas size change.


setFontResizeRatio

void setFontResizeRatio(float ratio)
Sets the ratio of font auto-resize to the chart canvas size change. Default value is 0.0f--no change in font size. A value of 1.0f would mean that the font size would increase/decrease the same percentage as the change in canvas size. A value of 2.0 would mean the degree of font resize is twice that of canvas resize.

Parameters:
ratio - valid range 0.0f to 3.0f, inclusive.

getScrollBarOption

int getScrollBarOption()
Returns the scrollbar option for the main chart panel.


setScrollBarOption

void setScrollBarOption(int option)
Sets the scrollbar option for the main chart panel.

Parameters:
option - Possible scrollbar option. Choices are:
 ICanvas.SCROLLBARS_ALWAYS
 ICanvas.SCROLLBARS_AS_NEEDED
 ICanvas.SCROLLBARS_NEVER

isFitOnCanvas

boolean isFitOnCanvas()
Returns whether reposition chart location or reduce chart size in order to fit chart on canvas.

Parameters:
boolean - isFitOnCanvas

setFitOnCanvas

void setFitOnCanvas(boolean state)
Try to fit a chart on canvas. If TRUE, try to reposition chart location or reduce chart size until able to fit a whole chart on canvas. Default value is FALSE

Parameters:
state - is Fit On Canvas

isChartVisible

boolean isChartVisible()
Determines whether chart is visible or not.

Returns:
True if chart is visible false otherwise.

setChartVisible

void setChartVisible(boolean b)
Sets the visibility of chart.

Parameters:
b - The boolean state of chart.

isBackgroundVisible

boolean isBackgroundVisible()
Determines whether the desktop background area drawing (i.e., the rest of canvas other than the chart plot area) is enabled or not.

Returns:
True if desktop background area drawing is enabled, false otherwise.

setBackgroundVisible

void setBackgroundVisible(boolean b)
Sets whether the desktop background area drawing (i.e., the rest of canvas other than the chart plot area) is enabled or not.

Associated QbChart property: DRAW_DESKTOPBACKGROUND

Parameters:
b - The boolean state of desktop background drawing.

getBackgroundColor

java.awt.Color getBackgroundColor()
This function returns the color of the desktop background. The color is returned as a java.awt.Color object.

Returns:
The Color object containing the rgb color value for the desktop background.

setBackgroundColor

void setBackgroundColor(java.awt.Color c)
Sets the color of the desktop background.

Associated QbChart property: DESKTOP_BACKGROUNDCOLOR

Parameters:
c - The Color object containing the color for the background.

getBackgroundImageURL

java.net.URL getBackgroundImageURL()
Returns the URL of the background image drawn on the canvas.

Returns:
The URL object for the background image.

setBackgroundImageURL

void setBackgroundImageURL(java.net.URL l)
Sets the URL of the image drawn on the background.

Associated QbChart property: DESKTOPIMAGE

Parameters:
l - The URL for the background image.

getImageMode

int getImageMode()
Returns the mode of the background image.

Returns:
The image background display option.
See Also:
setImageMode(int)

setImageMode

void setImageMode(int x)
Sets the display option for the background image.

Associated QbChart property: DESKTOPIMAGE_OPTION

Parameters:
x - The display option for the background image. Available options are:
   QbChart.TILE
   QbChart.FIT
   QbChart.CENTER
   QbChart.NONE
 

getCanvasArea

java.awt.Component getCanvasArea()
Returns canvas area component


isReferenceAtTop

boolean isReferenceAtTop()
Returns whether the reference position of legend and annotation text is top or not


setReferenceAtTop

void setReferenceAtTop(boolean state)
Sets the reference position of legend and annotation text to the top

Parameters:
state - The state of the reference position

EspressReport 6.6