Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123591

ComboBox ListCell renders with wrong height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 8
    • 8
    • javafx
    • Windows 64bit
      JavaFX 8.0b113

      The bottom of my ListCells are cut off with JavaFX 8.0b113.

      I have a custom ListCell:

      ComboBox<InterpolationMode> cb = (ComboBox) getGraphic();
      cb.setCellFactory(new Callback<ListView<InterpolationMode>, ListCell<InterpolationMode>>() {

      @Override
      public ListCell<InterpolationMode> call(ListView<InterpolationMode> p) {
      return createInterpListCell();
      }
      });
      cb.setButtonCell(createInterpListCell());




      private ListCell<InterpolationMode> createInterpListCell() {
      ListCell<InterpolationMode> lc = new ListCell<InterpolationMode>() {
      @Override
      protected void updateItem(InterpolationMode mode, boolean bln) {
      super.updateItem(mode, bln);
      setGraphic(createGraphicFor(mode));
      setText(mode != null ? mode.toString() : "");
      }
      };
      return lc;
      }



      It renders fine in JavaFX 2.2.40, but with Java 8.0b113 the bottoms of the cells are cut off. The space allocated for the list popup seems to have accoutned for the correct cell height though.

            jgiles Jonathan Giles
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: