ilog.views.chart
Class IlvChart

ilog.views.chart.IlvChart

public class IlvChart

The chart component uses internally several subcomponents for specific operations. These child components are either automatically (for key-components) or manually (for optional components) added to the chart. These embedded components are:

The following figure shows the components of a chart:


CSS example:

chart {
    class : "ilog.views.chart.IlvChart";
    3D : "false";
    alignmentX : "2.0";
    alignmentY : "2.0";
    angleRange : "3.0";
    antiAliasing : "false";
    antiAliasingText : "false";
    autoScaleTitleRotation : "false";
    autoscrolls : "false";
    background : "green";
    backgroundPaint : "#000000";
    border : "@#emptyBorder";
    chartAreaBorder : "@#emptyBorder";
    debugGraphicsOptions : "2";
    defaultColors[0] : "green";
    defaultColors[1] : "red";
    doubleBuffered : "false";
    dynamicStyling : "false";
    enabled : "false";
    focusable : "false";
    focusCycleRoot : "false";
    font : "sansserif-BOLD-8";
    foreground : "green";
    interactors[0] : "@#ilvChart3DViewInteractor1";
    interactors[1] : "@#ilvChart3DViewInteractor2";
    legendPosition : "North";
    legendVisible : "false";
    maximumSize : "0,0";
    minimumSize : "0,0";
    name : "<value>";
    opaque : "false";
    optimizedRepaint : "false";
    plotAreaBackground : "green";
    preferredSize : "0,0";
    project : "url(spec)";
    projectorReversed : "false";
    renderingType : "BAR";
    requestFocusEnabled : "false";
    scalingFont : "false";
    scrollRatio : "3.0";
    shiftScroll : "false";
    startingAngle : "3.0";
    styleSheet : "<value>";
    toolTipText : "<value>";
    type : "CARTESIAN";
    verifyInputWhenFocusTarget : "false";
    visible : "false";
    XAxisReversed : "false";
    XGridVisible : "false";
    XScaleTitle : "<value>";
    XScaleTitleRotation : "3.0";
    XScaleVisible : "false";
    YAxisReversed : "false";
    YGridVisible : "false";
    YScaleTitle : "<value>";
    YScaleTitleRotation : "3.0";
    YScaleVisible : "false";
}


Nested Class Summary
 class IlvChart.Area
          The component where the graphical representation of charts and scales are displayed.
 
Property Summary
 boolean 3D
          
Specifies whether the chart is rendered in 3-D.
 float alignmentX
          
Sets the vertical alignment.
 float alignmentY
          
Sets the horizontal alignment.
 double angleRange
          
Sets the angle range of the polar projector.
 boolean antiAliasing
          
Sets the antiAliasing property.
 boolean antiAliasingText
          
Sets the antiAliasingText property.
 boolean autoScaleTitleRotation
          
Sets whether the rotation angle of the scale titles is computed automatically depending on the type of the scale axis and depending on the projector configuration.
 boolean autoscrolls
          
Sets the autoscrolls property.
 java.awt.Color background
          
Sets the background color of this component.
 Paint backgroundPaint
          
Sets the background as a Paint.
 Border border
          
Sets the border of this component.
 Border chartAreaBorder
          
Sets the chart area border.
 java.lang.String class
          
Creates a Cartesian chart.
 int debugGraphicsOptions
          
Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.
 java.awt.Color[] defaultColors
          
Sets the default colors used by this chart.
 boolean doubleBuffered
          
Sets whether the this component should use a buffer to paint.
 boolean dynamicStyling
          
Specifies whether styles are dynamically applied when data change.
 boolean enabled
          
Sets whether or not this component is enabled.
 boolean focusable
          
Sets the focusable state of this Component to the specified value.
 boolean focusCycleRoot
          
Sets whether this Container is the root of a focus traversal cycle.
 java.awt.Font font
          
Sets the font for this component.
 java.awt.Color foreground
          
Sets the foreground color of this component.
 ilog.views.chart.IlvChartInteractor[] interactors
          
Sets the interactors.
 java.lang.String legendPosition
          
Sets the legend position.
 boolean legendVisible
          
Sets the legend of this chart visible.
 Dimension maximumSize
          
Sets the maximum size of this component to a constant value.
 Dimension minimumSize
          
Sets the minimum size of this component to a constant value.
 java.lang.String name
          
Sets the name of the component to the specified string.
 boolean opaque
          
If true the component paints every pixel within its bounds.
 boolean optimizedRepaint
          
Specifies whether the handling of paint requests is optimized.
 java.awt.Color plotAreaBackground
          
