0

I've created my own org.eclipse.swt.widgets.Composite. I am using this composite within a org.eclipse.jface.wizard.WizardPage.

org.eclipse.swt.widgets.Composite has a variable pageComplete. I have to check the value of this variable after any change in the Composite or after every change of this variable. How do it do that?

My first idea was to create my own action for the Composite, but I don't know how to do that.

Or maybe someone can think of a better way to achieve this?

Baz
  • 36,440
  • 11
  • 68
  • 94
qizer
  • 519
  • 2
  • 6
  • 14
  • org.eclipse.swt.widgets.Composite doesn't contain such a variable. Do you mean your own Composite class? For listening of property change you can use [Bound property](http://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html#bound) – Jan Krakora Dec 13 '12 at 09:15
  • Did you try JFace Databinding ? You should take a look at [this](http://www.vogella.com/articles/EclipseDataBinding/article.html) if you didn't already do. – l1sq0u48 Dec 12 '12 at 10:50
  • thank to @mmoulis, u helped me. thank for doc, i founded answer here [link](http://www.vogella.com/articles/EclipseDataBinding/article.html#swtdatabinding) – qizer Dec 17 '12 at 08:06

1 Answers1

1

If you have this question - please, read this article

Thank to @mmoulis

ps: how i did

Add to org.eclipse.swt.widgets.Composite class value:

private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

And added two methods

public void addPropertyChangeListener(PropertyChangeListener listener) {
    propertyChangeSupport.addPropertyChangeListener(listener);
}

public void removePropertyChangeListener(PropertyChangeListener listener) {
    propertyChangeSupport.removePropertyChangeListener(listener);
}

And in pages class added listener to org.eclipse.swt.widgets.Composite

composite.addPropertyChangeListener(new PropertyChangeListener() {
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
    }
});

This all ( :

Community
  • 1
  • 1
qizer
  • 519
  • 2
  • 6
  • 14
  • 1
    Please never just post a link to an external page. Always summarize the content of that page. This way your post stays useful even if the external link isn't available anymore. – Baz Dec 17 '12 at 09:05