Share My Creation CSS helper

Using CSS on controls is fine when using the standard set.
If you want to delve deeper you have to read the Oracle CSS guide, which is good, but tends to add pain by the phrase 'also inherits from ????', so you spend time reading that control, only to find it inherits from another ....

This little app interrogates the control itself to find it's CSS properties.

(it uses the jInvokeNashorn library)

Just enter the control type you want in the textfield ie TableView, click the button, and the list should fill with all the CSS properties for that control. Indented ones imply they are additional to their parent.

It lists the default values where they are available or the java ref if not (or too hard for me to extract).

It's posted as source so you can improve it. (GUI design not my strong point, functional not pretty)

Controls I've tried - TableView,TreeView,ImageView,TableCell,ListCell,AnchorPane,TabPane,Pane

Note: the names are the class names

--Update-- helper2 uses a tableview instead of a listview, it gets more information and looks much better.
(plus it has the equivalent inline java code in it - commented out, as it uses the script engine)

--Update-- helper3 - added more controls to choicebox. Added decipher data from structures.
color name added for backgrounds if not standard reports 'Custom'
You can pass an existing control to the routine, or String Class name or use choicebox.

--Update-- helper4 (last update as I'm bored now :) )
Now you can try css on each item in the table
Click on the row and the new textfield will get the current value, simply overwrite the value hit apply button, and see in the little window what happens to the control.
note: values are not case sensitive for strings
numbers (like insets) just need 2,3,4,5 not the surrounding text
Insets [top=0.0, right=0.0, bottom=0.0, left=0.0] can be entered as 0,0,0,0

Image file included for backgrounds etc is jelly.png in files tab
needs to be entered as url('file://../../jelly.png') to get to files folder
 

Attachments

  • css helper.zip
    2.8 KB · Views: 370
  • css helper2.zip
    3.7 KB · Views: 358
  • css helper3.zip
    4.4 KB · Views: 352
  • css helper4.zip
    36.3 KB · Views: 416
Last edited:

Daestrum

Expert
Licensed User
Longtime User
new version using tableview, much easier to read. Also has choicebox with most of the controls in (to save you typing :) )

If you need a control that's not in the dropdown, just type the name in the textfield as before.
 
Last edited:

Daestrum

Expert
Licensed User
Longtime User
new version - added more controls (and sorted alphabetically), Improved data deciphering to get actual values instead of [Ljava.lang.Double@????? etc
 

Daestrum

Expert
Licensed User
Longtime User
Last and final version uploaded - bored with it now :)
 
Top