void (ObservableStateListener.PropertyChangeEvent event) { Object newValue = event.getNewValue(); if (!(newValue instanceof Boolean)) { LOG.error("newValue is not Boolean. property name = " + event.getPropertyName() + ", newValue = " + newValue); return; } if ((boolean)newValue) { myStickySelectionStart = getCaretModel().getOffset(); } else { mySelectionModel.removeSelection(); } }