Sha256: 254bb7817e4b4e45b42b71038ece8ce1f0d8eecea01412817ead452b35333861
Contents?: true
Size: 346 Bytes
Versions: 15
Compression:
Stored size: 346 Bytes
Contents
require 'swing/action_listener' require 'swing/attr_setter' 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
Version data entries
15 entries across 15 versions & 1 rubygems