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

Inherits:
Object
  • Object
show all
Includes:
Html, Swing
Defined in:
lib/cheri/jruby/explorer/dialogs.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.



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 343

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 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



394
395
396
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 394

def hide
  @dialog.visible = false  
end

#showObject



390
391
392
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 390

def show
  @dialog.visible = true  
end

#valueObject



386
387
388
# File 'lib/cheri/jruby/explorer/dialogs.rb', line 386

def value
  @dialog  
end