creating timeline-based editing gui in java - java

I want to create a timeline-based editing GUI in java - in the style of a video-editing software (such as adobe premiere for example). Below is an image, how I have the GUI in mind (sorry for not including it directly - as a new user that feature is disabled):
Whats currently implemented is just the timeline-slider at the top (with JSlider) - all the rest is just made up with Photoshop (also the black-line that goes down from the slider, through the layers).
Now my question is not very specific, I just wanted to get some input how I could implement the rest as nice as possible. To be a little bit more precise, I would appreciate hints to the following topics very much:
How to organize the whole gui - concerning the time indicator-line
which goes from the top to the bottom through all the layers?
How to visualize the waveform, are there good (and free) packages
that can be used? (audio files are either MP3 or WAV)
Which element to use for the text-segment layers (they should be draggable & droppable somehow) -> JLabels, JButtons, how to best solve the drag-n-drop feature?
You see I have still some work ahead of me, any good advice or point to the right direction would be very kind!

For the waveform issue you could take a look to this question and the accepted answer. The class creates a PNG image file, but you should be able, instead of saving the image, just display it in your programm.
The drag n' drop thing is well explained in this tutorial by Oracle.

Related

Is text rendering possible onto 2D images with Javascript/PHP?

I own a sports apparel company and I'm looking to have an applet built that will allow customers to see how their team names will look in certain colors on jerseys. Below you can see the final result of a competitor site's Flash applet where text is rendered on 2D surfaces/images.
My requirements: I need users to be able to set the font, primary text color, outline text color, and text style (arched or straight).
So my question-- Is this sort of text rendering possible with only Javascript/PHP?
If so, what limitations do you for see? I've been told the arching and outline text color may be issues. I've also been told that I may have to upload library files to a server where the actual rendering may take place.
If not, what scripting would you guys recommend? I'm trying to stay away from Flash because it's slow and costly.
I'll be passing this onto our developers so please feel free to be as detailed as possible. I figure'd I'd save them some leg work!
Thank you!
Depending on how complex you want your graphics to be, html5 drawing abilities could be used. Check Raphaƫl library, for instance, webGL/canvas renderers already have a lot of features in modern browsers.
As of the solution with server rendering, it's also possible with gd2(php), but imho that would be less convenient, at least try something different from php (btw, what's your backend running on?)
Your competitor's solution with java applet honestly seems the easiest, except that it requires jre, which few people are eager to install =)
That's kind-of a high level question, but yes you can definitely use javascript for it.
If there's a problem with getting characters to look right, you can always save each letter as a separate image and have javascript place them next to each other in preview. I'd try to see how close you could get with the existing fonts first.
Layering the text: one color large font, then a different color smaller font will give you the outline effect your looking for.

Java Image Handling

I am trying to do a poker hand simulator. I am using Netbeans, and by the means of its GUI editor I created a JFrame in which I added the JPG of the poker table. After doing this, is it possible to dynamically add JPGs according to the hand that the player has over the poker table JPG? Is it possible to add a JPG over another? If so, how can I achieve this in NetBeans?
What I am planning to do is display all the players at the table, together with their stack and name and display their action. All this will be done with cards face up. The simulator will calculate some odds and will output some hand details in a pdf.
I want to mention that this is a homework project.
What you are after should be possible. I would recommend you take a look at the Layouts offered by the Swing Framework and once you will find what you need you can take a look here to see how you can implement the layout of your choice.
EDIT: If you are satisfied with how is your application is laid out, you should take a look at the ImageIO to see how you can load JPG images on the fly and add them to your JPanels. Usually one would use the JLabel(Icon image) constructor to add images to JPanels but there are other methods.

UI for an intended XSL-FO designer in Java

I intend to write a XSL-FO designer in java for which i need to write an UI. The basic idea is to give the user a work pane wherein he/she can draw rectangles and these rectangles would in turn be associated to field containers in the underlying XSL-FO generator. Once the field container are done, the user should also be able to select any of the rectangles(field containers) created and add components into it. These will in turn be translated into field blocks that fall under the chosen field container.
Till now I have created a simple UI using JFames with mouseListeners hooked to them so that i can have users draw the rectangles on the work area.
Im stuck at the point on how to implement the part where the user selects one of the rectangles created in the previous steps.
Given the intent of the designer, is it possible to accomplish this using Jframes ?
Any pointers/suggestions on how i can achieve the motive of this designer would be of great help !
Please excuse me if any part of this post is noobish. I am one when it comes to UI.
JInternalFrame might be a starting point. You can connect them, as shown here, and add arbitrary components as required.

Java: Interface with squares (to drag), lines (to link the squares) and animation (square follows the line)

I'm starting to create a Industrial Simulation (IS) interface, using Java.
The problem I'm pointing here is the interface.
A IS interface will have some big squares (geometrical figure) (unfilled, instead of it they will have their "names" inside it), one or more lines linking the squares, and while time will be going, some "mini-squares" will get out of one big square to another, following the line that links both.
I have to construct a interface that is able to have either the geometric (square) figures and the animation with the "minisquares" following the link (that will be the line).
Is there any API, or tool, whatever, in java, that could help me starting this part of the project?
If you can use javafx... runs on the JVM... that might be easiest way. Here's a link to a tutorial for animating along a path
Otherwise I guess you'll be looking at Swing, but I suspect it's a lot trickier. Here's a similar link.
Visual editors like Matisse can help you get started with layout etc., but I don't know of anything that will let you point-and-click your way round animation.

Working in java image

I will explain my question clearly.
I need to zoom in/zoom out the world map.
When I click on the particular country in map, control should redirected to new page with respective the country.
I dont have any idea about this in java. Please explain the steps to acheive the above task.
As the question is quite general, here is a general answer: Zooming often means, that you want to display a certain percentage of somethin, and not the whole, where your size of the displayed will not change.
But in your case it seems more like a "find a mouse click in a polygon" thing. So you have to add a selection/click listener to whatever widgets you use (Swt? swing? ....?) where you change what your program renders.
It sounds like you may be trying to reinvent the wheel. Google etc have already solved this problem rather well. It might be better to incorporate an existing solution into your application. Have a look at GoogleEarth inside Java Swing.

Categories

Resources