To create a custom event or to use PropertyChangeEvent

Discussion in 'Java' started by -, Jul 18, 2005.

  1. -

    - Guest

    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?
     
    -, Jul 18, 2005
    #1
    1. Advertising

  2. -

    Wismerhill Guest

    - 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.
     
    Wismerhill, Jul 19, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Tm92aWNl?=
    Replies:
    2
    Views:
    4,104
    Matt Berther
    Sep 23, 2004
  2. Jonah Olsson
    Replies:
    1
    Views:
    580
    Scott Allen
    Apr 5, 2005
  3. SammyBar
    Replies:
    1
    Views:
    604
    Erjan Gavalji
    Jul 21, 2009
  4. Jonah Olsson
    Replies:
    2
    Views:
    206
    Jonah Olsson
    Apr 5, 2005
  5. SammyBar

    Custom event from a custom web control is fired twice

    SammyBar, Jul 14, 2009, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    948
    Erjan Gavalji
    Jul 21, 2009
Loading...

Share This Page