Sets the plot area background color.
 Dimension preferredSize
          
Sets the preferred size of this component.
 java.net.URL project
          
Sets the project file URL of this chart.
 boolean projectorReversed
          
Specifies whether the chart projector is reversed.
 int renderingType
          
Sets the renderer type for the main data source of the chart.
 boolean requestFocusEnabled
          
Provides a hint as to whether or not this JComponent should get focus.
 boolean scalingFont
          
Sets whether the fonts are scaled when the chart is resized.
 double scrollRatio
          
Sets the scroll ratio.
 boolean shiftScroll
          
Sets the shiftScroll property.
 double startingAngle
          
Sets the starting angle of the projector.
 java.lang.String styleSheet
          
Sets the value of the styleSheet property.
 java.lang.String toolTipText
          
Registers the text to display in a tool tip.
 int type
          
Sets the type of the chart.
 boolean verifyInputWhenFocusTarget
          
Sets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.
 boolean visible
          
Makes the component visible or invisible.
 boolean XAxisReversed
          
Sets the reversed property of the x-axis.
 boolean XGridVisible
          
Sets whether the major lines of the abscissa grid are visible.
 java.lang.String XScaleTitle
          
Sets the abscissa scale title.
 double XScaleTitleRotation
          
Sets the rotation of the abscissa scale title.
 boolean XScaleVisible
          
Sets whether the abscissa scale is visible.
 boolean YAxisReversed
          
Sets the reversed property of the main y-axis.
 boolean YGridVisible
          
Sets whether the major lines of the grid associated with the y-axis of index 0 is visible.
 java.lang.String YScaleTitle
          
Sets the title of the ordinate scale connected to the y-axis of index 0.
 double YScaleTitleRotation
          
Sets the title rotation of the ordinate scale connected to the y-axis of index 0.
 boolean YScaleVisible
          
Sets whether the scale connected to the y-axis of index 0 is visible.
 

Property Detail

class

public java.lang.String class

Creates a Cartesian chart.

CSS example:     class : "ilog.views.chart.IlvChart";


3D

public boolean 3D

Specifies whether the chart is rendered in 3-D.

Note: Only Cartesian and Pie charts can be displayed in 3-D.

CSS example:     3D : "false";


alignmentX

public float alignmentX

Sets the vertical alignment.

CSS example:     alignmentX : "2.0";


alignmentY

public float alignmentY

Sets the horizontal alignment.

CSS example:     alignmentY : "2.0";


angleRange

public double angleRange

Sets the angle range of the polar projector. The angle range is the difference between the ending angle and the starting angle, and is expressed in degrees.

This method is only meaningful for the following chart types: POLAR, PIE.

CSS example:     angleRange : "3.0";


antiAliasing

public boolean antiAliasing

Sets the antiAliasing property. When this property is set to true, all the drawings in the chart component are antialiased. This property does not affect text. To toggle the antialiasing of text, use the setAntiAliasingText method. The default value of this property is false.

CSS example:     antiAliasing : "false";


antiAliasingText

public boolean antiAliasingText

Sets the antiAliasingText property. When this property is set to true, all the text drawings in the chart component are antialiased. This property only affects text. To toggle the antialiasing of other drawings, use the setAntiAliasing method. The default value of this property is false.

CSS example:     antiAliasingText : "false";


autoScaleTitleRotation

public boolean autoScaleTitleRotation

Sets whether the rotation angle of the scale titles is computed automatically depending on the type of the scale axis and depending on the projector configuration. The default value is false.

CSS example:     autoScaleTitleRotation : "false";


autoscrolls

public boolean autoscrolls

Sets the autoscrolls property. If true mouse dragged events will be synthetically generated when the mouse is dragged outside of the component's bounds and mouse motion has paused (while the button continues to be held down). The synthetic events make it appear that the drag gesture has resumed in the direction established when the component's boundary was crossed. Components that support autoscrolling must handle mouseDragged events by calling scrollRectToVisible with a rectangle that contains the mouse event's location. All of the Swing components that support item selection and are typically displayed in a JScrollPane (JTable, JList, JTree, JTextArea, and JEditorPane) already handle mouse dragged events in this way. To enable autoscrolling in any other component, add a mouse motion listener that calls scrollRectToVisible. The default value of the autoScrolls property is false.

CSS example:     autoscrolls : "false";


background

public java.awt.Color background

Sets the background color of this component.

CSS example:     background : "green";

A color can either be a string representing a color or else an octal or hexadecimal string that starts with the character "#" or else a comma separated "RGB" value where the integer values are in the range 0..255.


backgroundPaint

