私は、次の操作を行うことができました:
setContentNodeDisabled(Boolean value) {
contentNode.setDisabled(value);
if(value && !contentNode.getStyleClass().contains("myDisabledPane")){
contentNode.getStyleClass().add("myDisabledPane");
} else if(!value && contentNode.getStyleClass().contains("myDisabledPane")){
contentNode.getStyleClass().remove("myDisabledPane");
}
}
には、以下のCSSを追加しました:まだ無効の表情が有効になっている間
.myDisabledPane .label:disabled,
.myDisabledPane .button:disabled,
.myDisabledPane .toggle-button:disabled,
.myDisabledPane .radio-button:disabled,
.myDisabledPane .check-box:disabled,
.myDisabledPane .hyperlink:disabled,
.myDisabledPane .menu-button:disabled,
.myDisabledPane .split-menu-button:disabled,
.myDisabledPane .slider:disabled,
.myDisabledPane .scroll-bar:disabled,
.myDisabledPane .scroll-pane:disabled,
.myDisabledPane .progress-bar:disabled,
.myDisabledPane .progress-indicator:disabled,
.myDisabledPane .text-input:disabled,
.myDisabledPane .choice-box:disabled,
.myDisabledPane .combo-box-base:disabled,
.myDisabledPane .date-cell:disabled > *, /* This is set on children so border is not affected. */
.myDisabledPane .list-view:disabled,
.myDisabledPane .tree-view:disabled,
.myDisabledPane .table-view:disabled,
.myDisabledPane .tree-table-view:disabled,
.myDisabledPane .tab-pane:disabled,
.myDisabledPane .titled-pane:disabled > .title,
.myDisabledPane .accordion:disabled > .titled-pane > .title,
.myDisabledPane .tab-pane > .tab-header-area > .headers-region > .tab:disabled,
.myDisabledPane .menu:disabled,
.myDisabledPane .menu-item:disabled > .label,
.myDisabledPane .menu-item:disabled,
.myDisabledPane .list-cell:filled:selected:focused:disabled,
.myDisabledPane .list-cell:filled:selected:disabled,
.myDisabledPane .tree-cell:filled:selected:focused:disabled,
.myDisabledPane .tree-cell:filled:selected:disabled,
.myDisabledPane .tree-cell > .tree-disclosure-node:disabled,
.myDisabledPane .tree-table-row-cell > .tree-disclosure-node:disabled,
.myDisabledPane .table-row-cell:selected:disabled,
.myDisabledPane .tree-table-row-cell:selected:disabled,
.myDisabledPane .table-cell:selected:disabled,
.myDisabledPane .tree-table-cell:selected:disabled,
.myDisabledPane .spinner:disabled {
-fx-opacity: 1.0;
}
これは除いて動作しているようですが、幅広いストロークと実際の無効分野であります。