use of org.jkiss.dbeaver.model.preferences.DBPPreferenceListener.PreferenceChangeEvent in project dbeaver by dbeaver.
the class BinaryPanelEditor method createControl.
@Override
public HexEditControl createControl(IValueController valueController) {
HexEditControl hControl = new HexEditControl(valueController.getEditPlaceholder(), SWT.BORDER);
DBPPreferenceListener preferencesChangeListener = new DBPPreferenceListener() {
@Override
public void preferenceChange(PreferenceChangeEvent event) {
if (HexPreferencesPage.PROP_DEF_WIDTH.equals(event.getProperty())) {
String defValue = (String) event.getNewValue();
hControl.setDefWidth(Integer.valueOf(defValue));
}
}
};
DBPPreferenceStore store = DBeaverCore.getGlobalPreferenceStore();
store.addPropertyChangeListener(preferencesChangeListener);
return hControl;
}
Aggregations