public Paint backgroundPaint

Sets the background as a Paint.

CSS example:     backgroundPaint : "#000000";


border

public Border border

Sets the border of this component. The Border object is responsible for defining the insets for the component (overriding any insets set directly on the component) and for optionally rendering any border decorations within the bounds of those insets. Borders should be used (rather than insets) for creating both decorative and non-decorative (such as margins and padding) regions for a swing component. Compound borders can be used to nest multiple borders within a single component. This is a bound property.

CSS example:     border : "@#emptyBorder";

See implementing class EmptyBorder for an example of implementing a border.


chartAreaBorder

public Border chartAreaBorder

Sets the chart area border.

CSS example:     chartAreaBorder : "@#emptyBorder";

See implementing class EmptyBorder for an example of implementing a chartAreaBorder.


debugGraphicsOptions

public int debugGraphicsOptions

Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.

CSS example:     debugGraphicsOptions : "2";


defaultColors

public java.awt.Color[] defaultColors

Sets the default colors used by this chart. These colors are used when the styles of a renderer are not explicitly specified.

CSS example:    

defaultColors[0] : "green";
defaultColors[1] : "red";

A color can either be a string representing a color or else an octal or hexadecimal string that starts with the character "#" or else a comma separated "RGB" value where the integer values are in the range 0..255.


doubleBuffered

public boolean doubleBuffered

Sets whether the this component should use a buffer to paint. If set to true, all the drawing from this component will be done in an offscreen painting buffer. The offscreen painting buffer will the be copied onto the screen. Swings painting system always uses a maximum of one double buffer. If a Component is buffered and one of its ancestor is also buffered, the ancestor buffer will be used.

CSS example:     doubleBuffered : "false";


dynamicStyling

public boolean dynamicStyling

Specifies whether styles are dynamically applied when data change. The default value of this property is true.

Note: For efficiency reasons, it is recommended to toggle off dynamic styling if your style sheet does not contain any rule based on the attributes of a data point, or if your data model is static.

CSS example:     dynamicStyling : "false";


enabled

public boolean enabled

Sets whether or not this component is enabled. A component that is enabled may respond to user input, while a component that is not enabled cannot respond to user input. Some components may alter their visual representation when they are disabled in order to provide feedback to the user that they cannot take input. Note: Disabling a component does not disable it's children. Note: Disabling a lightweight component does not prevent it from receiving MouseEvents.

CSS example:     enabled : "false";


focusable

public boolean focusable

Sets the focusable state of this Component to the specified value. This value overrides the Component's default focusability.

CSS example:     focusable : "false";


focusCycleRoot

public boolean focusCycleRoot

Sets whether this Container is the root of a focus traversal cycle. Once focus enters a traversal cycle, typically it cannot leave it via focus traversal unless one of the up- or down-cycle keys is pressed. Normal traversal is limited to this Container, and all of this Container's descendants that are not descendants of inferior focus cycle roots. Note that a FocusTraversalPolicy may bend these restrictions, however. For example, ContainerOrderFocusTraversalPolicy supports implicit down-cycle traversal.

CSS example:     focusCycleRoot : "false";


font

public java.awt.Font font

Sets the font for this component.

CSS example:     font : "sansserif-BOLD-8";


foreground

public java.awt.Color foreground

Sets the foreground color of this component.

CSS example:     foreground : "green";

A color can either be a string representing a color or else an octal or hexadecimal string that starts with the character "#" or else a comma separated "RGB" value where the integer values are in the range 0..255.


interactors

public ilog.views.chart.IlvChartInteractor[] interactors

Sets the interactors. This method replaces the current installed interactors by this new set.

CSS example:    

interactors[0] : "@#ilvChart3DViewInteractor1";
interactors[1] : "@#ilvChart3DViewInteractor2";

See implementing class ilog.views.chart.interactor.IlvChart3DViewInteractor for an example of implementing an interactors.


legendPosition

public java.lang.String legendPosition

Sets the legend position.

CSS example:     legendPosition : "North";

Allowed values:
North    The north-bottom layout constraint (top of the chart, below the north-top component).
North_West    The north-west layout constraint (left side and top of the chart).
West    The west layout constraint (left side of the chart).
South_West    The south-west layout constraint (left side and bottom of the chart).
South    The south-top layout constraint (bottom of the chart, above the south-bottom component).
South_East    The south-east layout constraint (right side and bottom of the chart).
East    The east layout constraint (right side of the chart).
North_East    The north-east layout constraint (right side and top of the chart).


legendVisible

public boolean legendVisible

