|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.DataEditor
public final class DataEditor
Provides access to the DataEditor object.
Chart FX provides a spreadsheet called "Data Editor" that allows users to see the data contained in the chart in tabular format.
As another Chart FX tool, the Data Editor also allows floating and docked styles so the end user can control the position and different styles of the Data Editor in the chart area.
Constructor Summary | |
---|---|
DataEditor()
|
Method Summary | |
---|---|
int |
getAlignment()
Gets the Alignment. |
java.awt.Color |
getBackColor()
Gets the BackColor. |
java.awt.Color |
getBackColorData()
Gets the BackColorData. |
java.awt.Color |
getBackColorDataAlternate()
Gets the BackColorDataAlternate. |
java.awt.Color |
getBackColorHeader()
Gets the BackColorHeader. |
IAdornment |
getBorderObject()
Gets the BorderObject. |
int |
getDocked()
Gets the Docked. |
java.awt.Font |
getFont()
Gets the Font. |
int |
getHeight()
Gets the Height. |
HighlightGridSettings |
getHighlight()
Returns a HighlightGridSettings object for the DataEditor. |
java.awt.Color |
getHorizontalGridColor()
Gets the HorizontalGridColor. |
int |
getInterlaced()
Gets the Interlaced. |
short |
getMaxSizePercentage()
Gets the MaxSizePercentage. |
int |
getScrollPosition()
Gets the ScrollPosition. |
int |
getScrollSize()
Returns the number of scrolls in the DataEditor based on the scroll view configuration. |
java.awt.Color |
getTextColorData()
Gets the TextColorData. |
java.awt.Color |
getTextColorDataAlternate()
Gets the TextColorDataAlternate. |
java.awt.Color |
getTextColorHeader()
Gets the TextColorHeader. |
int |
getToolBorder()
Gets the ToolBorder. |
java.awt.Color |
getVerticalGridColor()
Gets the VerticalGridColor. |
int |
getWidth()
Gets the Width. |
void |
invalidate()
Invalidates the selected tool and causes a paint message to be sent to the tool. |
boolean |
isAutoSize()
Gets the AutoSize. |
boolean |
isHideXValues()
Gets the HideXValues. |
boolean |
isShowHeader()
Gets the ShowHeader. |
boolean |
isShowHiddenSeries()
Gets the ShowHiddenSeries. |
boolean |
isShowMarkers()
Gets the ShowMarkers. |
boolean |
isUseRawData()
Gets the UseRawData. |
boolean |
isVisible()
Gets the Visible. |
boolean |
isXValuesAsHeaders()
Gets the XValuesAsHeaders. |
void |
setAlignment(int value)
Allows you to align the data editor in the bottom of the chart area. |
void |
setAutoSize(boolean value)
Allows Chart FX to calculate the best size according to the tool position. |
void |
setBackColor(java.awt.Color value)
Sets the background color for the data editor. |
void |
setBackColorData(java.awt.Color value)
Sets the background color of the cells on the data editor. |
void |
setBackColorDataAlternate(java.awt.Color value)
Assigns the alternate color for the setInterlaced(int) property. |
void |
setBackColorHeader(java.awt.Color value)
Sets the background color of the header for the Data Editor. |
void |
setBorderObject(IAdornment value)
Gets or sets a default or image border to the data editor. |
void |
setDocked(int value)
Sets the data editor position as docked, floating or fixed. |
void |
setFont(java.awt.Font value)
Allows you to set the font attributes for the data editor. |
void |
setHeight(int value)
Sets the height for the data editor when the selected legend is docked or fixed. |
void |
setHideXValues(boolean value)
Used to hide the XValues in the data editor of an XY plot chart. |
void |
setHorizontalGridColor(java.awt.Color value)
Allows you to select the Horizontal line color for the gridline displayed at the Data Editor box. |
void |
setInterlaced(int value)
Used to separate the lines of the data editor with different colored lines to make the data easier to read. |
void |
setMaxSizePercentage(short value)
Allows you to specify the maximum percentage of the chart area the data editor can occupy. |
void |
setScrollPosition(int value)
Sets the first visible cell in the data editor. |
void |
setShowHeader(boolean value)
Shows or hides the header of the data editor object. |
void |
setShowHiddenSeries(boolean value)
Displays hidden series of a chart in the data editor. |
void |
setShowMarkers(boolean value)
Adds or removes the series indicator displayed on the side of the data editor. |
void |
setTextColorData(java.awt.Color value)
Sets the text color of the cells on the data editor. |
void |
setTextColorDataAlternate(java.awt.Color value)
Allows you to set the alternate text color for text in the data editor cells. |
void |
setTextColorHeader(java.awt.Color value)
Sets the text color of the headers on the data editor. |
void |
setToolBorder(int value)
Allows the developer to specify the style for the border for the data editor. |
void |
setUseRawData(boolean value)
Gets or sets a value indicating whether to use raw data or use caculated values in the DataEditor. |
void |
setVerticalGridColor(java.awt.Color value)
Allows you to select the Vertical line color for the gridline displayed at the data editor box. |
void |
setVisible(boolean value)
Shows or hides the data editor in the chart. |
void |
setWidth(int value)
Sets the width for the data editor when it is docked or fixed. |
void |
setXValuesAsHeaders(boolean value)
Gets or sets a value instructing that XValues be used as the headers in the data editor. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataEditor()
Method Detail |
---|
public int getAlignment()
Gets the Alignment. For more detail see setAlignment(int)
.
public java.awt.Color getBackColor()
Gets the BackColor. For more detail see setBackColor(java.awt.Color)
.
public java.awt.Color getBackColorData()
Gets the BackColorData. For more detail see setBackColorData(java.awt.Color)
.
public java.awt.Color getBackColorDataAlternate()
Gets the BackColorDataAlternate. For more detail see setBackColorDataAlternate(java.awt.Color)
.
public java.awt.Color getBackColorHeader()
Gets the BackColorHeader. For more detail see setBackColorHeader(java.awt.Color)
.
public IAdornment getBorderObject()
Gets the BorderObject. For more detail see setBorderObject(SoftwareFX.ChartFX.IAdornment)
.
public int getDocked()
Gets the Docked. For more detail see setDocked(int)
.
public java.awt.Font getFont()
Gets the Font. For more detail see setFont(java.awt.Font)
.
public int getHeight()
Gets the Height. For more detail see setHeight(int)
.
public HighlightGridSettings getHighlight()
Returns a HighlightGridSettings object for the DataEditor.
This property returns a HighlightGridSettings object, so you may customize how the DataEditor displays a highlighted chart element. Please see the supported members of the HighlightGridSettings
Class
for more information.
HighlightGridSettings
public java.awt.Color getHorizontalGridColor()
Gets the HorizontalGridColor. For more detail see setHorizontalGridColor(java.awt.Color)
.
public int getInterlaced()
Gets the Interlaced. For more detail see setInterlaced(int)
.
public short getMaxSizePercentage()
Gets the MaxSizePercentage. For more detail see setMaxSizePercentage(short)
.
public int getScrollPosition()
Gets the ScrollPosition. For more detail see setScrollPosition(int)
.
public int getScrollSize()
Returns the number of scrolls in the DataEditor based on the scroll view configuration.
(Read only)
You may set the scroll position using the setScrollPosition(int)
property.
The Axis object also supports the Axis.getScrollSize()
member.
setScrollPosition(int)
,
Axis.getScrollSize()
,
Axis
public java.awt.Color getTextColorData()
Gets the TextColorData. For more detail see setTextColorData(java.awt.Color)
.
public java.awt.Color getTextColorDataAlternate()
Gets the TextColorDataAlternate. For more detail see setTextColorDataAlternate(java.awt.Color)
.
public java.awt.Color getTextColorHeader()
Gets the TextColorHeader. For more detail see setTextColorHeader(java.awt.Color)
.
public int getToolBorder()
Gets the ToolBorder. For more detail see setToolBorder(int)
.
public java.awt.Color getVerticalGridColor()
Gets the VerticalGridColor. For more detail see setVerticalGridColor(java.awt.Color)
.
public int getWidth()
Gets the Width. For more detail see setWidth(int)
.
public void invalidate()
Invalidates the selected tool and causes a paint message to be sent to the tool.
When you modify a visual attribute of a selected Chart FX Tool, sometimes it requires that the tool be recalculated and repainted to display the legend as desired. Calling this method after customization will ensure new changes are visible.
ChartCore.setDataEditor(boolean)
,
ChartCore.paint(java.awt.Graphics2D, int, int, int, int, int)
,
Chart
public boolean isAutoSize()
Gets the AutoSize. For more detail see setAutoSize(boolean)
.
public boolean isHideXValues()
Gets the HideXValues. For more detail see setHideXValues(boolean)
.
public boolean isShowHeader()
Gets the ShowHeader. For more detail see setShowHeader(boolean)
.
public boolean isShowHiddenSeries()
Gets the ShowHiddenSeries. For more detail see setShowHiddenSeries(boolean)
.
public boolean isShowMarkers()
Gets the ShowMarkers. For more detail see setShowMarkers(boolean)
.
public boolean isUseRawData()
Gets the UseRawData. For more detail see setUseRawData(boolean)
.
public boolean isVisible()
Gets the Visible. For more detail see setVisible(boolean)
.
public boolean isXValuesAsHeaders()
Gets the XValuesAsHeaders. For more detail see setXValuesAsHeaders(boolean)
.
public void setAlignment(int value)
Allows you to align the data editor in the bottom of the chart area.
ToolAlignment :
Defines the alignment of the selected Chart FX tool in the chart.Value | Description |
---|---|
ToolAlignment.SPREAD | Stretches the selected tool in the configured position. |
ToolAlignment.NEAR | Left justifies the selected tool in the configured position. |
ToolAlignment.CENTER | Centers the selected tool in the configured position. |
ToolAlignment.FAR | Right justifies the selected tool in the configured position. |
You can use this property to position the data editor in the lower charting area.
The setVisible(boolean)
property will allow you to show and hide the data editor object.
setHeight(int)
,
setVisible(boolean)
,
setWidth(int)
public void setAutoSize(boolean value)
Allows Chart FX to calculate the best size according to the tool position.
When the user moves the data editor from one docked position to another (e.g. Docked-Right to Docked Top), the data editor must be resized accordingly to fit all the labels associated with the legend being shown. When this property is set to True, you will not need to set the data editor Width or Height as Chart FX will calculate those values for you.
setWidth(int)
,
setHeight(int)
,
LegendBox
public void setBackColor(java.awt.Color value)
Sets the background color for the data editor.
You need to have the data editor visible in order to see the changes made with BackColor property. Use ChartCore.setDataEditor(boolean)
property to enable the data editor.
This property does not change the colors of the actual cells in the data editor. The effect of this property is to change the background surrounding the data editor to the specified color.
You can set the data editor cells Background and data editor header background with the setBackColorData(java.awt.Color)
and setBackColorHeader(java.awt.Color)
properties.
For more information regarding the Color type, please refer to the Java API Documentation.
setBackColorData(java.awt.Color)
,
setBackColorHeader(java.awt.Color)
,
setTextColorData(java.awt.Color)
,
setTextColorHeader(java.awt.Color)
,
Chart
,
ToolBar
,
LegendBox
public void setBackColorData(java.awt.Color value)
Sets the background color of the cells on the data editor.
You need to have the data editor visible in order to see the changes made with BackColorData property. Use ChartCore.setDataEditor(boolean)
property to enable the data editor.
You can set the data editor background and data editor headers background with setBackColor(java.awt.Color)
and setBackColorHeader(java.awt.Color)
property, respectively.
For more information regarding the Color type, please refer to the Java API Documentation.
setBackColor(java.awt.Color)
,
setBackColorHeader(java.awt.Color)
,
setTextColorData(java.awt.Color)
,
setTextColorHeader(java.awt.Color)
,
Chart
,
ToolBar
,
LegendBox
public void setBackColorDataAlternate(java.awt.Color value)
Assigns the alternate color for the setInterlaced(int)
property.
The setBackColor(java.awt.Color)
property is used to configure the other color used in an setInterlaced(int)
data editor grid.
For more information regarding the Color type, please refer to the Java API Documentation.
setBackColor(java.awt.Color)
,
setInterlaced(int)
,
Axis.setInterlaced(boolean)
,
Axis
public void setBackColorHeader(java.awt.Color value)
Sets the background color of the header for the Data Editor.
You need to have the data editor visible in order to see the changes made with BackColorHeader property. Use ChartCore.setDataEditor(boolean)
property to enable the data editor.
You can set the data editor background and data editor cells background with setBackColor(java.awt.Color)
and setBackColorData(java.awt.Color)
property, respectively.
For more information regarding the Color type, please refer to the Java API Documentation.
setBackColor(java.awt.Color)
,
setBackColorData(java.awt.Color)
,
setTextColorData(java.awt.Color)
,
setTextColorHeader(java.awt.Color)
,
Chart
,
ToolBar
,
LegendBox
public void setBorderObject(IAdornment value)
Gets or sets a default or image border to the data editor.
This property allows users to assign attributes directly to the border object of the data editor.
The BorderObject property is used when setting default and image borders to the data editor.
The Chart FX ImageBorders use shading to give a multidimensional effect. The ChartCore.setPageColor(java.awt.Color)
property can be used to modify the background color of the shaded area around ImageBorders.
ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
,
Chart
public void setDocked(int value)
Sets the data editor position as docked, floating or fixed.
Docked :
Define how to set the selected tool position (docked, floating or fixed).Value | Description |
---|---|
Docked.TOP | Docks the selected tool to the top margin. |
Docked.BOTTOM | Docks the selected tool to the bottom margin. |
Docked.LEFT | Docks the selected tool to the left margin. |
Docked.RIGHT | Docks the selected tool to the right margin. |
All tools in Chart FX are created (by default) with the setAutoSize(boolean)
property set to True. When this property is set to True and the end user moves the data editor to another position, Chart FX will calculate the appropriate width and height.
You may change the size of the data editor with the setWidth(int)
and setHeight(int)
properties.
setAutoSize(boolean)
,
setWidth(int)
,
setHeight(int)
,
ToolBar
,
LegendBox
public void setFont(java.awt.Font value)
Allows you to set the font attributes for the data editor.
You can set the font for the entire chart using the Chart
object Chart.setFont(java.awt.Font)
property.
When setting a font in Chart FX, you must create a new font object with the desired attributes and assign that object to the desired chart element every time you want to change the font.
For more information regarding the Font type, please refer to the Java API Documentation.
Chart.setFont(java.awt.Font)
,
setTextColorData(java.awt.Color)
,
Chart
public void setHeight(int value)
Sets the height for the data editor when the selected legend is docked or fixed. The Value is specified in pixels.
When you modify the height of a data editor the AutoSize property will be set to False and even if you move the legend from a docked to a fixed position or vice versa, Chart FX will not recalculate the best-fit height for the legend unless the AutoSize property is set to True.
setDocked(int)
,
setAutoSize(boolean)
,
LegendBox
public void setHideXValues(boolean value)
Used to hide the XValues in the data editor of an XY plot chart.
Normally when you generate an XY plot, both the X and Y values for each series are displayed in the data editor. This property allows you to hide the XValues displayed in the tool.
The ChartCore.getXValue(int, int)
property is used in conjunction with the ChartCore.getValue(int, int)
property as well as the ChartCore.openData(int, int, int)
and ChartCore.closeData(int)
methods of the Chart
Class
to create an XY plot chart.
ChartCore.getValue(int, int)
,
ChartCore.getXValue(int, int)
,
ChartCore.openData(int, int, int)
,
ChartCore.closeData(int)
,
Chart
public void setHorizontalGridColor(java.awt.Color value)
Allows you to select the Horizontal line color for the gridline displayed at the Data Editor box.
You need to have the Data Editor visible in order to see the changes made with HorizontalGridColor property. Use ChartCore.setDataEditor(boolean)
property to enable the Data Editor.
You can set the Vertical line color of the Data Editor gridline with setVerticalGridColor(java.awt.Color)
property.
For more information regarding the Color type, please refer to the Java API Documentation.
setVerticalGridColor(java.awt.Color)
,
setBackColor(java.awt.Color)
,
setBackColorHeader(java.awt.Color)
,
setTextColorData(java.awt.Color)
,
setTextColorHeader(java.awt.Color)
,
Chart
public void setInterlaced(int value)
Used to separate the lines of the data editor with different colored lines to make the data easier to read.
Interlaced :
Define the type of Interlacing grid for a chart. You can combine enumerations using the bitwise OR. Value | Description |
---|---|
Interlaced.NONE | No interlaced grid. |
Interlaced.HORIZONTAL | Creates a horizontal interlaced grid in the data editor. |
Interlaced.VERTICAL | Creates a vertical interlaced grid in the data editor. |
If you have many series you will want to set this property to Horizontal. If you have many data points (on each series) you will want to set Interlaced to Vertical. With only a few series and points it is easier to read without Interlaced.
Use the setBackColor(java.awt.Color)
and setBackColorDataAlternate(java.awt.Color)
properties to set the colors for the Interlaced property.
Axis.setInterlaced(boolean)
,
setBackColor(java.awt.Color)
,
setBackColorDataAlternate(java.awt.Color)
,
Axis
public void setMaxSizePercentage(short value)
Allows you to specify the maximum percentage of the chart area the data editor can occupy.
This property is especially useful when developing with web applications and generating images. Because you cannot scroll the data editor when generating an image, This property allows you to specify the max size so you can make sure to view all values in the data editor.
This property may be configured with values ranging from 0 - 100. Specifying 0 will instruct Chart FX to calculate the size. Specifying 100 will instruct Chart FX that the whole chart may be covered by the data editor if needed.
ChartCore.getDataEditorObj()
,
DataEditor
public void setScrollPosition(int value)
Sets the first visible cell in the data editor.
When a chart is set to ChartCore.setScrollable(boolean)
, the data editor cells will synchronize with the points shown on the chart. Therefore, you can also set the axis Axis.setScrollPosition(int)
which will configure the data editor when it is visible.
The Axis Axis.setScrollPosition(int)
and Axis.setScrollView(double, double)
settings will override this property and the configuration will be ignored by Chart FX.
Axis.setScrollPosition(int)
,
ChartCore.setScrollable(boolean)
,
Axis.setScrollView(double, double)
,
Axis
,
Chart
public void setShowHeader(boolean value)
Shows or hides the header of the data editor object.
The setShowMarkers(boolean)
property shows or hides the series indicator displayed on the side of the data editor.
You may modify the color of the header using the setBackColorHeader(java.awt.Color)
property.
setBackColorHeader(java.awt.Color)
,
setShowMarkers(boolean)
public void setShowHiddenSeries(boolean value)
Displays hidden series of a chart in the data editor.
The setVisible(boolean)
property is used to hide or show series in the chart. Do not use the DataType.Not used DataSourceSettings.getDataType(int)
as Chart FX will not chart the values as a series. To hide a series in the chart but viewable via data editor:
chart1.getSeries(2).setVisible(false);
chart1.getDataEditorObj().setShowHiddenSeries(true);
Make the data editor visible in the chart using the ChartCore.setDataEditor(boolean)
property.
setVisible(boolean)
,
ChartCore.setDataEditor(boolean)
,
Chart
public void setShowMarkers(boolean value)
Adds or removes the series indicator displayed on the side of the data editor.
When the marker is hidden, only text is shown to label the series.
The setShowHeader(boolean)
property may be used to show or hide the data editor header.
setShowHeader(boolean)
public void setTextColorData(java.awt.Color value)
Sets the text color of the cells on the data editor.
You need to have the data editor visible in order to see the changes made with BackColorData property. Use ChartCore.setDataEditor(boolean)
property to enable the data editor.
This property does not change the color of the header text, you can set the header text color of the data editor with setTextColorHeader(java.awt.Color)
property.
For more information regarding the Color type, please refer to the Java API Documentation.
setBackColor(java.awt.Color)
,
setBackColorHeader(java.awt.Color)
,
setTextColorHeader(java.awt.Color)
,
setTextColorDataAlternate(java.awt.Color)
,
Chart
public void setTextColorDataAlternate(java.awt.Color value)
Allows you to set the alternate text color for text in the data editor cells.
This property is useful when the Interlaced property is used.ChartCore.setScheme(int)
The initial color of the text in the data editor cells can be set using the setTextColorData(java.awt.Color)
property.
For more information regarding the Color type, please refer to the Java API Documentation.
ChartCore.setScheme(int)
,
Chart
public void setTextColorHeader(java.awt.Color value)
Sets the text color of the headers on the data editor.
You need to have the data editor visible in order to see the changes made with BackColorHeader property. Use ChartCore.setDataEditor(boolean)
property to enable the data editor.
You can set the other cells text color of the data editor with setTextColorData(java.awt.Color)
property.
For more information regarding the Color type, please refer to the Java API Documentation.
setBackColor(java.awt.Color)
,
setBackColorHeader(java.awt.Color)
,
setTextColorData(java.awt.Color)
,
Chart
public void setToolBorder(int value)
Allows the developer to specify the style for the border for the data editor.
ToolBorder :
Set the border style for the tool object selected.Value | Description |
---|---|
ToolBorder.NONE | No border used. |
ToolBorder.EXTERNAL | External border used for the tool object. |
ToolBorder.INTERNAL | Internal border used for the tool object. |
Allows you to specify the border for the data editor to be External, Internal or none.
setBorderObject(SoftwareFX.ChartFX.IAdornment)
,
setDocked(int)
public void setUseRawData(boolean value)
Gets or sets a value indicating whether to use raw data or use caculated values in the DataEditor.
Some gallery types, such as the BoxPlot and Histogram, manipulate data values displayed in the data editor. If you would like to actually see the data passed to the chart, you can set this property to true. This property will not affect all gallery types.
ChartCore.setGallery(int)
public void setVerticalGridColor(java.awt.Color value)
Allows you to select the Vertical line color for the gridline displayed at the data editor box.
You need to have the data editor visible in order to see the changes made with HorizontalGridColor property. Use ChartCore.setDataEditor(boolean)
property to enable the data editor.
You can set the Horizontal line color of the data editor gridline with setHorizontalGridColor(java.awt.Color)
property.
For more information regarding the Color type, please refer to the Java API Documentation.
setHorizontalGridColor(java.awt.Color)
,
setBackColor(java.awt.Color)
,
setBackColorHeader(java.awt.Color)
,
setTextColorData(java.awt.Color)
,
setTextColorHeader(java.awt.Color)
,
Chart
public void setVisible(boolean value)
Shows or hides the data editor in the chart.
Hiding the data editor does not destroy or lose previous settings assigned by other properties.
The ChartCore.setDataEditor(boolean)
property of the chart object will also show and hide the data editor.
ChartCore.setDataEditor(boolean)
,
ToolBar
,
LegendBox
,
Chart
public void setWidth(int value)
Sets the width for the data editor when it is docked or fixed. The value is set in pixels.
When you modify the width of a data editor the AutoSize property will be set to False and even if you move the data editor from a docked to a fixed position or vice versa, Chart FX will not recalculate the best-fit width for the data editor unless the AutoSize property is set to True.
setHeight(int)
,
setDocked(int)
,
setAutoSize(boolean)
,
LegendBox
public void setXValuesAsHeaders(boolean value)
Gets or sets a value instructing that XValues be used as the headers in the data editor.
When set to true, the XValues passed to a chart will be used for the Headers in the data editor.
In order for this property to affect the chart, the chart must include XValues (XY plot).
setUseRawData(boolean)
,
ChartCore.setDataEditor(boolean)
,
ChartCore.getDataEditorObj()
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |