Sha256: 7a3180df742b928f6b178fc5065f0db84cd2dc6534d090afdba6a4019220e172

Contents?: true

Size: 385 Bytes

Versions: 1

Compression:

Stored size: 385 Bytes

Contents

require 'swing/action_listener'
require 'swing/attr_setter'

module Clients
  module Swing

    class MenuItem < javax.swing.JMenuItem
      include AttrSetter

      def initialize text, opts = {}, &block
        set_attributes(opts) { super text }
        self.addActionListener ActionListener.new &block
        opts[:parent].add self if opts[:parent]
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swing-0.0.2 lib/swing/menu_item.rb