/**
* General mechanism for adding {@link ColorPicker}s.
* @param row the row to add the items on.
* @param label the {@link Label} describing the {@link ColorPicker}.
* @param picker the {@link ColorPicker}.
* @param shortcut the {@link Button} providing the shortcut.
* @param map the {@link ObservableMap} providing the {@link Color}.
*/
private void addItemConfiguration( int row, Label label, ColorPicker picker, Button shortcut, ObservableMap< BuildResultStatus, Color > map ) {
add( label, 0, row );
styling.configureColorPicker( picker, map.get( status ) );
map.addListener(
new StatusFilterPropertyUpdater( map, status, picker.valueProperty() )
);
picker.valueProperty().addListener( ( s, o, n ) -> map.put( status, n ) );
add( picker, 1, row );
shortcut.setMaxWidth( Double.MAX_VALUE );
shortcut.setOnAction( e -> picker.setValue( shortcuts.shortcutColorProperty().get() ) );
add( shortcut, 2, row );
}
StatusConfigurationPane.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:JttDesktop
作者:
评论列表
文章目录