Package 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 Details

  • Method Details

    • getSize

      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(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

      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(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

      URL getBackgroundImageURL()
      Returns the URL of the background image drawn on the canvas.
      Returns:
      The URL object for the background image.
    • setBackgroundImageURL

      void setBackgroundImageURL(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

      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

      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