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

TableColumnHeader: resize cursor lost on right click

XMLWordPrintable

      To reproduce:

      - run any app with tableView having at least one column
      - move mouse over trailing columnHeader boundary to see resize cursor
      - right-click into any column header (not the empty region of the tableHeader)
      - move mouse again over any boundary to see no resize cursor, that is it is lost for all columns, not only the one we clicked into

      for convenience, the example from JDK-8186232

      import java.util.Locale;

      import javafx.application.Application;
      import javafx.collections.FXCollections;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.TableColumn;
      import javafx.scene.control.TableView;
      import javafx.scene.control.cell.PropertyValueFactory;
      import javafx.scene.layout.BorderPane;
      import javafx.stage.Stage;

      public class TableColumnResizeCursorBug extends Application {

          private Parent getContent() {
              TableView<Locale> table = new TableView<>(FXCollections.observableArrayList(
                      Locale.getAvailableLocales()));
              TableColumn<Locale, String> countryCode = new TableColumn<>("CountryCode");
              countryCode.setCellValueFactory(new PropertyValueFactory<>("country"));
              TableColumn<Locale, String> language = new TableColumn<>("Language");
              language.setCellValueFactory(new PropertyValueFactory<>("language"));
              TableColumn<Locale, String> variant = new TableColumn<>("Variant");
              variant.setCellValueFactory(new PropertyValueFactory<>("variant"));
              table.getColumns().addAll(countryCode, language, variant);
              BorderPane pane = new BorderPane(table);
              return pane;
          }

          @Override
          public void start(Stage primaryStage) throws Exception {
              primaryStage.setScene(new Scene(getContent(), 800, 400));
      // primaryStage.setTitle(FXUtils.version());
              primaryStage.show();

          }
          
          public static void main(String[] args) {
              launch(args);
          }

      }

            aghaisas Ajit Ghaisas
            fastegal Jeanette Winzenburg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: