Class: Cheri::JRuby::Explorer::HtmlViewer
- Inherits:
-
Viewer
- Object
- Viewer
- Cheri::JRuby::Explorer::HtmlViewer
show all
- Includes:
- Html
- Defined in:
- lib/cheri/jruby/explorer/viewer.rb
Constant Summary
collapse
- TblWidth =
'98%'
- TColor =
'#080080'
- HtmlStyle =
%q[
.method { font-family: monospaced, courier; font-size: medium }
.oid { font-family: monospaced, courier; }
.var { font-family: monospaced, courier; font-weight: bold }
.val { font-family: monospaced, courier; color: #000080 }
.hdr { font-family: sans-serif; font-size: large; font-weight: bold; color: #000080 }
body { font-family: sans-serif; }
]
- ContType =
'text/html'.freeze
Constants included
from Html
Html::Aliases, Html::HtmlConnecter, Html::Types, Html::VERSION
Constants included
from Swing
Swing::SwingConnecter
Instance Method Summary
collapse
Methods inherited from Viewer
#initialize
#close_view, #icon, #icon_tab, #icon_tree, #initialize, #instance, #leaf?, #main, #proxy, #tab, #title, #title_tab, #title_tree, #tooltip, #type
Instance Method Details
#html_content ⇒ Object
335
336
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 335
def html_content
end
|
#html_document ⇒ Object
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 306
def html_document
html do
head do
style html_style
end
body :bgcolor => :white do
div :align => :left do
html_heading
html_content
end
end
end
end
|
#html_heading ⇒ Object
322
323
324
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 322
def html_heading
html_title
end
|
#html_style ⇒ Object
290
291
292
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 290
def html_style
HtmlStyle
end
|
#html_title ⇒ Object
326
327
328
329
330
331
332
333
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 326
def html_title
table :width => TblWidth, :cellspacing => 2, :cellpadding => 2, :border => 0 do
tr do
td esc(title), :class => :hdr, :align => :left, :colspan=> 2
end
end
end
|
#refresh ⇒ Object
338
339
340
341
342
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 338
def refresh
cheri_yield @html_view do
html_document
end
end
|
#view(&block) ⇒ Object
294
295
296
297
298
299
300
301
302
303
304
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 294
def view(&block)
@view ||= scroll_pane do
align :LEFT
@html_view = editor_pane do
editable false
content_type ContType
html_document
end
end
super
end
|