PFGrid toolkit and Controls for JavaFX 2.0

...Empower your UI with our Winforms and SWT controls!


With this rotator-control for JavaFx 2.0 you can display images or custom nodes in a horizontal scrollable gallery. Each part of the control is styleable with CSS: The items displayed in the rotation-pane, the rotation-pane itself and the scrolling indicators:

PFRotator.FX: JavaFX 2.0 Rotator control


The default CSS which is applied to the control looks like this:

.rotator { 
    -fx-skin: "";

.rotator-container { 

    -fx-background-color: linear-gradient(to bottom, #333, #ccc);
    -fx-border-color: #333;
    -fx-border-style: solid;
    -fx-padding: 0;


.rotator-item { 

    -fx-background-color: linear-gradient(to top, white, #dedede);
    -fx-padding: 10;
    -fx-border-color: #ccc;
    -fx-border-style: solid;
    -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.4) , 5, 0.0 , 0 , 3 );


.rotatorscroll-pane1 { 

    -fx-background-color: linear-gradient(to right, #000, #333);

.rotatorscroll-pane1:hover { 

    -fx-background-color: linear-gradient(to right, #000, #444);

.rotatorscroll-pane2 { 

    -fx-background-color: linear-gradient(to left, #000, #333);

.rotatorscroll-pane2:hover { 

    -fx-background-color: linear-gradient(to left, #000, #444);

You can add your own CSS-file and style the rotator like this:

 Scene scene = new Scene(borderPane, WIDTH, HEIGHT);



Properties for the controls can be defined by the API of the Rotator-class:

  • addItem(RotatorItem item)
  • get/setItemWidth
  • get/setItemHeight
  • get/setScrollOffSet
  • get/SetItemSpacing
  • get/setScrollImage1
  • get/setScrollImage2
  • get/setScrollPaneSize


See a live-demo of the control as Web-Start that will open in a Java-FX Stage-Window or as embedded JNLP in a Web-page:

Show embedded in a browser-window


Download an evaluation of the PFRotator.FX here , the bundle contains the com.pfcomponents.javafx.jar with the Rotator-control and a Demo-project that can be used in an Eclipse JavaFx 2.0-project or in a Netbeans Java Fx 2.0 Project (see Readme.txt). Just refer to the com.pfcomponents.javafx.jar in your project and to the JavaFX 2.0 SDK. The PFRotator.FX library is build with Java 1.6 and JavaFX 2.0