• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MVC: how to implement hooks

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
one more post on MVC. I identified several options to implement hooks for View->Controller events.
  • use ActionListener - common solution
  • use Action - more usable IMO, since we can attach Action to many components(menu, buttons) and events(keystroke)
  • use CustomListener - not tied to swing, but definitely tied to custom logic(custom event types, constants etc.)


  • I'm considering to go with Action solution, but in such case Actions are instantiated in Controller, and Controller specifies Action name, icon etc. - properties, which are gui specific. Any comments? Thanks.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic