• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaFX and a Timeline ?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I have an idea for an application for my alotment and I wonder if JavaFX could be the "silver bullet" here.
I would like to create a simple canvas that emulates my alotment with my vegetables + sunflowers.
The timeline would for instance strech from early april to end of september.
The application would have a canvas showing the alotment : 10 x 13 meters.
I am able to plot a number of icons on the canvas: such as all the sunflowers.
The sunflower has 4 stages which describes the sunflowe lifecycle under good circumstances :
small-medium-max-dead and each stages has an Icon ( small yellow circle, medium yellow circle, large yellow circle and finally a brown medium circle ).
So if a plant 30 sunflowers on different dates I can 'play' the simulation and see hos they grow and die.

Is this possible ?

regards, i
 
author
Posts: 32
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure!
If you are familiar with Java2D or HTML5 Canvas you could use the JavaFX Canvas Control. In this control you can paint whatever you want on a graphics canvas. Here is a quick overview: http://docs.oracle.com/javase/8/javafx/graphics-tutorial/canvas.htm#JFXGR214
My book contains an example, too.
But the better approach is to use the JavaFX scene graph. The scene graph can contain, layout, manage and render all your components. By doing so you can add event listeners, etc. on all the components. How the scene graph is working and how you can define own layouts, etc. is part of my book
 
Ingi Erlings
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

Thanks Hendrik for your reply and the oracle-link.
Must take a look at this book, would love to learn this.

regards, Ingo
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic