Class: GraphTypeActionListener
- Inherits:
-
Object
- Object
- GraphTypeActionListener
- Defined in:
- lib/app/simple_controller.rb
Instance Method Summary collapse
- #actionPerformed(event) ⇒ Object
-
#initialize(controller) ⇒ GraphTypeActionListener
constructor
A new instance of GraphTypeActionListener.
Constructor Details
#initialize(controller) ⇒ GraphTypeActionListener
Returns a new instance of GraphTypeActionListener.
566 567 568 |
# File 'lib/app/simple_controller.rb', line 566 def initialize(controller) @controller = controller end |
Instance Method Details
#actionPerformed(event) ⇒ Object
570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/app/simple_controller.rb', line 570 def actionPerformed(event) return_value = event.getSource.getText case return_value.downcase when 'directed' @controller.model.set_directed when 'undirected' @controller.model.set_undirected else puts "Wrong Argument" end @controller.view.remove_text_field @controller.view.remove_info_panel end |