To create a custom event or to use PropertyChangeEvent

?

-

I have a close and open method in a class containing fireCloseEvent()
and fireOpenEvent() respectively to fire a custom event.

What if in order not to create a custom event, I do it such that I
create a 'state' class variable and change the state when it is closed
or opened and then firePropertyChangeEvent?

Is the former or latter the proper way?
 
W

Wismerhill

- ecrivit le 18/07/2005 09:31 :
I have a close and open method in a class containing fireCloseEvent()
and fireOpenEvent() respectively to fire a custom event.

What if in order not to create a custom event, I do it such that I
create a 'state' class variable and change the state when it is closed
or opened and then firePropertyChangeEvent?

Is the former or latter the proper way?

If you have no parameters transmitted in your custom open /close
events, the PropertyChangeEvent is quite good.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148
Top