| Overview | Package | Class | Tree | Index | Help | NetCharts Pro (Applets) 7.0 | ||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--java.applet.Applet
|
+--javax.swing.JApplet
|
+--netcharts.chart.JChart
| Inner classes inherited from class javax.swing.JApplet | |
| javax.swing.JApplet.AccessibleJApplet | |
| Inner classes inherited from class java.applet.Applet | |
| java.applet.Applet.AccessibleApplet | |
| Inner classes inherited from class java.awt.Panel | |
| java.awt.Panel.AccessibleAWTPanel | |
| Inner classes inherited from class java.awt.Container | |
| java.awt.Container.AccessibleAWTContainer | |
| Inner classes inherited from class java.awt.Component | |
| java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy | |
| Field Summary | |
| JGraph | graph
Reference to the underlying netchart object. |
| java.net.URL | url
The URL associated with this chart. |
| Constructor Summary | |
| JChart(java.applet.Applet app)
Construct a new JChart. | |
| Method Summary | |
| void | clean()
This method cleans the chart and its parameters, making it ready to be reused. |
| void | display()
Instruct the chart to reread its parameters and redisplay itself. |
| java.awt.Image | drawImage(int width,
int height)
Create an image of the given size and draw the current representation of the chart to it. |
| java.applet.Applet | getApplet()
Get the applet for this Chart. |
| java.lang.String | getAppletInfo()
Return information about the software version of this chart. |
| NFCdf | getCdf()
Return the NFCdf object associated with this JChart. |
| java.lang.String | getCDL()
Return the CDL representation of the JChart with all DataBean references removed, and all Data from those DataBean's inlined. |
| static JChart | getChart(NFCdf cdf)
Create an JChart object from the given chart definition. |
| static JChart | getChart(NFCdf cdf,
java.applet.Applet applet)
Create an JChart object using the given chart definition and applet. |
| static JChart | getChart(NFCdf cdf,
NFContext context)
Create an JChart object using the given chart definition and context. |
| static JChart | getChart(NFCdf cdf,
NFContext context,
boolean loadAppletParams)
Create an JChart object using the given chart definition and context. |
| NFContext | getContext()
Get the context for this Chart. |
| java.util.Vector | getErrors()
Returns a vector of String error messages that were generated when the chart was created. |
| int | getIndex(java.lang.String param,
java.lang.Object itemKey)
Returns the index (zero based) for a tuple attribute or a vector item, specified by a given itemKey. |
| boolean | getLoadAppletParamsOnInit()
Get whether the parameters contained in the Applet tag will be processed on the call to init. |
| java.util.Vector | getMetaData(java.lang.String name)
Returns the meta data value(s) for the given name. |
| java.util.Enumeration | getMetaDataKeys()
Return the list of metadata tags defined for this chart. |
| boolean | getModified()
Returns true if the chart has been modified without saving |
| java.lang.String | getName()
Return the name of the chart. |
| java.lang.String | getParam(java.lang.String param)
Returns a parameter definition expression for the current value of the given parameter. |
| java.lang.String | getParam(java.lang.String param,
java.lang.Object val)
Returns a parameter definition expression for the given value, as defined by the given parameter. |
| java.lang.String | getTextualDescription()
This method returns a textual description of the chart. |
| void | init()
This method must be called after a chart applet is created in order to initially layout the chart and to load the applet parameters. |
| void | loadParams(NFCdf cdf)
Load chart parameters from the given CDF object. |
| void | loadParams(java.lang.String str)
Load chart parameters from the given script. |
| void | loadParams(java.lang.StringBuffer script)
Load chart parameters from the given script. |
| void | loadParams(java.lang.String host,
int port,
java.lang.String args)
Load chart parameters from the Parameter Server at the given host and port. |
| void | loadParams(java.net.URL url)
Load chart parameters from the given URL. |
| void | loadParamsJS(java.lang.String str)
Load chart parameters from the given script. |
| java.awt.Dimension | preferredSize()
Return the preferred size of the chart. |
| void | printAll(java.awt.Graphics g)
Print the chart. |
| void | reloadChart()
Reload the chart from its underlying Cdf representation. |
| void | reloadChart(boolean force)
Reload the specified chart from its underlying Cdf. |
| boolean | reloadNeeded(java.util.Date timestamp)
Returns true if any of the underlying data sources for the chart have changed since the given timestamp. |
| void | reshape(int x,
int y,
int width,
int height)
Resize and reposition the chart. |
| void | resize(int width,
int height)
Resize the chart. |
| void | set(java.lang.Object expr)
Parses the given parameter expression, which may be defined using any of the types supported by NFLoadParams.loadParams(). |
| void | set(java.lang.String param,
int itemIndex,
int attrIndex,
java.lang.Object val)
Set the data value for a specific attribute within a TUPLE VECTOR. |
| void | set(java.lang.String param,
int itemIndex,
java.lang.Object val)
Set the data value for a specific attribute or item within a TUPLE or VECTOR parameter, based on the itemIndex given. |
| void | set(java.lang.String param,
java.lang.Object val)
Set the data value for the given parameter. |
| void | set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object val)
Set the data value for a specific attribute or item within a TUPLE or VECTOR parameter, based on the given itemKey. |
| void | set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object attrKey,
java.lang.Object val)
Set the data value for a specific attribute within a TUPLE VECTOR. |
| void | setApplet(java.applet.Applet a)
Set the applet for this Chart. |
| void | setCdf(NFCdf cdf)
Set the NFCdf object for this JChart. |
| void | setContext(NFContext context)
Set the context for this Chart. |
| void | setLoadAppletParamsOnInit(boolean b)
Sets whether the parameters contained in the Applet tag will be processed on the call to init. |
| void | setModified(boolean isModified)
Method to indicate whether the chart has been modified since the last save. |
| void | setScale(double scale)
Set the chart scale factor. |
| void | start()
Starts the chart. |
| void | stop()
This method should be called whenever the parent applet is stopped or when a standalone application wants to suspend chart processing for some reason. |
| Field Detail |
public JGraph graph
public java.net.URL url
| Constructor Detail |
public JChart(java.applet.Applet app)
| Method Detail |
public java.applet.Applet getApplet()
public void setApplet(java.applet.Applet a)
a
- The applet to be associated this chart.public NFContext getContext()
public void setContext(NFContext context)
context
- The chart context.public static JChart getChart(NFCdf cdf)
cdf
- An NFCdf chart definition.
public static JChart getChart(NFCdf cdf,
java.applet.Applet applet)
cdf
- An NFCdf chart definition.
applet
- The applet to assoicate with this chart.
public static JChart getChart(NFCdf cdf,
NFContext context)
cdf
- An NFCdf chart definition.
context
- The contect object to assoicate with this chart.
public static JChart getChart(NFCdf cdf,
NFContext context,
boolean loadAppletParams)
cdf
- An NFCdf chart definition.
context
- The contect object to assoicate with this chart.
loadAppletParams
- Whether to load the applet parameters on init.public boolean getLoadAppletParamsOnInit()
public void setLoadAppletParamsOnInit(boolean b)
public void init()
public void loadParams(java.net.URL url)
url
- The URL from which to load chart parameters.
public void loadParams(java.lang.String host,
int port,
java.lang.String args)
host
- The name of the machine hosting the Parameter Server.
port
- The port number of the Parameter Server on the host machine.
args
- Command line args to be delivered to the Parameter Server.public void loadParams(java.lang.String str)
str
- A String containing chart parameters to load.public void loadParams(java.lang.StringBuffer script)
script
- A StringBuffer containing chart parameters to load.public void loadParams(NFCdf cdf)
cdf
- An NFCdf object containing parameters to be loaded into this chart.public void loadParamsJS(java.lang.String str)
str
- A String containing chart parameters to load.public void setScale(double scale)
scale
- The chart scale factor.public java.lang.String getCDL()
public NFCdf getCdf()
public void setCdf(NFCdf cdf)
cdf
- The NFCdf to associate with this JChart.public boolean getModified()
public void setModified(boolean isModified)
isModified
- Indicator that chart has been modified wothout saving.public java.lang.String getName()
public java.util.Vector getErrors()
public void display()
public java.lang.String getAppletInfo()
public void stop()
public void start()
public java.awt.Image drawImage(int width,
int height)
width
- The width of the desired image.
height
- The height of the desired image.public void printAll(java.awt.Graphics g)
g
- The graphics context to use for this print operation.
public void resize(int width,
int height)
width
- The new width.
height
- The new height.
public void reshape(int x,
int y,
int width,
int height)
x
- The desired x location of the chart.
y
- The desired y location of the chart.
width
- The desired width of the chart.
height
- The desired height of the chart.public java.awt.Dimension preferredSize()
public boolean reloadNeeded(java.util.Date timestamp)
timestamp
- The timestamp to compare.public void reloadChart()
public void reloadChart(boolean force)
If the force flag is true, then the chart will be reloaded regardless of any lack of modifications.
If the force flag is false, then the chart will be reloaded only if the underlying databeans (if any) have been modified since they were last loaded.
force
- Flag to force a reload.
public void set(java.lang.Object expr)
throws NFParamException
expr
- An expression to set on the chart.
public void set(java.lang.String param,
java.lang.Object val)
throws NFParamException
The VAL object should reference data according to the type of parameter specified by PARAM.
| Parameter Type | Data Object |
| Single-Value | Raw Data Object |
| Tuple Attribute | Raw Data Object |
| Tuple Parameter | Vector of Raw Data Objects |
| Simple Vector | Vector of Raw Data Objects |
| Tuple Vector | Vector of Vector of Raw Data Objects |
The following Raw Data Objects are supported for the various attribute types:
| Attribute Type | Raw Data Objects |
| String | Any object type |
| Number | Number, String |
| Date | NFDate, NFTimeUnit, Number, String |
| Color | Color, String |
| Symbol | Number, String |
| Image | NFParamImage, Image, String |
Examples:
set ("GraphType", "HORIZONTAL");
set ("Bar3DDepth", new Integer(15));
set ("BackgroundColor", Color.red);
set ("BackgroundWidth", new Integer(5));
Vector bg = new Vector();
bg.addElement (Color.white);
bg.addElement ("BOX");
bg.addElement (new Integer(5));
set ("Background", bg);
Vector labels = new Vector();
labels.addElement ("Engr");
labels.addElement ("Sales");
labels.addElement ("Mktg");
set ("BarLabels", labels);
Vector line = new Vector();
Vector pt = new Vector();
pt.addElement (new Integer(10));
pt.addElement (new Integer(20));
line.addElement (pt);
pt = new Vector();
pt.addElement (new Float(0.5));
pt.addElement (new Double(12.45));
line.addElement (pt);
set ("LineSet1", line);
param
- Parameter to set.
object
- New value for parameter.
public void set(java.lang.String param,
int itemIndex,
java.lang.Object val)
throws NFParamException
If a TUPLE parameter is specified, then the attribute with the given itemIndex will be replaced with the given data.
set ("Background", 0, Color.red);
set ("Background", 1, "BOX");
set ("Background", 2, new Integer(10));
If a SIMPLE VECTOR parameter is specified, then the vector element with the given itemIndex will be replaced by the Raw Data Object given.
set ("BarLabels", 2, "Marketing");
If a TUPLE VECTOR parameter is specified, then the entire vector tuple with the given itemIndex will be replaced by the Vector of Raw Data Objects given.
Vector pt = new Vector();
pt.addElement (new Float(13.5));
pt.addElement (new Double(10.0));
set ("LineSet1", 1, pt);
If a SINGLE VALUE parameter is specified, the itemIndex is ignored.
param
- Parameter to set.
itemIndex
- The target index within the TUPLE or VECTOR
object
- New value for parameter.
public void set(java.lang.String param,
int itemIndex,
int attrIndex,
java.lang.Object val)
throws NFParamException
The itemIndex is used to determine which tuple within the vector will be selected, and the attrIndex is used to determine which attribute within that tuple will be replaced by the Raw Data Object given.
set ("LineSet1", 2, 0, new Float(0.5));
specifies that first attribute (index = 0) of the 3rd tuple
(index = 2) in the LineSet1 vector should be changed to
a value of 0.5.
If a non-vector parameter is specified, the attrIndex is ignored.
param
- The parameter to set.
itemIndex
- The index of the tuple to set.
attrIndex
- The index of the attribute within the tuple to set
val
- The new value.
public void set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object val)
throws NFParamException
param
- The parameter name.
itemKey
- The item key.
val
- The new value for this item.
public void set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object attrKey,
java.lang.Object val)
throws NFParamException
param
- The parameter name.
itemKey
- The itemKey for the parameter.
attrKey
- The attribute key for the item
val
- The new value for this attribute of this tuple in this parameter.
public int getIndex(java.lang.String param,
java.lang.Object itemKey)
throws NFParamException
If a TUPLE parameter is specified, the itemKey is compared as a String to each of the attribute names defined within the tuple. If a match is found, the attribute index is returned.
getIndex ("Background", "Color")
getIndex ("Background", "Width")
If a SIMPLE VECTOR parameter is specified, the itemKey is compared against each value in the vector. If a match is found, the item index is returned.
getIndex ("BarLabels", "Fred")
If a TUPLE VECTOR parameter is specified, the itemKey is compared against the "first" attribute value (ie. the key attribute) in each tuple. If a match is found, the tuple index is returned.
i = getIndex ("LineSets", "Fred");
getIndex ("LineSet"+(i+1), new Float(0.5));
If a SIMPLE VALUE parameter is specified, zero is returned.
If no match is found, -1 is returned.
param
- The parameter name.
itemKey
- The item key
public java.lang.String getParam(java.lang.String param)
throws NFParamException
param
- The name of the desired parameter.
public java.lang.String getParam(java.lang.String param,
java.lang.Object val)
throws NFParamException
param
- The desired parameter name.
val
- The parameter value.public java.util.Vector getMetaData(java.lang.String name)
name
- The metadata key name.public java.util.Enumeration getMetaDataKeys()
public void clean()
public java.lang.String getTextualDescription()
| Overview | Package | Class | Tree | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2010 |
Last Modified: Jun 29, 2010 |