Class: Cheri::JRuby::Explorer::AboutDialog

Inherits:
Object
  • Object
show all
Includes:
Html, Swing
Defined in:
lib/cheri/jruby/explorer/dialogs.rb,
lib/cheri/jruby/explorer/dialogs-old.rb

Constant Summary

Constants included from Html

Html::Aliases, Html::HtmlConnecter, Html::Types, Html::VERSION

Constants included from Swing

Swing::SwingConnecter

Instance Method Summary collapse

Constructor Details

#initialize(main) ⇒ AboutDialog

Returns a new instance of AboutDialog.



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 252

def initialize(main)
  swing[:auto]
  @main = main
  @main_frame = main.main_frame
  @dialog = dialog @main_frame, 'About Cheri::JRuby::Explorer', true do |d|
    size 600,450
    default_close_operation :HIDE_ON_CLOSE
    @view ||= scroll_pane do
      align :LEFT
      @html_view = editor_pane do
        editable false
        content_type 'text/html'
        html { head { style 'body { font-family: sans-serif; }' }
          body(:bgolor=>:white) { div(:align=>:center) {
          h3 font(:color=>:blue) {"Cheri::JRuby::Explorer version #{Cheri::VERSION::STRING}"}
          p 'Written by Bill Dortch ', esc('<[email protected]>'), br,
            'Copyright &copy; 2007-2009 William N Dortch'
          p
          table(:width=>'97%') {
            tr{td(:align=>:left) {
              p 'Cheri::JRuby::Explorer (CJX) demonstrates some of the features ',
              'of the Cheri builder framework, and may even prove useful ',
              'in its own right.  CJX is built using the Cheri::Swing and Cheri::Html ',
              'components of the framework.'
              p
              p 'This is a ',i('very'),' early Beta release, of both Cheri and CJX, so do ',
              'expect bugs, crashes, and the like. The Cheri framework itself is pretty ',
              'stable (though I refactor it weekly, it seems), but the CJX code is mostly ',
              'untested beyond the confines of my desktop.'
              p
              p 'For more information, and to report bugs or suggest features, please visit ',
              'the Cheri project pages on RubyForge, at ', a(b('http://cheri.rubyforge.org'), 
              :href=>'http://cheri.rubyforge.org/'), ' and ', a(b('http://rubyforge.org/projects/cheri'),
              :href=>'http://rubyforge.org/projects/cheri'), '.'
            }}
          }
        }}}
      end
    end
  end
   @main.center(@main_frame,@dialog)
end

Instance Method Details

#hideObject



303
304
305
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 303

def hide
  @dialog.visible = false  
end

#showObject



299
300
301
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 299

def show
  @dialog.visible = true  
end

#valueObject



295
296
297
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 295

def value
  @dialog  
end