Search the web
Sign In
New User? Sign Up
jsci
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Upgrading the Jsci library breaks my code....   Message List  
Reply | Forward Message #141 of 369 |
Hi, I have been using the Jsci library (core and xtra)with my
program since Jsci version 0.911. Today, I have updated library to
version 0.914, then program crashes (graph line can not be drawn and
application is freezed.)

I wanted to use the method "setNumberFormat()" in the JLineGraph
class. but Jsci 0.911 does not support this. Does anyone has any
suggestions? I really appreciate if somebody could help me out here.

A part of my sorce code is showing bellow. This code can be
compiled, but does not behave correctly. Please point out the
problem.

regards,
Kaz

final float[] points = new float[data.length];
ValueType[] values = new ValueType[data.length];
for(int i=0; i<data.length; ++i) {
values[i] = ValueTypeFactory.getInstance(p, data[i]);
points[i] = values[i].getData()*1.0f;
if(p.getUnitCount()!=0) {
points[i] = points[i]/p.getUnitCount();
}
if(p.getUnit()==Parameter.UNIT_PERCENT) {
points[i] = points[i]*100;
}
}

mModel=new DefaultGraph2DModel();
mModel.setXAxis(0.0f,255.0f,points.length);
mModel.addSeries(points);

JLineGraph graph = new JLineGraph(mModel);
graph.setColor(0, LINE_COLOR);


setName(p.getSymbol());


setLayout(new JGraphLayout());

add(new JLabel("(Time)"), "X-axis");
//add(new JLabel(p.getSymbol() + " (" + p.getUnit()
+ ")"), "Y-axis");
JLabel symbolLabel = new JLabel(p.getSymbol());
JLabel unitLabel = new JLabel("("+ p.getUnit() +")");

symbolLabel.setFont(new Font("Default",Font.BOLD,15));

JPanel titlePanel = new JPanel();
titlePanel.add(symbolLabel);
titlePanel.add(unitLabel);

add(titlePanel,"Title");
//add(new JLabel("("+ p.getUnit() +")"),"Y-axis");
add(graph, "Graph");
setBackground(GRAPH_BACKGROUND_COLOR);




Fri Aug 6, 2004 4:25 am

kaz_0202
Offline Offline
Send Email Send Email

Forward
Message #141 of 369 |
Expand Messages Author Sort by Date

Hi, I have been using the Jsci library (core and xtra)with my program since Jsci version 0.911. Today, I have updated library to version 0.914, then program...
kaz_0202
Offline Send Email
Aug 6, 2004
4:25 am

Try to set the VM Language to english via the System Property -Duser.language=en....
badkilla
Offline Send Email
Aug 14, 2004
2:27 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help