Class: Java::OrgEclipseSwtWidgets::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/sweet/swt/shell.rb

Overview

TODO pack into WIDGETS

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#displayObject (readonly)

Returns the value of attribute display.



3
4
5
# File 'lib/sweet/swt/shell.rb', line 3

def display
  @display
end

Instance Method Details



18
19
20
# File 'lib/sweet/swt/shell.rb', line 18

def menubar(&block)
  self.menu_bar = make_menu(:menubar, &block)
end

#sweeten(display, name, opts = {}, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/sweet/swt/shell.rb', line 6

def sweeten(display, name, opts = {}, &block)
  @display = display

  self.text = opts.delete(:title) || name
  w, h = opts.delete(:width), opts.delete(:height)

  super(self, opts, &block)

  pack
  size = (w || width), (h || height)
end