Sha256: d97131d4ab82374e49af1c0a727115555ba2f937c84b8af915e368bef131549d

Contents?: true

Size: 328 Bytes

Versions: 13

Compression:

Stored size: 328 Bytes

Contents

require 'swing'
require 'swing/action_listener'

module Swing

  class JButton

    attr_setter :enabled

    def initialize text, opts = {}, &block
      set_attributes(opts) { super(text) }

      self.addActionListener ActionListener.new &block

      opts[:parent].add self if opts[:parent]
    end
  end # class Button
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
swing-0.1.16 lib/swing/old/button.rb
swing-0.1.15 lib/swing/old/button.rb
swing-0.1.14 lib/swing/old/button.rb
swing-0.1.12 lib/swing/old/button.rb
swing-0.1.10 lib/swing/old/button.rb
swing-0.1.8 lib/swing/old/button.rb
swing-0.1.7 lib/swing/old/button.rb
swing-0.1.5 lib/swing/old/button.rb
swing-0.1.4 lib/swing/old/button.rb
swing-0.1.3 lib/swing/old/button.rb
swing-0.1.2 lib/swing/old/button.rb
swing-0.1.1 lib/swing/old/button.rb
swing-0.1.0 lib/swing/old/button.rb