Module: Cheri::JRuby::Explorer::ViewerInterface

Included in:
Viewer
Defined in:
lib/cheri/jruby/explorer/viewer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#iconObject

Returns the value of attribute icon.



147
148
149
# File 'lib/cheri/jruby/explorer/viewer.rb', line 147

def icon
  @icon
end

#instanceObject (readonly)

Returns the value of attribute instance.



146
147
148
# File 'lib/cheri/jruby/explorer/viewer.rb', line 146

def instance
  @instance
end

#mainObject (readonly)

Returns the value of attribute main.



146
147
148
# File 'lib/cheri/jruby/explorer/viewer.rb', line 146

def main
  @main
end

#titleObject

Returns the value of attribute title.



147
148
149
# File 'lib/cheri/jruby/explorer/viewer.rb', line 147

def title
  @title
end

#tooltipObject

Returns the value of attribute tooltip.



147
148
149
# File 'lib/cheri/jruby/explorer/viewer.rb', line 147

def tooltip
  @tooltip
end

#typeObject (readonly)

Returns the value of attribute type.



146
147
148
# File 'lib/cheri/jruby/explorer/viewer.rb', line 146

def type
  @type
end

Instance Method Details

#close_viewObject



209
210
211
# File 'lib/cheri/jruby/explorer/viewer.rb', line 209

def close_view
  @main.close_view(self)
end

#icon_tabObject



171
172
173
# File 'lib/cheri/jruby/explorer/viewer.rb', line 171

def icon_tab
  icon  
end

#icon_treeObject



167
168
169
# File 'lib/cheri/jruby/explorer/viewer.rb', line 167

def icon_tree
  icon  
end

#initialize(node_type, main, instance, *r) ⇒ Object



149
150
151
152
153
# File 'lib/cheri/jruby/explorer/viewer.rb', line 149

def initialize(node_type,main,instance,*r)
  @type = node_type
  @main = main
  @instance = instance  
end

#leaf?Boolean

Returns:

  • (Boolean)


175
176
177
# File 'lib/cheri/jruby/explorer/viewer.rb', line 175

def leaf?
  false  
end

#proxyObject



155
156
157
# File 'lib/cheri/jruby/explorer/viewer.rb', line 155

def proxy
  @instance.proxy  
end

#refreshObject



187
188
# File 'lib/cheri/jruby/explorer/viewer.rb', line 187

def refresh
end

#tab(&block) ⇒ Object



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/cheri/jruby/explorer/viewer.rb', line 190

def tab(&block)
  @tab ||= grid_table{
    opaque false
    grid_row{
      label title_tab, icon_tab, :LEFT, :a=>:nw, :px=>10
      button(CloseTabDimIcon, :a=>:ne) {
        rollover_icon CloseTabIcon
        fixed_size 12,12
        tool_tip_text 'Close'
        content_area_filled false
        border_painted false
        on_click { close_view }
      }
    }
  }
  cheri_yield @tab, &block if block_given?
  @tab
end

#title_tabObject



163
164
165
# File 'lib/cheri/jruby/explorer/viewer.rb', line 163

def title_tab
  title  
end

#title_treeObject



159
160
161
# File 'lib/cheri/jruby/explorer/viewer.rb', line 159

def title_tree
  title  
end

#view(&block) ⇒ Object



179
180
181
182
183
184
185
# File 'lib/cheri/jruby/explorer/viewer.rb', line 179

def view(&block)
  if @view
    @view.put_client_property(:viewer,self)
    cheri_yield(@view,&block) if block
    @view
  end
end