Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Instead of setting the background color for the entire cell in your css, just set the -fx-control-inner-background. Then you will have the default accent, hover and focus rings still available. Also remove the if statement around your <code>setPriorityStyle</code> call of course. </p> <p>If you also want to override things like the default accent (selected) color or the hover color, you can also do this as in the css below - not sure if the highlight overrides are really recommended though, guess it would depend on your app and desired user experience.</p> <pre><code>.priorityLow { -fx-control-inner-background: palegreen; -fx-accent: derive(-fx-control-inner-background, -40%); -fx-cell-hover-color: derive(-fx-control-inner-background, -20%); } .priorityMedium { -fx-control-inner-background: skyblue; -fx-accent: derive(-fx-control-inner-background, -40%); -fx-cell-hover-color: derive(-fx-control-inner-background, -20%); } .priorityHigh { -fx-control-inner-background: palevioletred; -fx-accent: derive(-fx-control-inner-background, -40%); -fx-cell-hover-color: derive(-fx-control-inner-background, -20%); } </code></pre> <p><img src="https://i.stack.imgur.com/wxIck.png" alt="rowhighlight"></p> <hr> <p>Detailed styling information for JavaFX can be found in the default <a href="http://hg.openjdk.java.net/openjfx/2.2/master/rt/raw-file/tip/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/caspian/caspian.css" rel="noreferrer">caspian.css stylesheet</a> for JavaFX 2.2 and the <a href="http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html" rel="noreferrer">JavaFX 2 CSS reference guide</a>. To find caspian.css for your version of JavaFX you can unjar <code>jfxrt.jar</code> (sometimes found in the jre/lib directory).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload