Class: ApplicationHandler
- Defined in:
- lib/fumoffu/generators/templates/engine/src/actions/handlers/application_handler.rb
Overview
ActionManager is the a Abstract Class which used within the swing UI to handle a actions
In the Fumoffu FrameWork All processed action should go through the ApplicationHandler
Instance Method Summary collapse
-
#handleAction(event, action, output_container) ⇒ Object
java.awt.event.ActionEvent event, String action, Component output container.
-
#initialize ⇒ ApplicationHandler
constructor
A new instance of ApplicationHandler.
-
#loadEngine ⇒ Object
this method should be called right after the interface is done with the initialization.
Constructor Details
#initialize ⇒ ApplicationHandler
Returns a new instance of ApplicationHandler.
10 11 12 |
# File 'lib/fumoffu/generators/templates/engine/src/actions/handlers/application_handler.rb', line 10 def initialize @handlers = Array.new end |
Instance Method Details
#handleAction(event, action, output_container) ⇒ Object
java.awt.event.ActionEvent event, String action, Component output container
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fumoffu/generators/templates/engine/src/actions/handlers/application_handler.rb', line 21 def handleAction event, action, output_container begin @handlers.each do |handler| return true unless not handler.handleAction(event, action, output_container) end rescue => e # FIXME INTEGRATE THE RUBY LOGGER puts "Failed to process action: '#{action.to_s}' "+e.backtrace.join("\n")+":\n "+e.inspect end return false end |
#loadEngine ⇒ Object
this method should be called right after the interface is done with the initialization
16 17 18 |
# File 'lib/fumoffu/generators/templates/engine/src/actions/handlers/application_handler.rb', line 16 def loadEngine # Do stuff end |