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'
Constants included
from Html
Html::Aliases, Html::HtmlConnecter, Html::Types, Html::VERSION
Constants included
from Swing
Swing::SwingConnecter
Instance Attribute Summary
#icon, #instance, #main, #title, #tooltip, #type
Instance Method Summary
collapse
Methods inherited from Viewer
#initialize
#close_view, #icon_tab, #icon_tree, #initialize, #leaf?, #proxy, #tab, #title_tab, #title_tree
Instance Method Details
#html_content ⇒ Object
310
311
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 310
def html_content
end
|
#html_document ⇒ Object
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 281
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
297
298
299
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 297
def html_heading
html_title
end
|
#html_style ⇒ Object
265
266
267
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 265
def html_style
HtmlStyle
end
|
#html_title ⇒ Object
301
302
303
304
305
306
307
308
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 301
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
313
314
315
316
317
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 313
def refresh
cheri_yield @html_view do
html_document
end
end
|
#view(&block) ⇒ Object
269
270
271
272
273
274
275
276
277
278
279
|
# File 'lib/cheri/jruby/explorer/viewer.rb', line 269
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
|