I'm using JFreeChart to make some graphs in a Java application. I'm trying to figure out how to let the user edit the series paint/stroke. In the Chart Properties window there's a spot for this, but it just says "No editor implemented". Is there a way through the API to provide JFreeChart with an editor for these properties, or do I have to implement one totally separately from the Chart Properties editing window?
Support for this is described as "incomplete" in org.jfree.chart.editor. As a start, you can look in DefaultChartEditor to see how the "BackgroundPaint" command is handled. You may be able to use ChartEditorManager to specify a ChartEditorFactory that uses your custom ChartEditor; you may also want to check out a copy of the development branch, cited here, using svn.
Related
I am struggling with something regarding java swing....I need to know how the linear text fields in most google apps are made....the ones where there is only one line in the bottom and how can I make them interactive. I don't need the app designer in net beans(that's our instructor)..Anyone can help please?
PS: I tried so hard to look up for such a thing but all I find is a drag and drop design. I searched everywhere but I found nothing.
The design of the graphic component in Google app is depending to the mobile operative system. In iOS and Android you will have different design for the same component, as you can see:
If you want to change the design of a graphic component (in an App or, in this case, in Java Swing) you have to write a Custom text field.
You can read Customizing JTextField for a simple example.
Hi I'm working on a hard drive simulation in java and I want to be able to represent fragmentation in any given drive(represented as a series of Objects Hashmaps,Arrays etc) Something like the bars in xp's old fragmentation tool XP toolbar. I was thinking of a bar or pie chart from google i have gleamed that swing may be my best option? Could anyone give any pointers how I might go about this.
I would check out JFreeChart for a potentially huge number of possible renderings. Here's a page with a large number of samples, including code.
JFreeChart is usually the best choice for charting in Swing applications. There are some other open-source libraries as well. See the last question on this page.
However, if you need some custom features, you may need to do some custom rendering in Graphics2D.
JFreeChart might be a solution for bar or piecharts, but If you just need a simple stacked bar, I would indeed recommend overwriting a JLabel from the swing library. That will be very easy.
If you need some more graphs and plots and stuff anyway, definitely have a look at JFreeChart, it's great.
First, I am a final year student. We are creating a KPI and we saw JFree chart can be used to display charts. Now we have a problem about deciding whether the software is web based or not (Major votes came for a Desktop application. Only 1 is there for web based solution. ).
However, this what we have to do;
Display data using Charts
Colors of the areas of the chart MUST change during run time (eg: if < 90% attendance 'RED', if > 90% attendance 'GREEN')
When the user clicks on the particular area of the chart, display all the relevant data as a 'Tool Tip Text Box' or something. When mouse over, display some summary.
There will be 6 KPI's in the dashboard.
KPI's are belong to 2 categories, HR and PROJECTS.
Now my question is, what is the easy way of doing it? Web Based or Desktop? Will JFreeChart support these functions when it is in web? Please help!
First the long answer, then the short one. If you are using JFreeChart on the web, you have two options:
Display the charts in an applet, which will allow you to do basically all the stuff that JFreeChart supports, including the ones you mentioned above.
Use JFreeChart on the server side to generate images that will be served by the server. In this case, #2 will be difficult because you will have to refresh pages, #3 will be very hard or even almost impossible
Given the above, the short answer is: I suggest you build a desktop application, it will be easier to deal with charting.
From my experience is better use a Javascript Library to generate a gantt chart and later integrate with any framework Java Web. You could use some libraries for example:
Twproject Gantt
JQuery Gantt
JSGantt Improved
JQuery.Gantt
Finally There is an option with cost: Daylot Gantt
If you want to use JFreechart It can be used to render an image and post it on the page, you also could use some form of jquery based chart ploting. Either way you would have to take control of refreshing the data. In standalone app it might be somewhat easier.
you can use these JFreeCharts the requirements you have specified.
JFree charts will display the charts as images. But there are some methods which will display the tooltips and the summary, You have to implement those methods based on your requirements.
I'm trying to create a GUI with netbean, and I've created a tool bar with different icon. What I want to do is this: When you mouse over one of the button I want a little text bubble to appear with text that I will have specified.
I've been searching the web for a while, and all I could find was something about this package: "org.openide.awt" wich contains (in theory from what I've read) NotificationDisplayer.
If this thing really works with java and netbeans well, I can't get it to work. All I need to know is does this package is actually netbean/java compatible, or better, if there is a simpler way to display a text bubble.
A tool tip?
The JComponent API has support for that.
Check if this is what you need:
How to Use Tool Bars
ie:
We need to implement a Java desktop application that allows us (initially) to create / edit / resize / polygons on (initially) images. Then these polygons would be mapped to objects in our domain model.
So we basically need a toolbar with the options describe above and the possibility for the example to create a polygon on the an image and then scale it, or resize it, just that.
Do you know some library that could facilitate our work?
We've analyzed GEF, Picollo, NetBeans Visual API, Plain Swing or SWT/JFace, but none of them seems to help us to achieve our goal, which is, implement a really basic image editing tool.
I would like to mention that I'm not saying that what I want to do is not possible with the analyzed libraries, of course it can be done, but I'd like to learn from your experiences which is the correct path to take for this problem.
Any suggestion will be welcomed.
You could try to use GEF and the eclipse plataform.
this article could help you.
saluti
You might look at GraphPanel, a simple object drawing program. The control components are arranged in a JPanel, but JToolBar is a more flexible alternative.
Have you looked at imagine.dev.java.net? It is a NetBeans Platform application, which, though unfinished, might provide you with an interesting starting point.