I have a table with the following structure:
[relation, variable1, variable2]
I would like to visualize those relation over a triangular matrix, something like this but with any number of variables and not only 4. Is there any free java library to do so? any ideas on how to visualize it by my own?
I don't have any code yet, Just thinking about the idea and process of how doing it.
much appreciation to all :)
I suggest you use a Swing framework that is natively provided by Java so you don't have to import any external library for this task.
I think painting this matrix (as in your link) is not difficult using Swing.
I find this discussion very useful for your case How to draw grid using swing class Java and detect mouse position when click and drag
Because it provides an example of painting a matrix.
Related
I searched a bunch of websites to find a working example of how to create a Voronoi based 3D Box.
The following link shows you guys for what i am looking for. Can someone help me out with this?
I created "Seedpoints" in a 3D Box and now what? ... couldnĀ“t find a good and simple example on openprocessing either.
Thank you in advance.
Picture
I think Voro++ is doing exactly what you want. However, it is written in C++ but creating a small wrapper using swig for example will provide you a java binding.
You can start with 2D texture created by processing library Mesh (just use getEdges() function to draw border lines of regions) and use it with texture mapping on your 3D box.
Voronoi diagrams can be easily handled with pixel shaders depending on the format of your seed points This example is the best I've found so far but it relies upon points whose coordinates are computed inside the shader, at least to my understanding.
I'm currently trying to think of a way to plot a graph in Java.
The basic way my program is meant to work is it finds a users .csv file and in there will be some sort of habit and the date. So like drove 5 miles on 24.10.13.
So I need to be able to extract the 5 and the 24.10.13 and take those as my Y and X co-ordinates respectively as other things are measured against date and it makes sense to have that as the X value.
So is there a library I can import or a Function I'm not aware of and could you give a simple example on how to use it?
NOTE - I've done my GUI in JavaFX as I'm not that great in JFrame and I know nothing of Swing
JavaFX has built-in charts. You may check it out. That way, you won't need any external libraries.
How about using JFreeChart to plot your data? You can see some samples here. JGraph seems to be geared towards visualizing graphs, not for plotting functions.
I'm doing a project to implement virtual chemistry laboratory system. I tried to do this by using java2D. I have come across a big issue here. that is how to show some kind of filling effect to a beaker or to a flask (beaker is an image). I tried out this with setPixel() method in WritableRaster(java.awt.image) class. but it is not much useful.
I need a help to show something filling to a beaker and to show color change when mixing two chemicals. please remember that beaker is an image. thanks in advance if anyone can give me a solution with sample code.
Conveniently, many classes implement the Shape interface. Implementing classes work well with fill(), as shown here. To display color transitions, consider AlphaComposite, shown here.
I'd advise using a dynamic SVG canvas using Batik, and then you can use advanced high-level features like masks and blending and such. It's not the most efficient solution, but who cares? It's flexible for the future. Also, it'd take a lot of optimisation to work out what parts of the image have actually changed and pass that through for efficiency. I expect Batik does that as standard. Also, you'll have something that looks really very nice.
Anyway, then you just need to use Inkscape to create the SVG, and then modify the DOM (Document Object Model) accordingly. It's just like messing with HTML. Here is some SVG beaker clipart.
I need to draw some execution sequences for some real time systems scheduled using rate monotonic algorithm. The drawing has to be done using Java and it has to be very basic.
Do you a very simple way to do this drawing? Simpler than Graphics2D?
Thanks a lot!
The diagram I want to be as simple or even simpler as this one:
I would suggest you to try with Processing, which is able to do such things with Java in zero time.. home page here.
You can easily embed a Processing frame inside your app, but remember that they are based on AWT so they are heavy weight and don't like being overlayed (for example in a JInternalFrame)
By the way what you seem to want to draw is a Gantt chart right?
You can try with JFreeChart too (see demo here), it's quite customizable and works fine.. homepage here
I saw the following nice looking tool tips, created using JavaScript JQuery Toolkit.
I was planning to implement a similar look in my Java standalone application.
I was wondering what is the techniques needed to create such effect?
http://sites.google.com/site/yanchengcheok/Home/Tooltip.PNG?attredirects=0
The things come out from my head are :
Transparency - java.awt.AlphaComposite
Gradient Background - java.awt.GradientPaint
Background Shadow - ???
White Line Around The Black Box - LineBorder ?
What is the keyword I shall look for, for the technology marked with ???
Thanks.
Or more preferable, some ready-made library, that can be displayed along JXLayer.
Filthy Rich Clients is a good book for learning how to use Java to create graphical components/effect like the tooltip you want.