Skip to main content



      Home
Home » Eclipse Projects » e(fx)clipse » set size values for an controll in .fxgraph (I don't know how to set a width/heigh value for a TabPane and some other Fxgraph realted questions)
set size values for an controll in .fxgraph [message #1299022] Wed, 16 April 2014 13:30 Go to next message
Eclipse UserFriend
Hello,
I am trying to build a Simple Java Program and haven't been programming since school.
Therefor I am just starting to learn JavaFX and I'm not really sure how to set the size of a TabPane within FxGraph or in general how to add a property value.

I have found one example where it was done like this
width: 275
(like what I was expecting after reading the "FXGraph sort introduction" wiki page)

In my code it doesen't work
TabPane {
		setMinWidth: 300,
		//static height: 300,
		//PrefHeigh: 300.0,
		//setMinHeight: 200.0,
		heigh: 300.0,
		tabs : 
		[...

it throws me "Property "..." does not exist or is read-only" errors

i've been trying it whith in other ways to as you can see
So can anyone tell me to apply some size to that control? (It is the root control of that scene)

because for example adding a text to a Label is working and i start to get confused.


Furthermore i'm wondering what the "call" modifier is doing in general and why/when has he to been used? And isn't there also a "static" which is doing some magic?
e.g. in
call GridPane#columnIndex: 0



Is there a better/more detailed introduction for FXGraph some where on the Net than the Short introduction from the e(fx)clipse wiki page?

gretings, Florian
Re: set size values for an controll in .fxgraph [message #1299918 is a reply to message #1299022] Thu, 17 April 2014 03:41 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

On 16.04.14 21:06, Florian Kühne wrote:
> Hello,
> I am trying to build a Simple Java Program and haven't been programming
> since school.
> Therefor I am just starting to learn JavaFX and I'm not really sure how
> to set the size of a TabPane within FxGraph or in general how to add a
> property value.
>
> I have found one example where it was done like this width: 275(like
> what I was expecting after reading the "FXGraph sort introduction" wiki
> page)
>
>
> In my code it doesen't work
> TabPane {
> setMinWidth: 300,
> //static height: 300,
> //PrefHeigh: 300.0,
> //setMinHeight: 200.0,
> heigh: 300.0,
> tabs : [...

You control the default width/height with prefHeight/Width. In FXGraph
you always use the value without set/get and then the property starts
with a lower-case!


>
> it throws me "Property "..." does not exist or is read-only" errors
>

the content assist (CTRL+Space) should show you all possible values!

> i've been trying it whith in other ways to as you can see
> So can anyone tell me to apply some size to that control? (It is the
> root control of that scene)
>
> because for example adding a text to a Label is working and i start to
> get confused.
>
>
> Furthermore i'm wondering what the "call" modifier is doing in general
> and why/when has he to been used? And isn't there also a "static" which
> is doing some magic?
> e.g. in call GridPane#columnIndex: 0
>

call & static serve the same purpose. They are used on the
parent-container where static as you assumed is doing some magic so
those two things are identical.

GridPane {
children : [ TabPane {
static columnIndex: 0
} ]
}


GridPane {
children : [ TabPane {
call GridPane#columnIndex: 0
} ]
}

They produce the same result in FXML

<GridPane>
<children>
<TabPane GridPane.columnIndex="0" />
</children>
</GridPane>

or Java

GridPane p = new GridPane();
TabPane tb = new TabPane();
GridPane.setColumnIndex(tb,0);
p.getChildren().add(tb);

We should deprecate call and only advertise static. The magic in static
is that it figures out the containers static properties - or put the
other way call is more explicit that static. ContentAssist will also
provide you the available properties.

> Is there a better/more detailed introduction for FXGraph some where on
> the Net than the Short introduction from the e(fx)clipse wiki page?
>

We have a lot of examples in our git repo [1] which you can take a look
at and because FXGraph is another way to represent informations captured
in FXML it might make sense to read the FXML-Docu [2].

Do better understand the static/call stuff you might want to make
yourself familiar with JavaFX layouts [3]

Tom

[1]http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/testcases/org.eclipse.fx.testcases.fxgraph
[2]http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html
[3]http://docs.oracle.com/javafx/2/layout/jfxpub-layout.htm
Re: set size values for an controll in .fxgraph [message #1300276 is a reply to message #1299918] Thu, 17 April 2014 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Hello Tom,

tanks, writing the propertys lowercase did the trick.


And thanks for the links.
I already worked with the GitRepo and got the call statements from there. Maybe you could update them, i think they are used at least in the Adressbook example.

Florian
Re: set size values for an controll in .fxgraph [message #1300277 is a reply to message #1300276] Thu, 17 April 2014 09:07 Go to previous message
Eclipse UserFriend
Can you file a bugzilla - so that I don't forget about it please. You
can use this url
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Efxclipse

Tom

On 17.04.14 15:05, Florian Kühne wrote:
> Hello Tom,
>
> tanks, writing the propertys lowercase did the trick.
>
>
> And thanks for the links.
> I already worked with the GitRepo and got the call statements from
> there. Maybe you could update them, i think they are used at least in
> the Adressbook example.
>
> Florian
Previous Topic:Nightly Builds of Tooling &amp; Runtime require JavaSE-8
Next Topic:problem installing e(fx)clipse on my JUNO
Goto Forum:
  


Current Time: Wed May 07 13:16:18 EDT 2025

Powered by FUDForum. Page generated in 0.02883 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top