martes, 28 de julio de 2009

What is a JavaFX app?



It depends on who you ask. For the programmer is code. For the designer is media (images, video, layout, fonts). For the art director is the way you combine all things. For the user, an app is 'cool' or does not exist.

In any case, a JavaFX app is a combination of multiple ingredients. If one ingredient of the recipe lacks, there is no app.

Tools like the Google CC media search engine are great because represent an easy way to locate media for our apps.

Related resources:


How to embed fonts in JavaFX




Let's supose you want to use a font not present in the system. For example you want to use a 'grunge' font:



The font used here is Viper Vera. It turns out that you can 'embed' the font with your application. How?

At the Java FX forum you can read:

You embed the font along with your application. You load the font by name. Simply place the ttf font file in a package in your application. Then you need to include a fonts.mf file in the META-INF of the jar so that we can discover the embedded fonts at runtime. The fonts.mf file is simply a properties file that lists the name of the font and the location of the font.

fonts.mf:

Arindam\ Neo\ Bold = /com/mycompany/fonts/arind.ttf

for example. Then in code you just load a font by name, using the name that you entered into your fonts.mf:

Font {
name: "Arindam Neo Bold"
size: 27
}





domingo, 26 de julio de 2009

IDEOLOGIA

Imagine an authentication scheme without textual passwords. Welcome to IDEOLOGIA, a system that allows the user to log on different websites with spatial based gestures.
Based on the previous works KAOS and ILLITERATE.

User instructions:
In order to be directed to the NSA website (www.nsa.gov) the user needs to invoke the following sequence of gestures:

1. NORTH
2. NORTH
3. NORTHEAST

After the sequence is "typed" IDEOLOGIA will open a browser with the URL www.nsa.gov. No button or any usual user interface has to be pressed, just drag&drop gestures.

See a demo on youtube:


Illiterate


Imagine a computer environment without buttons o textboxes. Welcome to ILLITERATE.

Based on the previous work Kaos, ILLITERATE is a learning tool for disabled people.
Every word is presented to the user with a twist: a visual representation of the 'kaos level' of the word presented.
While the user advances on the typing work, the initial order is restored.

You can watch a ILLITERATE demo (you tube video) here:



Kaos, the roadmap

My name is Joan and I am a lawyer [*].

mmm.. so, how can a lawyer write JavaFX applications?

Well, thats a wrong question, man. Who invented XML? A lawyer. Who was the best number theorist mathematician? Fermat, a french lawyer. Who.... well, that's enough for today.

Let's talk about Kaos, a Java FX application. Java FX is an interesting beast, a DSL with very interisting skills. One is closures. If you know Smalltalk o Newspeak you know waht I mean.

Kaos is a litte prototype or proof of concept. Also is a engine that will be used in posterior applications: Illiterate andIDEOLOGIA.

Playing Kaos is very easy. Your goal is to restore the initial order. In order to do so, you can drag&drop the scrambled pieces of the initial image.

Playing Kaos you will feel like Sisyphus a greek king punished in Tartarus by being cursed to roll a huge boulder up a hill, only to watch it roll back down, and to repeat this throughout eternity.


You can watch a demo of a KAOS session here:




[*] Well, a studend lawyer is more accurate.

Playing with licenses - Exercises



Now let's present some practical license exercises.

Don't forget to review prior related posts:
Also you can execute the JavaFX app here.

Exercise 1.
Let's supose you have found the following image:


This image has a CC license: BY-SA

Can I use the following derived work in my web blog?


Response: Yes. You are allowed to copy and modify the image. But don't forget to tag the derived image with a BY-SA license.

sábado, 25 de julio de 2009

How to clear the JavaFX caché



Just go to the Control Panel and click on the Java icon:





Then go to the Delete Files... button and voilà, that's all!