use of org.eclipse.jface.util.IPropertyChangeListener in project janrufmonitor by tbrandt77.
the class InitDataPathPage method createControl.
public void createControl(Composite parent) {
setTitle(this.m_i18n.getString(getNamespace(), "title", "label", this.m_language));
setDescription(this.m_i18n.getString(getNamespace(), "description", "label", this.m_language));
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new GridLayout(1, false));
c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
DirectoryFieldEditor dfe = new DirectoryFieldEditor(this.m_i18n.getString(getNamespace(), "name", "label", this.m_language), this.m_i18n.getString(getNamespace(), "label", "label", this.m_language), this.m_i18n.getString(getNamespace(), "message", "label", this.m_language), c);
dfe.setStringValue(m_oldDatapath);
dfe.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
m_newDatapath = (String) e.data;
}
});
dfe.setPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent e) {
m_newDatapath = (String) e.getNewValue();
}
});
setPageComplete(isComplete());
setControl(c);
}
use of org.eclipse.jface.util.IPropertyChangeListener in project janrufmonitor by tbrandt77.
the class TwitterPINPage method createControl.
public void createControl(Composite parent) {
setTitle(this.m_i18n.getString(getNamespace(), "title", "label", this.m_language));
setDescription(this.m_i18n.getString(getNamespace(), "description", "label", this.m_language));
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new GridLayout(1, false));
c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
StringFieldEditor sfe = new StringFieldEditor("pin", this.m_i18n.getString(getNamespace(), "pin", "label", this.m_language), 10, c);
sfe.setStringValue("");
this.m_PIN = "";
sfe.setPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent e) {
if (e != null && e.getNewValue() != null && e.getNewValue() instanceof String)
m_PIN = (String) e.getNewValue();
setPageComplete(isComplete());
}
});
Button rPIN = new Button(c, SWT.PUSH);
rPIN.setText(this.m_i18n.getString(getNamespace(), "rpin", "label", this.m_language));
rPIN.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent arg0) {
}
public void widgetSelected(SelectionEvent arg0) {
try {
Program.launch(m_client.authorizeUrl().toURL().toExternalForm());
} catch (MalformedURLException e) {
m_logger.severe(e.toString());
}
}
});
setPageComplete(isComplete());
setControl(c);
}
use of org.eclipse.jface.util.IPropertyChangeListener in project janrufmonitor by tbrandt77.
the class PreferenceConfigManagerStore method firePropertyChangeEvent.
public void firePropertyChangeEvent(String property, Object oldValue, Object newValue) {
IPropertyChangeListener pcl = null;
for (int i = 0; i < this.m_pcl.size(); i++) {
pcl = (IPropertyChangeListener) this.m_pcl.get(i);
pcl.propertyChange(new PropertyChangeEvent(this, property, oldValue, newValue));
}
// 2004/12/28: removed due to performance reasons
// String[] p = this.tokenizeProperty(property);
// this.getRuntime().getConfigurableNotifier().notifyByNamespace(p[0]);
}
use of org.eclipse.jface.util.IPropertyChangeListener in project tdq-studio-se by Talend.
the class AbstractMemoryChangeNotifier method initializeThresholdsFromPreferences.
private void initializeThresholdsFromPreferences() {
isThresholdControl = PlatformUI.getPreferenceStore().getBoolean(ANALYSIS_AUTOMATIC_MEMORY_CONTROL);
userDefineThreshold = PlatformUI.getPreferenceStore().getInt(ANALYSIS_MEMORY_THRESHOLD);
reloadPerference();
PlatformUI.getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
// MOD scorreia 2013-09-10 update also isThresholdControl
if (event.getProperty() == ANALYSIS_AUTOMATIC_MEMORY_CONTROL) {
isThresholdControl = Boolean.valueOf(event.getNewValue().toString());
reloadPerference();
} else if (event.getProperty() == ANALYSIS_MEMORY_THRESHOLD) {
userDefineThreshold = Integer.valueOf(event.getNewValue().toString());
isThresholdControl = true;
reloadPerference();
}
}
});
}
use of org.eclipse.jface.util.IPropertyChangeListener in project whole by wholeplatform.
the class ModelMergeViewer method fireDirtyState.
protected void fireDirtyState(boolean state) {
final PropertyChangeEvent event = new PropertyChangeEvent(this, CompareEditorInput.DIRTY_STATE, false, state);
if (listenerList == null || listenerList.isEmpty())
return;
Runnable runnable = new Runnable() {
public void run() {
for (IPropertyChangeListener listener : listenerList) {
final IPropertyChangeListener propertyChangeListener = listener;
SafeRunner.run(new ISafeRunnable() {
public void run() throws Exception {
propertyChangeListener.propertyChange(event);
}
public void handleException(Throwable exception) {
}
});
}
}
};
UISynchronize uiSynchronize = getContext().get(UISynchronize.class);
if (uiSynchronize != null)
uiSynchronize.syncExec(runnable);
else
runnable.run();
}
Aggregations