⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 presales_questions.html

📁 java图形报表制作Applet
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p><br>
<a name="copy_paste"></a>
<p><font color=darkred>
<b>37. Does EasyCharts support copy & paste?</b>
</font>
<p>
No. Due to EasyCharts being based on JDK 1.02 and JDK 1.1, copy & paste 
is not supported.


<p><br>
<a name="floating_labels"></a>
<p><font color=darkred>
<b>38. How do I display tool-tip like labels?</b>
</font>
<p>
For the bar chart applet, do the following:
<p>
&lt;param name="valueLabelStyle" value="floating"&gt;<BR>
&lt;param name="sampleLabelStyle" value="floating"&gt;
<p>
In an java application call the following methods:
<p>
setValueLabelStyle(Chart.FLOATING);<BR>
setSampleLabelStyle(Chart.FLOATING);
<p>
The labels in the pie chart is floating by default. 
<p>
<a href="examples/bar_chartlabels.html#floating">floating bar sample labels</a><br>
<a href="examples/bar_value.html#floating">floating bar value labels</a>


<p><br>
<a name="flickering"></a>
<p><font color=darkred>
<b>39. How do I avoid flickering of the charts when they repaint?</b>
</font>
<p>
In a java application, use the NonFlickerPanel class supplied by 
EasyCharts.
<p>
BarChart chart = new BarChart();<BR>
// set the chart data<BR>
// ...<BR>
// add the chart in the NonFlickerPanel<BR>
NonFlickerPanel p = new NonFlickerPanel(new BorderLayout());<BR>
p.add("Center", chart);<BR>
// display the chart<BR>
Frame f = new Frame();<BR>
f.add("Center", p);<BR>
f.setSize(300,200);<BR>
f.show();
<p>
Only the charts in the com.objectplanet.chart package (the classes found in
the chart.jar file) tend to flicker when used in java applications. The
charts in the com.objectplanet.chart102 package (the classes found in the
com/objectplanet/chart102 directory) does not flicker, and the 
NonFlickerPanel class is not availabel in the chart102 package.


<p><br>
<a name="line_types"></a>
<p><font color=darkred>
<b>40. Does the line chart support different line types?</b>
</font>   
<p>
No. Due to the charts being based on JDK 1.02 and JDK 1.1 they do 
not support different line styles.


<p><br>
<a name="url"></a>
<p><font color=darkred>
<b>41. How do I associate a URL with a chart sample?</b>
</font>
<p>
Use the url parameter:
<p>
&lt;param name="url_0" value="orange_sales_1999.html"&gt;<BR>
&lt;param name="url_1" value="apple_sales_1999.html"&gt;<BR>
&lt;param name="url_2" value="banana_sales_1999.html"&gt;<BR>
&lt;param name="url_3" value="http://www.objectplanet.com"&gt;
<p>
Since Java can only call valid URL links, JavaScript functions can
not be called using the url parameters. Netscape comes with something called
JSObject which can be used. See 
<a href="http://www.apl.jhu.edu/~hall/java/JavaScript-from-Java.html">here</a>
for instructions.
      

<p><br>
<a name="download_time"></a>
<p><font color=darkred>
<b>42. What is the download time of the chart applets?</b>
</font>
<p>
The size of the chart.jar file is approx. 80KB and will take about 12-15 
seconds on a 56K modem. On a LAN it takes less than 1 second to 
load the chart classes.


<p><br>
<a name="chart102"></a>
<p><font color=darkred>
<b>43. What is the difference between chart.jar and com/objectplanet/chart102?</b>
</font>
<p>
EasyCharts consists of 2 versions. One version that is compatible with JDK 1.1
(and newer) with a package name of com.objectplanet.chart. The classes for this 
package is located in the chart.jar.
<p>
If you are using applets and you want to use the chart.jar file, set your
applet tag to the following
<p>
&lt;applet code=com.objectplanet.chart.BarChartApplet<br>
&nbsp;archive=chart.jar width=300 height=200&gt;<br>
&lt;/applet&gt;
<p>
If you are generating the applet tags using CGI scripts, you might need
to use relative or absolute paths for the class files such as
<p>
&lt;applet code=com.objectplanet.chart.BarChartApplet<br>
&nbsp;archive=/EasyCharts/chart.jar width=300 height=200&gt;<br>
&lt;/applet&gt;
<p>
If you are developing java applications either load the chart.jar file
into your development environment or add it to your CLASSPATH environment
variable.
<p>
Then import the classes into your application with
<p>
import com.objectplanet.chart.*;

