Help

18 views
Skip to first unread message

Omar F Rodriguez

unread,
Jan 11, 2009, 8:27:08 PM1/11/09
to widgetf...@googlegroups.com
I'm trying to transform the weather java FX sample into a widget using widgetFX 1.0, i got this

import org.widgetfx.*;

import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.transform.Transform;
import javafx.stage.Stage;
import javafx.scene.shape.Rectangle;

var weatherWidget1 = Weather{ transforms: Transform.translate(10,10) };

Widget {
    stage : Stage {
        scene: Scene {
            fill: Color.BLACK
            content:[
                Rectangle {
                    x:0 y:0
                    width: weatherWidget1.boundsInScene.maxX+10
                    height: weatherWidget1.boundsInScene.maxY + 10
                    visible: false
                }
                weatherWidget1,
                            ]
        }
    }
}

but Netbeans says that Stage cannot be resolved and of course i got compilation errors, i was trying to follow the widgetFX tutorial to the letter but what i'm doing wrong here?

I only got one jar file, the one that came along with SDK

Zaxxon

unread,
Jan 11, 2001, 10:10:03 PM1/11/01
to widgetf...@googlegroups.com

The biggest mistake you’re making is following the tutorial, which is based on the JavaFX Preview Release.  Sorry that’s still out of date, but Steve is working on updating it for JavaFX (and WidgetFX) 1.0 right now.  Until that’s available you probably should look at the source of one of the existing sample widgets.

 

You wanna do something like this (stripped out from slideshow):

 

var myWidget:Widget = Widget {

    launchHref: "myWidget.jnlp";

    width: 320 // or whatever

    height: 240

    configuration: Configuration {

        properties: [

        ]

        scene: Scene {

                // config dialog

        }

 

    }

    skin: Skin {

        scene: Group {

            content: [

                // your widget content here

            ]

        }

    }

}

 

 

-Keith

Omar F Rodriguez

unread,
Jan 12, 2009, 7:35:34 AM1/12/09
to widgetf...@googlegroups.com
Configuration and Skin are located in org.widgetfx.*;? Netbeans says that the assigment scene: Group is ilegal, cant find Skin also
--
Atte.
Lic. Omar F. Rodriguez
IT Consultant

Stephen Chin

unread,
Jan 12, 2009, 7:53:06 AM1/12/09
to widgetf...@googlegroups.com
The fully qualified names are:
javafx.scene.Group
javafx.scene.control.Skin

API docs are your friend:
http://java.sun.com/javafx/1/docs/api/

Cheers,
--Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "WidgetFX Users" group.
To post to this group, send email to widgetf...@googlegroups.com
To unsubscribe from this group, send email to widgetfx-user...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/widgetfx-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Omar F Rodriguez

unread,
Jan 12, 2009, 11:46:45 PM1/12/09
to widgetf...@googlegroups.com
Thanks so much for your help. i was feeling kinda dumb, but it was just a lapsus i hope, i manage to follow your indications, and now i only got one error

javax.jnlp.UnavailableServiceException: uninitialized
        at javax.jnlp.ServiceManager.lookup(ServiceManager.java:44)
        at org.widgetfx.Widget.userInit$(Widget.fx:190)
        at org.widgetfx.Widget.initialize$(Widget.fx:100)
        at weatherfx.WeatherApp.javafx$run$(WeatherApp.fx:57)

and this is my code

package weatherfx;

import org.widgetfx.Widget;
import org.widgetfx.config.Configuration;

import javafx.scene.Group;
import javafx.scene.control.Control;
import javafx.scene.Scene;
import javafx.scene.Node;

import javafx.scene.paint.Color;
import javafx.scene.transform.Transform;
import javafx.stage.Stage;
import javafx.scene.shape.Rectangle;
import javafx.scene.control.Skin;


/**
 * Main class of the app
 *
 * @author breh
 */


var weatherWidget1 = Weather{ transforms: Transform.translate(10,10) };
/*var weatherWidget2 = Weather{ transforms: Transform.translate(10,100) };
var weatherWidget3 = Weather{ transforms: Transform.translate(10,190) };
*/
var myWidget= Widget {
    //stage : Stage {
    //launchHref: "launch.jnlp";

    width: weatherWidget1.boundsInScene.maxX+10
    height: weatherWidget1.boundsInScene.maxY + 10

    configuration: Configuration {
        properties: []
        scene: Scene {}
    }

    skin: Skin {



On Thu, Jan 11, 2001 at 9:10 PM, Zaxxon <zax...@ca.astound.net> wrote:

cindy coty

unread,
Jan 13, 2009, 1:34:16 PM1/13/09
to widgetf...@googlegroups.com
please take me off the list.. I have no idea what this is but take me off the list..

Omar F Rodriguez

unread,
Oct 11, 2009, 11:59:14 AM10/11/09
to widgetf...@googlegroups.com
Hi all on the list


In the past, i was able to use the widgetFX sidebar but since 1.2.1 i am not using it anymore, some told me because i never been able because i am using ubuntu amd64, and there is no javaFX Runtime for amd64, but i can run TwitterFX and MusicExplorer FX, how is this possible?, i cant understand why i can run others apps written on javaFX and not widgetFX
Reply all
Reply to author
Forward
0 new messages