Sets the legend of this chart visible. If the parameter is true and no legend has been set yet, this method adds a new IlvLegend instance to the chart at the current legend position. If false, the current legend (if any) is removed and the reference is nullified.

CSS example:     legendVisible : "false";


maximumSize

public Dimension maximumSize

Sets the maximum size of this component to a constant value. Subsequent calls to getMaximumSize will always return this value; the component's UI will not be asked to compute it. Setting the maximum size to null restores the default behavior.

CSS example:     maximumSize : "0,0";


minimumSize

public Dimension minimumSize

Sets the minimum size of this component to a constant value. Subsequent calls to getMinimumSize will always return this value; the component's UI will not be asked to compute it. Setting the minimum size to null restores the default behavior.

CSS example:     minimumSize : "0,0";


name

public java.lang.String name

Sets the name of the component to the specified string.

CSS example:     name : "<value>";


opaque

public boolean opaque

If true the component paints every pixel within its bounds. Otherwise, the component may not paint some or all of its pixels, allowing the underlying pixels to show through. The default value of this property is false for JComponent. However, the default value for this property on most standard JComponent subclasses (such as JButton and JTree) is look-and-feel dependent.

CSS example:     opaque : "false";


optimizedRepaint

public boolean optimizedRepaint

Specifies whether the handling of paint requests is optimized.

If the optimizedRepaint property is set to true, the chart tries to optimize repaint requests so that only a subset of the displayed data is redrawn. If set to false, no optimization is performed. The default value is true. You may need to toggle off the optimization when using self-adapting Paint objects on continuous renderers such as line, area and stair.

CSS example:     optimizedRepaint : "false";


plotAreaBackground

public java.awt.Color plotAreaBackground

Sets the plot area background color.

CSS example:     plotAreaBackground : "green";

A color can either be a string representing a color or else an octal or hexadecimal string that starts with the character "#" or else a comma separated "RGB" value where the integer values are in the range 0..255.


preferredSize

public Dimension preferredSize

Sets the preferred size of this component. If preferredSize is null, the UI will be asked for the preferred size.

CSS example:     preferredSize : "0,0";


project

public java.net.URL project

Sets the project file URL of this chart. As a project file defines both data and styling, this method sets the chart data source to the one (if any) referenced by this configuration, and apply the styleheets (if any) of the configuration.

CSS example:     project : "url(spec)";


projectorReversed

public boolean projectorReversed

Specifies whether the chart projector is reversed. A reversed projector swaps the meaning of the abscissa and ordinate coordinates of a point. For example, a reversed Cartesian projector will project x-data values along the y-axis of the screen. This method is only meaningful for the CARTESIAN chart type.

CSS example:     projectorReversed : "false";

See Also:
type

renderingType

public int renderingType

Sets the renderer type for the main data source of the chart. The current type is unchanged if the specified type is not supported by this chart. For example, only the IlvChartRenderer.PIE type is allowed for pie charts. The specified type is used when calling the setDataSource method to create the appropriate instance of IlvChartRenderer. The default values is IlvChartRenderer.POLYLINE.

CSS example:     renderingType : "BAR";

Allowed values:
BAR    Bar chart renderer type.
STACKED_BAR    Stacked bar chart renderer type.
STACKED100_BAR    Stacked100 bar chart renderer type.
STACKED_DIVERGING_BAR    Stacked diverging bar chart renderer type.
SUPERIMPOSED_BAR    Superimposed bar chart renderer type.
AREA    Area chart renderer type.
STACKED_AREA    Stacked area chart renderer type.
STACKED100_AREA    Stacked100 area chart renderer type.
POLYLINE    Polyline chart renderer type.
STACKED_POLYLINE    Stacked polyline chart renderer type.
STACKED100_POLYLINE    Stacked100 polyline chart renderer type.
SCATTER    Scatter chart renderer type.
STAIR    Stair chart renderer type.
STACKED_STAIR    Stacked stair chart renderer type.
STACKED100_STAIR    Stacked100 stair chart renderer type.
SUMMED_STAIR    Summed stair chart renderer type.
BUBBLE    Bubble chart renderer type.
HILO    HiLo chart renderer type.
HILO_ARROW    Clustered HiLo Arrow chart renderer type.
HILO_STICK    Clustered HiLo Stick chart renderer type.
CANDLE    Candle chart renderer type.
HLOC    HighLow-OpenClose chart renderer type.
PIE    Pie chart renderer type.
TREEMAP    Treemap chart renderer type.
COMBO    Combo chart renderer type.


requestFocusEnabled

public boolean requestFocusEnabled

