|
Chart FX 7 for Java Server | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwarefx.chartfx.server.ImageSettings
public class ImageSettings
Provide customization of the image which is rendered by the Chart.
When Chart.setRenderFormat(java.lang.String)
is configured in a way that ChartFX will render an image, the ImageSettings
Class
is used to customized how the image is rendered. This object is accessible using the Chart.getImageSettings()
property of the Chart
.
The most innovative feature in
Chart FX for Java
is the generation of Dynamic Html with the image. The setInteractive(boolean)
property is used to turn on/off the this DHTML feature.
Chart FX is able to generate Image Maps for charts generated as images. Image Maps are commonly used for providing DrillDown capabilities in image charts. Also, image maps are useful for showing setToolTips(com.softwarefx.chartfx.server.ImageToolTipStyle)
in image charts, even without using Chart FX's DrillDown capabilities. The resulting image map has the following characteristics:
1) It is embedded in the resulting page. External image maps are not supported.
2) It is a client side image map. This means the browser is responsible for processing the mouse position.
3) You can control how to generate the Title attribute in the AREA tags with the setToolTips(com.softwarefx.chartfx.server.ImageToolTipStyle)
property.
The setQuality(int)
, setWidth(int)
, and setHeight(int)
properties allow you to configure how the image will be generated.
Constructor Summary | |
---|---|
ImageSettings()
|
Method Summary | |
---|---|
int |
getHeight()
Gets the Height. |
int |
getQuality()
Gets the Quality. |
String |
getTagAttributes()
Gets the TagAttributes. |
ImageToolTipStyle |
getToolTips()
Gets the ToolTips. |
int |
getWidth()
Gets the Width. |
boolean |
isInteractive()
Gets the Interactive. |
boolean |
isSizeable()
Gets the Sizeable. |
void |
setHeight(int value)
Specifies the suggested height (in pixels) of the chart when generating images. |
void |
setInteractive(boolean value)
Allow you to render dynamic html combined with a image. |
void |
setQuality(int value)
Allows you to set the image quality for generated Jpeg chart images. |
void |
setSizeable(boolean value)
Allows to stretch the generated image if the image dimension and the dimension at the Chart level differ. |
void |
setTagAttributes(String value)
A string property that will be appended to the IMG tag created by Chart FX. |
void |
setToolTips(ImageToolTipStyle value)
Allows you to control how ToolTip will appear in the chart area. |
void |
setWidth(int value)
Specifies the suggested width (in pixels) of the chart when generating images. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageSettings()
Method Detail |
---|
public int getHeight()
Gets the Height. For more detail see setHeight(int)
.
public int getQuality()
Gets the Quality. For more detail see setQuality(int)
.
public String getTagAttributes()
Gets the TagAttributes. For more detail see setTagAttributes(java.lang.String)
.
public ImageToolTipStyle getToolTips()
Gets the ToolTips. For more detail see setToolTips(com.softwarefx.chartfx.server.ImageToolTipStyle)
.
public int getWidth()
Gets the Width. For more detail see setWidth(int)
.
public boolean isInteractive()
Gets the Interactive. For more detail see setInteractive(boolean)
.
public boolean isSizeable()
Gets the Sizeable. For more detail see setSizeable(boolean)
.
public void setHeight(int value)
Specifies the suggested height (in pixels) of the chart when generating images.
This method will only be used if an image is generated by Chart FX. If you plan to use a client component on the browser, you may set the Chart.setHeight(int)
and Chart.setWidth(int)
properties of the Chart
Class
to set the height and width of the chart.
You can specify for Chart FX to generate an image or use an active component using the Chart.setRenderFormat(java.lang.String)
property of the Chart
Class
.
If generating an image, you can use the setTagAttributes(java.lang.String)
property to include additional attributes in the image tags.
Chart.setHeight(int)
,
Chart.setWidth(int)
,
Chart.setRenderFormat(java.lang.String)
,
setTagAttributes(java.lang.String)
,
setSizeable(boolean)
,
Chart
public void setInteractive(boolean value)
Allow you to render dynamic html combined with a image.
The Chart.setRenderFormat(java.lang.String)
property must be configured to a valid image format in order for this method to have any effect. When set to False, the chart is generated as a PNG by default. JPEG images may be generated by configuring the RenderFormat property to "JPEG" when Interactive is set to False.
When charts are configured to generate as Interactive, DHTML and client side JavaScript is used to provide interactive features for the chart.
The Chart.getImageSettings()
property is used to access the ImageSettings object of a chart.
Chart.setRenderFormat(java.lang.String)
,
Chart
public void setQuality(int value)
Allows you to set the image quality for generated Jpeg chart images. This property receives an integer between 0 and 100. Zero being the default setting, 1 being low quality and 100 being best quality.
This property only applies when generated charts are Jpeg format. Other formats do not support this feature.
You may set the format of generated charts using the Chart.setRenderFormat(java.lang.String)
property of the Chart
Class
.
Chart.setRenderFormat(java.lang.String)
,
Chart.renderToStream()
,
Chart.renderControl()
,
Chart
public void setSizeable(boolean value)
Allows to stretch the generated image if the image dimension and the dimension at the Chart level differ.
When Sizeable is set to true, the image will have a size based on the Chart.setHeight(int)
and Chart.setWidth(int)
properties of the Chart
, but the image will be stretched to the dimension provided by the setHeight(int)
and setWidth(int)
properties of the ImageSettings
Class
.
setHeight(int)
,
setWidth(int)
,
Chart.setHeight(int)
,
Chart.setWidth(int)
public void setTagAttributes(String value)
A string property that will be appended to the IMG tag created by Chart FX.
This property is very useful when you need to modify the <IMG> tag created by Chart FX. For example, if you wanted to add "Border = 0" attribute to the image tag where the chart is displayed you can do so with this property.
This method also is used in conjunction with the Chart.exportChart(java.io.OutputStream)
and Chart.importChart(java.io.InputStream)
methods of the Chart
Class
. When the Chart.exportChart(java.io.OutputStream)
or Chart.importChart(java.io.InputStream)
file fomats are set to FileFormat.External, Chart FX will read the ImgTags string looking for a file extension (e.g. svg). Chart FX will generate the chart in the desired format using an image writer assembly. This will allow Chart FX to add additional image formats to the charting component by including another assembly.
Chart.renderToStream()
,
Chart.importChart(java.io.InputStream)
,
Chart.exportChart(java.io.OutputStream)
,
Chart
public void setToolTips(ImageToolTipStyle value)
Allows you to control how ToolTip will appear in the chart area.
When the WithMouse enumeration is selected, a JavaScript will be added in your code to show a tooltip for any browser. It will add the following function calls to the AREA tag:
onmouseover="popupon('<ToolTip>',event)";
this function will be called when the mouse passes over the Image Map area:
onmouseout="popupoff()";
this function will be called when the mouse abandons the Image Map area.
You are responsible for the implementation of these functions.
Chart.setToolTips(boolean)
public void setWidth(int value)
Specifies the suggested width (in pixels) of the chart when generating images.
This property will only be used if an image is generated by Chart FX. If you plan to use an an active component on the browser, you may set the Chart.setHeight(int)
and Chart.setWidth(int)
methods of the Chart
Class
to set the height and width of the chart.
Chart.setHeight(int)
,
Chart.setWidth(int)
,
Chart.setRenderFormat(java.lang.String)
,
setTagAttributes(java.lang.String)
,
setSizeable(boolean)
,
Chart.renderControl()
,
Chart
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |