public void selectColor(KeyEvent event) { if (rectangle.getFill() != null) { if (rectangle.getFill() instanceof Color) { colorPicker.setValue((Color) rectangle.getFill()); colorPicker.fireEvent(new ActionEvent()); } event.consume(); } colorPicker.hide(); } }
Color fill = (Color) rectangle.getFill(); colorPicker.setValue(fill); colorPicker.fireEvent(new ActionEvent()); updateSelection(fill); event.consume();
if (colorPickerGrid.getBoundsInLocal().contains(t.getX(), t.getY())) { updateSelection(colorPicker.getValue()); colorPicker.fireEvent(new ActionEvent()); colorPicker.hide(); } else {
public void selectColor(KeyEvent event) { if (rectangle.getFill() != null) { if (rectangle.getFill() instanceof Color) { colorPicker.setValue((Color) rectangle.getFill()); colorPicker.fireEvent(new ActionEvent()); } event.consume(); } colorPicker.hide(); } }
Color fill = (Color) rectangle.getFill(); colorPicker.setValue(fill); colorPicker.fireEvent(new ActionEvent()); updateSelection(fill); event.consume();
if (colorPickerGrid.getBoundsInLocal().contains(t.getX(), t.getY())) { updateSelection(colorPicker.getValue()); colorPicker.fireEvent(new ActionEvent()); colorPicker.hide(); } else {
@Override public void changed(ObservableValue<? extends AuditralColorMapping> observable, AuditralColorMapping oldValue, AuditralColorMapping newValue) { if (oldValue != null) { colorDetail.valueProperty().unbindBidirectional(oldValue.color); occurrenceDetail.textProperty().unbindBidirectional(oldValue.occurrenceRegEx); loglevelDetail.textProperty().unbindBidirectional(oldValue.loglevelRegEx); workflowidDetail.textProperty().unbindBidirectional(oldValue.workflowInstanceIdRegEx); correlationidDetail.textProperty().unbindBidirectional(oldValue.correlationIdRegEx); conversionidDetail.textProperty().unbindBidirectional(oldValue.conversationIdRegEx); messageTypDetail.textProperty().unbindBidirectional(oldValue.messageTypeRegEx); idDetail.textProperty().unbindBidirectional(oldValue.idRegEx); } if (newValue != null) { colorDetail.valueProperty().bindBidirectional(newValue.color); occurrenceDetail.textProperty().bindBidirectional(newValue.occurrenceRegEx); loglevelDetail.textProperty().bindBidirectional(newValue.loglevelRegEx); workflowidDetail.textProperty().bindBidirectional(newValue.workflowInstanceIdRegEx); correlationidDetail.textProperty().bindBidirectional(newValue.correlationIdRegEx); conversionidDetail.textProperty().bindBidirectional(newValue.conversationIdRegEx); messageTypDetail.textProperty().bindBidirectional(newValue.messageTypeRegEx); idDetail.textProperty().bindBidirectional(newValue.idRegEx); colorDetail.fireEvent(new ActionEvent());// javafx bug workaround else color chooser wont update // http://javafx-jira.kenai.com/browse/RT-26633 } } });