Skip to content

Year: 2008

JavaFX SDK 1.0 on Linux

JavaFX 1.0 is out and is absolutely amazing. You guys did really a great work on it.

As I really need a working SDK on Linux to continue to study and I don’t have any Windows/Mac near me, I’m using the Weiqi Gao’s workaround. I tried to simplify a little bit more the process for those who need JavaFX SDK working on Linux right now.

Download javafxsdk_linux_unofficial.tar.bz2 (~18Mb).

And then

tar -xjvf javafxsdk_linux_unofficial.tar.bz2
sudo cp javafx /opt/javafx
echo “PATH=\$PATH:/opt/javafx/bin” >> ~/.profile
echo “JAVAFX_HOME=/opt/javafx” >> ~/.profile
source ~/.profile

Now you can call javafx, javafxc, javafxdoc and javafxpackager from your terminal. Don’t forget that you need Java 1.6 or greater installed.

Here’s a video showing the SDK working, I’m compiling and running two sample applications. Remeber that as a temporary unofficial port for Linux, there’s not native video support nor hardware acceleration.

[youtube]ENf5mXEIiD8[/youtube]

Un P’tit Café

Par Odelaf e Monsier D.

[youtube]eFnvxOmm6tc[/youtube]

Lyrique:

Pour bien commencer
Ma petite journée
Et me réveiller
Moi, j’ai pris un café
Un arabica
Noir et bien corsé
J’enfile ma parka
Ça y est je peux y aller

«Où est-ce que tu vas ?»
Me crie mon aimée
«Prenons un kawa
Je viens de me lever»
Étant en avance
Et un peu forcé
Je change de sens
Et reprends un café

A huit heures moins l’quart
Faut bien l’avouer
Les bureaux sont vides
On pourrait s’ennuyer
Mais je reste calme
Je sais m’adapter
Le temps qu’ils arrivent
J’ai l’temps pour un café

La journée s’emballe
Tout le monde peut bosser
Au moins jusqu’à l’heure
De la pause-café
Ma secrétaire entre :
«Fort comme vous l’aimez»
Ah mince, j’viens d’en prendre
Mais maintenant qu’il est fait…

Un repas d’affaire
Tout près du Sentier
Il fait un temps super
Mais je me sens stressé
Mes collègues se marrent :
«Détends-toi, René !
Prends un bon cigare
Et un p’tit café…»

Une fois fini
Mes collègues crevés
Appellent un taxi
Mais moi j’ai envie d’sauter
Je fais tout Paris
Puis je vois un troquet
J’commande un déca
Mais recaféiné

J’arrive au bureau
Ma secrétaire me fait :
«Vous êtes un peu en r’tard
Je me suis inquiétée»
Han ! – J’la jette par la f’nêtre
Elle l’avait bien cherché
T’façons faut qu’je rentre
Mais avant un café

Attendant l’métro
Je me fais agresser
Une p’tite vieille me dit :
«Vous avez l’heure s’il vous plaît ?»
Han – Je lui casse la tête
Et j’la pousse sur le quai
Je file à la maison
Et j’me sers un – devinez ?

«Papa, mon Papa,
En classe je suis premier»
Putain mais quoi ?
Tu vas arrêter de m’faire chier ?
Qu’il est con ce gosse !
En plus y s’met à chialer !
J’m’enferme dans la cuisine
Il reste un peu d’café

Ça fait quatorze jours
Que je suis enfermé
J’suis seul dans ma cuisine
Et je bois du café
Il faudrait bien qu’je dorme
Mais les flics vont m’choper
Alors je cloue les portes
Et j’reprends du café..

My Free Tileset, version 3

Changelog since the last version:

  1. I noticed that I had released another free tileset before with a different aesthetic approach. For now I’m merging it with the “My Free Tileset”. With them is possible to do things like this:
  2. Example

  3. Added a door.

I’m trying to find a good style for outside building for this set. I tried some kinds of roofs but they are not good yet.

Buzz on JavaFX and Inkscape


At November, 26, on the main page of java.sun.com at the section From The Blogosfere

