Class: SimpleGuiCreator::JCheckBox

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_gui_creator/swing_helpers.rb

Instance Method Summary collapse

Instance Method Details

#after_checked(&block) ⇒ Object



236
237
238
239
240
241
242
# File 'lib/simple_gui_creator/swing_helpers.rb', line 236

def after_checked &block
  add_action_listener {
    if isSelected # they just 'added' a check mark
      block.call
    end
  }
end

#after_unchecked(&block) ⇒ Object



244
245
246
247
248
249
250
# File 'lib/simple_gui_creator/swing_helpers.rb', line 244

def after_unchecked &block
  add_action_listener {
    if !isSelected # they just "unchecked" it
      block.call
    end
  }
end