class Glimmer::SWT::CompositeProxy

Public Class Methods

new(parent, args, block) click to toggle source
Calls superclass method
# File lib/glimmer/swt/composite_proxy.rb, line 28
def initialize(parent, args, block)
  super(parent, args, block)
  @layout = default_layout
end

Public Instance Methods

background_image() click to toggle source

background image

# File lib/glimmer/swt/composite_proxy.rb, line 67
def background_image
  @background_image
end
background_image=(value) click to toggle source

background image is stretched by default

# File lib/glimmer/swt/composite_proxy.rb, line 72
def background_image=(value)
  @background_image = value
  dom_element.css('background-image', "url(#{background_image})")
  dom_element.css('background-repeat', 'no-repeat')
  dom_element.css('background-size', 'cover')
end
default_layout() click to toggle source
# File lib/glimmer/swt/composite_proxy.rb, line 33
def default_layout
  GridLayoutProxy.new(self, [])
end
dom() click to toggle source
# File lib/glimmer/swt/composite_proxy.rb, line 37
def dom
  div_id = id
  div_style = css
  div_class = name
  @dom ||= html {
    div(id: div_id, class: div_class, style: div_style)
  }.to_s
end
getLayout()
Alias for: get_layout
get_layout() click to toggle source
# File lib/glimmer/swt/composite_proxy.rb, line 52
def get_layout
  @layout
end
Also aliased as: getLayout
layout=(the_layout) click to toggle source
# File lib/glimmer/swt/composite_proxy.rb, line 46
def layout=(the_layout)
  @layout = the_layout
end
Also aliased as: set_layout, setLayout
layout​(changed = nil, all = nil) click to toggle source
# File lib/glimmer/swt/composite_proxy.rb, line 61
def layout​(changed = nil, all = nil)
  # TODO implement layout(changed = nil, all = nil) just as per SWT API
  @layout&.layout(self, changed)
end
pack(*args) click to toggle source
# File lib/glimmer/swt/composite_proxy.rb, line 57
def pack(*args)
  # No Op (just a shim) TODO consider if it should be implemented
end
setLayout(the_layout)
Alias for: layout=
set_layout(the_layout)
Alias for: layout=