Thanks for all comments, suggestions and feedback on the post Inkscape and JavaFX working together. The JavaFX guru James Weaver posted about on his blog and it also figured out on java.sun.com on the From The Blogosfere section.

Bob said that there are build binaries of Inkscape for Windows, so we can already see it 0.46-devel working without compiling yourself yours.

\o/

And hey, Project Xort won a second place prize at the MySQL and GlassFish Student Reviews Contest. A lot of guys here from Brazil were prized, congractulations guys!

NetBeans, palestra ao vivo

Estamos experimento uma coisa nova dentro do OSUM. Vamos começar a fazer os webinars, palestras ao vivo pela internet, agora em outras linguas além do Inglês.

Eu vou ministrar o primeiro em português amanhã, aqui está o relese:

Nós estamos introduzindo para os membros do OSUM seminários web ao vivo para prover treinamento em tempo real nas últimas tecnologias de Software Livre.

Temos o prazer de começar nossa série de seminários web com esta sessão sobre o recém lançado NetBeans 6.5.

Este seminário web vai introduzir as novas funcionalidades do NetBeans 6.5 como:
→ Suporte robusto a PHP e JavaScript
→ Depuração para Groovy a Grails
→ Novas melhorarias para Java, Ruby e Rails, e desenvolvimento em C/C++
→ Suporte nativo para Hibernate, importação de projetos Eclipse, e a compilação ao salvar.

Este seminário web também proverá uma demonstração detalhada das capacidades de edição da IDE NetBeans e o famoso Construtor de Interfaces Swing (Matisse).

Este seminário será conduzido por Silveira Neto, Embaixador de Campus da Sun em Fortaleza, Ceará, membro do CEJUG (Ceará Java User Group), desenvolver e entusiasta de tecnologias de Software Livres.

Este seminário web será conduzido em Português. Por favor, consulte o Calendário de Eventos do OSUM para informações da mesma seção em outras línguas.

Este seminário web está marcado para o dia 25 de Novembro de 2008 as 20:00 no horário de Fortaleza, Ceará (UTC -3:00).
Isso corresponde a:
→ 21:00 em São Paulo, Rio e demais estados de mesmo fuso horário do Ceará mas com horário de verão em vigência.
→ 23:00 em UTC (Greenwich).

Por favor use o World Clock Meeting Planner para ajustar esse horário para sua localidade.

Este seminário web será conduzido usando o Elluminate Live! Você poderá escutar ao vivo o áudio nos auto-falantes ou fones de ouvido de seu computador e poderá fazer perguntas através do bate-papo em texto. Use o link URL provido no campo “Website or map” da seção. Por favor entre de 5 a 10 minutos antes para a configurar propriamente sua seção. Para maiores informações e requisitos mínimos do sistema use o Elluminate

Página do evento dentro do OSUM.

Link para assistir ao vivo via Elluminate.

Aviso: House um erro durante a marcação da seção. Eu marquei que era de Fortaleza no Brasil mas o sistema do Elluminate entendeu que meu horário era o de Brasília, então ao invés de marcado para as 23:00 em UTC ficou marcado para 22:00 em UTC. Não houve tempo suficiente para eu avisar a todos então eu tive que começar no horário errado mesmo. Ainda assim houve uma boa participação, contamos com umas 15 pessoas e tudo ocorreu bem. Muita gente me disse que tentou entrar e não conseguiu então vou tentar fazer um bis dessa apresentação. Os slides que eu usei e a gravação serão divulgados em breve. Obrigado a todos e me desculpem pelo transtorno.

Inkscape and JavaFX working together

Inkscape is a open source cross-platform vector graphics editor application that I use daily to create draws.

When Project Nile was launched, me and some others guys complained about lack of open source alternatives in the workflow of creation with JavaFX. So we developed a module inside Inkscape that converts your SVG drawings to JavaFX code.

