Selecting proper toolkit for a 2D simulation project in Java - java

I am looking for a toolkit that will allow me to design widgets containing 2D graphics for an elevator simulation in Java. Once created, those widgets will be integrated with SWT, Swing, or QtJambi framework.
Background information:
I am developing an Elevator Simulator for fun. My main goal is to increase my knowledge of Java, Eclipse IDE, and more importantly concurrency. It is certainly fun and I enjoyed implementing this State Machine Pattern.
Anyway, I am at a point where I would like to see the Elevator on the screen and not limit myself to log its operations on the console.
I will probably choose SWT, Swing, or QtJambi for the UI controls but I am wondering what to do with the graphical part of the simulation.

You can use an SWT canvas (or Swing canvas, or OpenGL canvas via JOGL, ...), and set it up as an Observer of your simulation, and whenever the simulation state changes, you can redraw the new state.

You could get some abstract graphics out of a Graph visualisation tool such as JGraph. You could use this to visualise which state your elevator is in. However, i'm not sure how flexible these sort of graph visualisation tools are and whether you can add your own graphics and animations.

Are you sure you actually want to be using widgets. Would using Graphics2D+friends and your own abstractions not be a better fit?

Related

Java swing gui and lwjgl

A simple question: Is it possible to view gui of java Swing library and lwjgl 3D scene in the same window without using any additional gui libraries? How?
You can use the method Display.setParent(java.awt.Canvas) to put the LWJGL display on a canvas. You can then incorporate this canvas into your Swing GUI. Please note that there may be slight performance issues with said approach.

Tkzinc like library in java

I need to develop some canvas window with graphical entities.
I want to know is there library similar to Tkzinc in java?
http://www.tkzinc.org/tkzinc/index.php
I've used Eclipse GEF before, but that is built on top of an SWT canvas, not Swing. I'm not sure if that's compatible with what you need.
It allows you to build an object-oriented graphical model which responds to events and can be moved around, etc.
The underlying drawing framework is Draw2D which might be useful on its own if you don't want a full MVC framework for editing a model.

Is it possible to make a Java SWT composite with an alpha value?

I am developing a GUI in Java SWT for use in a 3D particle physics simulator. The current GUI is quite clunky and unattractive, as it consists of multiple windows. I would like to consolidate the GUI into one window with a canvas, however to preserve functionality I must also add composites on top of this canvas. For aesthetic reasons, I would like the composites to be semi-transparent. I have done quite a bit of research, however nothing has worked so far. Is this even feasible using the composite API, and If so, how would I go about implementing it?
It is possible to set the transparency of a Shell - Shell.setAlpha(int).
Are you sure that semi-transparent composites will work if they are static? Isn't the idea to have semi-transparency on a floating window?

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java?
I'd like to be able to do some prototyping of creating new types of interfaces for navigating within data and representing object graphs/relationships.
Low and no cost options are better. Open Source is also a plus.
UPDATE:
The higher level the api the better. Ideally I could set some properties (color, shape, etc) on my virtual object, register it with the visualization environment/engine, hook in callback functions...for example when a user hovers, clicks or double clicks on an object my code would get kicked off, and the visualization environment would handle the rest. So the rendering of the objects, navigation, zoom, user interaction would all be handled by the engine. Tall order probably, but this seems like it could exist as a reusable/generic tool.
Java3D is a pretty good 3d visualization in library. OpenGL is a standard 3d graphics library and JOGL is a port to Java.
Haven't done more than play with it, but you may want to look into processing. You could build some virtual objects, then pan around it with the mouse.
You might try JMonkeyEngine. It's higher level than Java3D and JOGL.

What are some techniques to create scrollable areas?

I'm getting started with OpenGL ES on Android and I'd looking to learn some techniques to have a game map larger than the visible area.
I'm assuming I've somehow got to ensure that the system isn't rendering the entire scene, including what's outside of the visible area. I'm just not sure how I'd go about designing this!
This is for simple 2D top-down tile based rendering. No real 3D except what's inherent in OpenGL ES itself.
Would anyone be able to get me started on the right path? Are there options that might scale nicely when I decide to start tilting my perspective and doing 3D?
There are many, MANY techniques for accomplishing this goal, but the base idea of what you are looking for is called Frustum Culling, that is not drawing anything the user isn't going to see anyway. Here and here are a couple of tutorials on how this works.

Categories

Resources