Class: SimpleGuiCreator::JComboBox

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

Instance Method Summary collapse

Instance Method Details

#add_items(items) ⇒ Object



184
185
186
187
188
# File 'lib/simple_gui_creator/swing_helpers.rb', line 184

def add_items items
  for item in items
    add_item item
  end
end

#on_select_new_element(&block) ⇒ Object



178
179
180
181
182
# File 'lib/simple_gui_creator/swing_helpers.rb', line 178

def on_select_new_element &block
   add_item_listener { |e|
     block.call(get_item_at(get_selected_index), get_selected_index)
   }
end