Features

  • Both are free and open source technologies, providing more tools on a powerful workflow for programmers and designers to develop Rich Internet Applications.
  • Comes natively with Inkscape. Install Inkscape an have JavaFX exporting out-of-the-box. No needing to install external plugins.
  • Provides a way to Inkscape users to make RIA applications reusing their work at drawing tool.
  • Provides a way to JavaFX programmers a tool for designers their graphics and interfaces.
  • Keep separated the JavaFX programming logic from the graphics resources but also provide a way to connect them.
  • They work on Windows, Mac OS, Linux, OpenSolaris and FreeBSD.

Workflow Example

I’ll show here step by step how would be a designer-developer workflow from designing graphical elements, such interfaces, to integrating it to a JavaFX Script code in NetBeans. In this example I’m using Inkscape 0.46-devel, build from the unstable sources and NetBeans 6.1 with the JavaFX module. See here how to build Inkscape from sources and here how to do some optimizations on the build.

Here’s a artwork (a modified version from another one I did in another post) made with Inkscape.

Doesn’t matter the complexity of the drawing it is made of discrete elements such circles, rectangles, paths and others. What the exporting module does is converting these SVG elements into JavaFX Scene Graph API elements.

To do that just click on File → Save As… or Shift+Ctrl+S.

Select JavaFx as the output format.

And chose a name. I’m saving the drawing as Girl.fx.

Now the drawing is a JavaFX class that extends from CustomNode. Once in your classpath (in this case the same directory of your main code) you can call it.

Girl{}

Another example, the famous SVG tiger.

Tiger{}

Actually, you can get the elements of your drawing as attributes nodes of the main node. We use the name you gave to your object to name the attributes.

import javafx.scene.paint.Color;
var girl = Girl{}
girl.rightiris.fill = Color.LIME;
girl.fringe.fill = Color.WHITE;
girl.backhair.fill = Color.DARKGRAY;
girl.hair.fill = Color.GRAY;

import javafx.scene.paint.Color;
var girl = Girl{}
girl.rightiris.fill = Color.GREEN;
girl.backhair.fill = Color.DARKRED;
girl.hair.fill = Color.RED;

You can also put event handling by code.

import javafx.input.MouseEvent;
var p = Player{}
p.x.onMouseClicked = function( e: MouseEvent ):Void {
java.lang.System.exit(0);
}

As a ordinary JavaFX Node, you can do whatever you do with a Node, like using it inside a application or applying effects or transformations.

import javafx.application.Frame;
import javafx.application.Stage;
import javafx.scene.effect.SepiaTone;

var girl = Girl{
   scaleX: 0.5
   scaleY: 0.5
   effect: SepiaTone{}
}

Frame {
   visible: true
   stage: Stage {
      content: [girl]
   }
}

Using this approach you can have the reference and total control under all those elements that compose your drawing. You can design complete interfaces and attach event handling by code.

Source code

The module is already on the main Inkscape dev tree and working properly. I guess it will be officially released to all users in the next Inkscape release.

Still to do

  • Fix some problems with strokes.
  • Fix some problems in the gradients.
  • Use Zlib to create jfd files when the structure is too big.
  • Provide a dynamic method like getElementById in JavaScript.
  • Convert effects like blur to JavaFX effects.
  • There are some i18n errors in the module to be fixed.
  • Finish the adaption from Paths to SVGPaths.
  • Finish the adaption to the new JavaFX 1.0 syntax (coming December, 2).

Thanks!

Thanks for all guys that worked on this module and also on the projects Inkscape and JavaFX. Specially thanks for Bob Jamison, Jim Clarke, Joshua Marinacci and others. That’s my first contribution to a big free software, I’m very glad and I want to do much more. 😀

SVG: There She Is!!

Two SVG fanart drawings of the very cute animation There She Is!! from South-Korean.

The first one is a sign that is shown from first to last episode, love between cats and bunnies is not allowed. 🙂


sign_there_she_is.svg

The second, from the pro-love campaign from the fourth episode.


sign2_there_she_is.svg

Enjoy, share, print and modify. They are under Creative Commons Attribution Share-Alike license. I also did a more complete post (in portuguese) in my another blog.