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

Graphic object circle disappears during dragging table columns in TableView

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 7u25
    • javafx
    • uname -m -o
      x86_64 GNU/Linux
      NetBeans 7.3.1

      Graphic object circle disappears during dragging table columns
      TableView
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)


      Hello!
      I am using 64-bit Linux.
      I have tested it on windows too. Result is same.
      /usr/java/latest/bin/java -version
      java version "1.7.0_25"
      Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
      I wrote a test project with TableView.
      TableView has String elements in columns and circle element in one column.
      Code:

          @FXML
          private static TableView table;
      ....
              TableColumn circleCol = new TableColumn("Circle");
      ....
              circleCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, MyCircle>, ObservableValue<MyCircle>>() {
                  @Override
                  public ObservableValue<MyCircle> call(TableColumn.CellDataFeatures<Person, MyCircle> p) {
                      // p.getValue() returns the Person instance for a particular TableView row
                      return p.getValue().getImg();
                  }
              });
      ....


          public class MyCircle extends Circle{
              private int order;
              public MyCircle(double d,int order) {
                  super(d);
                  this.order=order;
              }

              public MyCircle(double d, Paint paint,int order) {
                  super(d,paint);
                  this.order=order;
              }

              public MyCircle() {
                  super();
                  this.order=order;
              }

              public MyCircle(double d, double d1, double d2,int order) {
                  super(d,d1,d2);
                  this.order=order;
              }

              public MyCircle(double d, double d1, double d2, Paint paint,int order) {
                  super(d,d1,d2,paint);
                  this.order=order;
              }
              
              @Override
              public String toString(){
                  return order+"";
              }
          }


      ....
              table.getColumns().setAll(firstNameCol, lastNameCol, circleCol, numberCol, circleColStr);
             
      ....

      When I am changing column orders by dragging columns the color circles disappears.
      I think that this is a bug!

      Here is a link of this test project: http://yadi.sk/d/C3eDrHPZ98qVJ
      You can download it.

            jgiles Jonathan Giles
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: