Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sphere PhongMaterial and CSS

3015200Jul 16 2016 — edited Jul 19 2016

I want to put the color XML element of a Sphere PhongMaterial in a CSS.  The JavaFX CSS documentation here does not even list Sphere.  An internet search came up empty.

Question 1) Are CSSs supported with JavaFX 3D?

Question 2) If yes what is the format?

The below does not work...

.SimulationDepictionPane {

    -fx-diffuseColorPhongMaterial-color: green;   

}

This is what works in the FXML file...

<Sphere fx:id="workstation" radius="15.0" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER">

   <material>

      <PhongMaterial>

         <diffuseColor>

            <Color green="1.0" opacity="1.0" />

         </diffuseColor>

      </PhongMaterial>

   </material>

</Sphere>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2016
Added on Jul 16 2016
3 comments
1,016 views