Class: ExitAction

Inherits:
AbstractAction
  • Object
show all
Defined in:
lib/life_game_viewer/view/actions.rb

Instance Method Summary collapse

Constructor Details

#initialize(table_model) ⇒ ExitAction

table_model param not used but needed for instantiation by create_button



151
152
153
154
# File 'lib/life_game_viewer/view/actions.rb', line 151

def initialize(table_model)
  super("Exit (Q)")
  put_value(SHORT_DESCRIPTION, 'Press capital-Q to exit.')
end

Instance Method Details

#actionPerformed(event) ⇒ Object



156
157
158
# File 'lib/life_game_viewer/view/actions.rb', line 156

def actionPerformed(event)
  java.lang.System.exit(0)
end