Provides a hint as to whether or not this JComponent should get focus. This is only a hint, and it is up to consumers that are requesting focus to honor this property. This is typically honored for mouse operations, but not keyboard operations. For example, look and feels could verify this property is true before requesting focus during a mouse operation. This would often times be used if you did not want a mouse press on a JComponent to steal focus, but did want the JComponent to be traversable via the keyboard. If you do not want this JComponent focusable at all, use the setFocusable method instead.

CSS example:     requestFocusEnabled : "false";


scalingFont

public boolean scalingFont

Sets whether the fonts are scaled when the chart is resized.

CSS example:     scalingFont : "false";


scrollRatio

public double scrollRatio

Sets the scroll ratio. This ratio is taken into account when the shiftScroll property of the chart is set to true. It specifies the amount of the visible x-range that is scrolled back when new data is added beyond this range. It must take a value between 0 and 1. The exact scroll back is always a multiple of visible range * scroll ratio. A value of 0 means that the x-axis is scrolled by the exact amount necessary to make the new data visible. The default scroll ratio is 0.

CSS example:     scrollRatio : "3.0";


shiftScroll

public boolean shiftScroll

Sets the shiftScroll property. When this property is set to true, the x-axis automatically scrolls as new data come in. The scroll ratio of the axis is specified by the setScrollRatio method. The default value of this property is false.

CSS example:     shiftScroll : "false";


startingAngle

public double startingAngle

Sets the starting angle of the projector. The angle is expressed in degrees.

This method is only meaningful for the following chart types: POLAR, PIE, RADAR.

CSS example:     startingAngle : "3.0";


styleSheet

public java.lang.String styleSheet

Sets the value of the styleSheet property. This method is equivalent to setStyleSheets(0, styleSheet).

CSS example:     styleSheet : "<value>";


toolTipText

public java.lang.String toolTipText

Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.

CSS example:     toolTipText : "<value>";


type

public int type

Sets the type of the chart. By calling this method you reinitialize the scales and the grids.

CSS example:     type : "CARTESIAN";

Allowed values:
CARTESIAN    The type for a CARTESIAN chart.
POLAR    The type for a POLAR chart.
RADAR    The type for a RADAR chart.
PIE    The type for a PIE chart.
TREEMAP    The type for a TREEMAP chart.


verifyInputWhenFocusTarget

public boolean verifyInputWhenFocusTarget

Sets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus. The default is true. Set to false on components such as a Cancel button or a scrollbar, which should activate even if the input in the current focus owner is not "passed" by the input verifier for that component.

CSS example:     verifyInputWhenFocusTarget : "false";


visible

public boolean visible

Makes the component visible or invisible. Overrides Component.setVisible.

CSS example:     visible : "false";


XAxisReversed

public boolean XAxisReversed

Sets the reversed property of the x-axis.

CSS example:     XAxisReversed : "false";


XGridVisible

public boolean XGridVisible

Sets whether the major lines of the abscissa grid are visible. This method does nothing if no abscissa grid has been set.

CSS example:     XGridVisible : "false";


XScaleTitle

public java.lang.String XScaleTitle

Sets the abscissa scale title. This method does nothing if no abscissa scale has been set.

CSS example:     XScaleTitle : "<value>";


XScaleTitleRotation

public double XScaleTitleRotation

Sets the rotation of the abscissa scale title. This method does nothing if no abscissa scale has been set.

CSS example:     XScaleTitleRotation : "3.0";


XScaleVisible

public boolean XScaleVisible

Sets whether the abscissa scale is visible. This method does nothing if no abscissa scale has been set.

CSS example:     XScaleVisible : "false";


YAxisReversed

public boolean YAxisReversed

Sets the reversed property of the main y-axis.

CSS example:     YAxisReversed : "false";


YGridVisible

public boolean YGridVisible

Sets whether the major lines of the grid associated with the y-axis of index 0 is visible. This method does nothing if no ordinate grid has been set.

CSS example:     YGridVisible : "false";


YScaleTitle

public java.lang.String YScaleTitle

Sets the title of the ordinate scale connected to the y-axis of index 0. This method does nothing if no ordinate scale has been set.

CSS example:     YScaleTitle : "<value>";


YScaleTitleRotation

public double YScaleTitleRotation

Sets the title rotation of the ordinate scale connected to the y-axis of index 0. This method does nothing if no ordinate scale has been set.

CSS example:     YScaleTitleRotation : "3.0";


YScaleVisible

public boolean YScaleVisible

Sets whether the scale connected to the y-axis of index 0 is visible. This method does nothing if no ordinate scale has been set.

CSS example:     YScaleVisible : "false";



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.