title: Why isn't my javafx combobox button cell renderer being applied until a selection is made?
body: <p>I'm extending ComboBox and attempting to customize the button graphic such that it displays a checked/unchecked status depending on whether an item in the list has been selected. No value is selected by default, so it simply shows the prompt text, and I <em>want</em> it to display the "unchecked" graphic, but I can't seem to get a graphic of any sort to appear until the user has selected a value, which kind of defeats the purpose of having a graphic... </p>
  
  <pre><code>public class ComponentComboBox extends ComboBox&lt;String&gt; {
  
      String promptText;
      boolean promptAsPrefix = true; // keeps the prompt as a prefix to the selected item
      final ImageView checked = new ImageView( new Image( Main.actions.getClass().getResourceAsStream( "res/checked.png" ) ) );
      final ImageView unchecked = new ImageView( new Image( Main.actions.getClass().getResourceAsStream( "res/unchecked.png" ) ) );
  
      public ComponentComboBox( String promptText, boolean promptAsPrefix, int maxWidth ) {
          init( promptText, promptAsPrefix, maxWidth );
      }
  
      private void init( final String promptText, final boolean promptAsPrefix, int maxWidth ) {
          this.promptText = promptText;
          this.promptAsPrefix = promptAsPrefix;
          setPromptText( promptText );
          setMaxWidth( maxWidth );
          setPrefWidth( maxWidth );
          Callback&lt;ListView&lt;String&gt;,ListCell&lt;String&gt;&gt; cb = new Callback&lt;ListView&lt;String&gt;,ListCell&lt;String&gt;&gt;() {
              @Override public ListCell&lt;String&gt; call( ListView&lt;String&gt; p ) {
                  ListCell&lt;String&gt; ret = new ListCell&lt;String&gt;() {
                      @Override protected void updateItem( String item, boolean empty ) {
                          super.updateItem( item, empty );
                          if ( item == null || empty ) {
                              setGraphic( unchecked );
                          } 
                          else {
                              setGraphic( checked );
                              if ( promptAsPrefix ) {
                                  setText( promptText + " " + item );
                              }
                          }
                      }
                  };
                  ret.setGraphic( unchecked );
                  return ret;
              }
          };
          setButtonCell( cb.call( null ) );
      }
  }
  </code></pre>
  
  <p>Is it even possible to have a custom graphic displayed when no value has been selected?</p>