Class: SimpleGuiCreator::JFileChooser
- Inherits:
-
Object
- Object
- SimpleGuiCreator::JFileChooser
- Defined in:
- lib/simple_gui_creator/swing_helpers.rb
Instance Method Summary collapse
-
#go(show_save_dialog_instead = false) ⇒ Object
raises on failure…
- #set_file(f) ⇒ Object (also: #setFile)
-
#set_title(x) ⇒ Object
match FileDialog methods…
Instance Method Details
#go(show_save_dialog_instead = false) ⇒ Object
raises on failure…
111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/simple_gui_creator/swing_helpers.rb', line 111 def go show_save_dialog_instead = false if show_save_dialog_instead success = show_save_dialog nil else success = show_open_dialog nil end unless success == Java::javax::swing::JFileChooser::APPROVE_OPTION return nil end get_selected_file.get_absolute_path end |
#set_file(f) ⇒ Object Also known as: setFile
128 129 130 |
# File 'lib/simple_gui_creator/swing_helpers.rb', line 128 def set_file f set_selected_file JFile.new(f) end |
#set_title(x) ⇒ Object
match FileDialog methods…
124 125 126 |
# File 'lib/simple_gui_creator/swing_helpers.rb', line 124 def set_title x set_dialog_title x end |