swing 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -73,3 +73,7 @@
73
73
  == 0.1.12 / 2011-05-27
74
74
 
75
75
  * Default classes for some Awt::Component property setters
76
+
77
+ == 0.1.14 / 2011-05-28
78
+
79
+ * Block given to JComponent constructor is now yielded to
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.12
1
+ 0.1.14
@@ -2,16 +2,28 @@ require 'swing'
2
2
 
3
3
  class Swing::JFrame
4
4
 
5
+ # contentPane Container � � From rootPane
6
+ # defaultCloseOperation int � � HIDE_ON_CLOSE
7
+ # glassPane Component � � From rootPane
8
+ # JMenuBar JMenuBar � � From rootPane
9
+ # layeredPane JLayeredPane � � From rootPane
10
+ # layout LayoutManager � � BorderLayout( )
11
+ # rootPane JRootPane � � JRootPane( )
12
+ # rootPaneCheckingEnabled boolean � � true
13
+ # title String � � ""
14
+ # ----Getters only - NO Setters!
15
+ # accessibleContexto AccessibleContext � JFrame.Accessible-JFrame( )
16
+
5
17
  attr_setter :title, :default_close_operation => EXIT_ON_CLOSE #DISPOSE_ON_CLOSE, HIDE_ON_CLOSE
6
18
 
7
- def initialize *args, &block
8
- super *args, &nil
19
+ def initialize *args #, &block
20
+ super *args #, &nil
9
21
 
10
- # Yielding self to set up contents before making frame visible
11
- yield self if block_given?
22
+ # # Yielding self to set up contents before making frame visible
23
+ # yield self if block_given?
12
24
 
13
- self.pack
14
- self.location_relative_to = nil
15
- self.visible = true
25
+ # self.pack
26
+ # self.location_relative_to = nil
27
+ # self.visible = true
16
28
  end
17
29
  end
@@ -44,7 +44,7 @@ module SwingSupport
44
44
  # Sets attributes after calling original new
45
45
  def new_with_attributes(*args, &block)
46
46
  opts = args.last.is_a?(Hash) ? args.pop.dup : {}
47
- component = self.new_without_attributes(*args, &block)
47
+ component = self.new_without_attributes(*args) #, &block)
48
48
 
49
49
  # Extract known attributes given in opts,
50
50
  # run default actions on them, or return known defaults
@@ -62,8 +62,6 @@ module SwingSupport
62
62
  [name, result] unless result.nil?
63
63
  end.compact
64
64
 
65
- # yield opts if block_given?
66
-
67
65
  attributes.each do |(name, value)|
68
66
  if component.respond_to? "#{name}="
69
67
  component.send "#{name}=", *value
@@ -79,6 +77,9 @@ module SwingSupport
79
77
 
80
78
  # Raises exception if any of the given options left unprocessed
81
79
  raise "Unrecognized options: #{opts}" unless opts.empty?
80
+
81
+ yield component if block_given?
82
+
82
83
  component
83
84
  end
84
85
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: swing
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.12
5
+ version: 0.1.14
6
6
  platform: ruby
7
7
  authors:
8
8
  - arvicco
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-27 00:00:00 +04:00
13
+ date: 2011-05-28 00:00:00 +04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency