2017-01-10 3 views
0

ControlsFX 알림을 사용하여 메시지 그룹을 표시합니다. 텍스트가 나를 위해 완벽한 방법이 아니므로 TableView에 데이터를 표시합니다.ControlsFX 알림 그래픽이 손상됨

Notification - OK

을하지만 통지는 다음과 같이, 대부분의 시간을 손상 나타납니다 : 보통의 경우

import org.controlsfx.control.Notifications; 
...... 


TableView<NotificationModel> notificationTable = new TableView(); 

...... 

Notifications notification = Notifications.create() 
      .title("Transaction Notifications") 
      .text(null) 
      .graphic(notificationTable) 
      .position(Pos.BOTTOM_RIGHT) 
      .hideAfter(Duration.minutes(1)); 

notification.show(); 

는, 통지는 다음과 같습니다. 서로> 오버레이하는> 1 알림을 표시하는 것 같습니다.

Notification - corrupted

나는 "총-교체 그래픽 그래픽 옵션"을 선택, ControlsFX 샘플 jar 파일을 테스트했다. 동일한 손상된 동작을 보여줍니다. 그래픽과 텍스트가 아닌 알림을 표시 할 때

Notification - Corrupted

이 ControlsFX에서 벌레처럼 보인다. 누구든지 비슷한 문제에 직면 해 있습니까? 나는 macOS Sierra 10.12.2, ControlsFX 8.40.12에서 개발 중이다.

답변

0

AnchorPane에서 TableView를 래핑하여 문제를 해결 한 후 알림 그래픽으로 설정했습니다. ControlsFX Issue Tracker

:

AnchorPane anchorPane = new AnchorPane(notificationTable); 

    Notifications notification = Notifications.create() 
      .title("Transaction Notifications") 
      .text(null) 
      .graphic(anchorPane) 
      .position(Pos.BOTTOM_RIGHT) 
      .hideAfter(Duration.minutes(1)); 

    notification.show(); 

는 여기에서 힌트를 얻었다