<p>
The other version is compatible with JDK 1.02 and older web browsers such as
Internet Explorer 3 and Netscape 3. The package name for this version is
com.objectplanet.chart102 and the class files are located in the
com/objectplanet/chart102 directory.
<p>
If you are using this version create a directory named 
com/objectplanet/chart102 on your web server in the same directory where
the applet pages are. Make sure the web browsers connecting to it has access 
to this directory. Then set your applet tag to
<p>
&lt;applet code=com.objectplanet.chart102.BarChartApplet<br>
&nbsp;codebase=./ width=300 height=200&gt;<br>
&lt;/applet&gt;
<p>
If you are generating the applet tags using CGI scripts, you might need
to use relative or absolute paths for the class files such as
<p>
&lt;applet code=com.objectplanet.chart102.BarChartApplet<br>
&nbsp;codebase=/EasyCharts/ width=300 height=200&gt;<br>
&lt;/applet&gt;
<p>
(with the com/objectplanet/chart102 directory under the EasyCharts directory)


<p><br>
<a name="japanese"></a>
<p><font color=darkred>
<b>44. Can EasyCharts display Japanese characters?</b>
</font>
<p>
Yes, see <a href="examples/java/JapaneseChart.html">example</a>.


<p><br>  
<a name="browser_scrolling"></a>
<p><font color=darkred>
<b>45. Why do the chart applets have problems repainting when I scroll the web page?</b>
</font>
<p>
Some browsers has problems repainting complex java applets. Use the 
automaticRefreshTime parameter to work around this problem. This parameter 
makes the applet repaint itself every n milliseconds:
<p>
&lt;param name="automaticRefreshTime" value=1000&gt;


<p><br>
<a name="netscape_printing"></a>
<p><font color=darkred>
<b>46. Why do I have problems printing the charts in Netscape?</b>
</font>
<p>
In earlier versions, netscape did not support printing of java applets. In 
later versions it supports printing, but the applets are always printed 
relatively larger than they appear on the screen. We have not found a 
workaround for this other than to use another browser or have the charts
generated as images on the server.


<p><br>
<a name="netscape_freeze"></a>
<p><font color=darkred>
<b>47. Why does Netscape Communicator freeze when accessing a web page with charts?</b>
</font>
<p>
This is a known bug in Netscape Communicator an it may also occure when using 
other applets. You can find description and solution of the problem 
<a href="http://www.ufaq.org/commonly/java_remedy.html">here</a>.

<p><br>  
<a name="evaluation"></a>
<p><font color=darkred>
<b>48. How do I remove the red evaluation button and copyright banner?</b>
</font>
<p>
Purchase a valid license from our
<a href="http://objectplanet.com/purchase.html">purchase page</a>, 
download the registered software, and replace the evaluation version. Then 
restart your web browser.
<p>
If you still have the red button displayed, you might have some old evaluation
classes loading from elsewhere on your systems. To check for this, remove
the archive=chart.jar tag from your applet tag, close and restart your
browser and test again. The applet should not start. If it does, you need
to remove any com/objectplanet/chart classes (or chart.jar) files from
your CLASSPATH environment variable.
<p>
If it still does not work, restart your web server and or client machine.
Also try and test with other client machines connecting to your
web server (if you are running as an applet).


<p><br>
<a name="netscape_mac"></a>
<p><font color=darkred>
<b>49. I am having problems with Mac/Netscape. How do I fix it?</b>
</font>
<p>
You need to download the MacOS Runtime for Java (MRJ) Plug-In for Netscape, 
and then enable it in your browser. You can find details and links to the 
downloads <a href="http://www.mozilla.org/oji/MRJPlugin.html">here</a>


<p><br>
<a name="linux_no_x"></a>
<p><font color=darkred>
<b>50. How do I use EasyCharts on Unix without X-Windows installed?</b>
</font>
<p>
Java's AWT (graphical system) needs an underlaying graphical architecture such
as X-Windows to work. A servlet executed on a unix server without X installed
or running will throw an exception.
<p>
If you want to run ChartServlet on a linux computer without X-Windows, you can:<br>
<b>1.</b>Install <b>Xvbf</b> - a virtual X server which can run on machines
without display or physical graphical devices.<br>
or you can<br>
<b>2.</b>Install <b>PJA</b> - Pure Java AWT replacement library.
<p>
<b>XVFB</b><br>
You can get Xvfb for Linux from 
<a href="ftp://ftp.xfree86.org/pub/XFree86/3.3.6/binaries/Linux-ix86-glibc20/Xvfb.tgz">ftp.xfree86.org</a>.
Distributions for other Unix systems can also be found at <a href="ftp://ftp.xfree86.org">ftp.xfree86.org</a>.
You can also get Xvfb source at <a href="ftp://ftp.x.org">ftp.x.org</a> and compile it.
<p>
1. Install Xvfb in a directory on your linux computer<br>
2. Run Xvfb by typing in ./Xvfb :0 where 0 is the X-windows display number.<br>
3. Set the DISPLAY variable to point to localhost:0<br>

<p>
The Xvfb should now be installed properly. You can now run graphical servlets
such as EasyChart's ChartServlet on a headless Linux server.

<p>
For more information about Xvfb check <a href="http://www.xfree86.org/4.0.1/Xvfb.1.html">http://www.xfree86.org/4.0.1/Xvfb.1.html</a>

<p>
<b>PJA</b><br>
Persuming your<br>
- Java is installed into: /usr/local/jdk1.2.2<br>
- Tomcat is installed into: /home/user/tomcat<br>
- PJA is installed into: /home/user/pja<br>
<p>
<b>1.</b> Run <i>http://server/examples/servlet/com.eteks.servlet.DefaultToolkitTest</i> and
   <i>PJAToolkitDemo.sh</i> to see if servlets and applications can run on the server.
   PJAToolkitDemo.sh shoudl look like this:<br>
<i>&nbsp;&nbsp;&nbsp;java -Xbootclasspath/a:../lib/pja.jar \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Dawt.toolkit=com.eteks.awt.PJAToolkit \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Djava2d.font.usePlatformFont=false<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Djava.awt.fonts=/usr/local/jdk1.2.2/jre/lib/fonts \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Duser.home=.. \<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-classpath ../lib/pjatools.jar \<br>
&nbsp;&nbsp;&nbsp;ToolkitDemo<br></i>
   If you see that 4 gifs were generated, it means that you can use graphic servlets
   on this server with PJA.
<p>
<b>2.</b> In /home/user/tomcat open file tomcat.sh and find string<br>
<i>JAVACMD="$JAVA_HOME/bin/java.</i><br>
Replace it with<br>
<i>JAVACMD="$JAVA_HOME/bin/java -Xbootclasspath/a:/home/user/pja/lib/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -Djava2d.font.usePlatformFont=false -Djava.awt.fonts=/usr/local/java/jre/lib/fonts -Duser.home=home/user/pja"</i><br>
and next to it add<br>
<i>CLASSPATH=${CLASSPATH}:/path_to_chartServer.jar/chartServer.jar</i><br>
<p>
<b>3.</b> Start Tomcat and enter in your browser:
<i>http://server/examples/servlet/com.objectplanet.chart.ChartServlet</i><br>
A chart image should be returned to your browser now.
<p>
For more information about PJA see PJA FAQ which follows with the PJA distribution<br>
<a href="http://www.eteks.com/pja/en/">http://www.eteks.com/pja/en/</a>

<p><br>
<a name="beaninfo"></a>
<p><font color=darkred>
<b>52. Why does my web server report 404 errors on BeanInfo.class files?</b>
</font>
<p>
See 
<a href="http://support.microsoft.com/support/kb/articles/Q243/7/71.ASP">here</a>.



<p>
<br>
<hr>
<font size=-2>
Copyright (C) 1998-2002
<br>ObjectPlanet, Inc.
<br>(+47) 2233 3360
<br><A href="mailto:mail@objectplanet.com">mail@objectplanet.com</A>
</font></font>

</BODY>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -