Sha256: 36a35140648c68a586de8a15f4e688af930cd0d5b9a77a328eaa268025b6bb46

Contents?: true

Size: 583 Bytes

Versions: 15

Compression:

Stored size: 583 Bytes

Contents

require 'swing/attr_setter'

import javax.swing.JFrame

module Swing

  class Frame < JFrame
    include AttrSetter

    attr_setter :layout, :background, :size, :title,
                :default_close_operation => JFrame::EXIT_ON_CLOSE #DISPOSE_ON_CLOSE, HIDE_ON_CLOSE

    def initialize name, opts = {}

      set_attributes(opts) { super(name) }

      setup opts

      self.location_relative_to = nil
      self.visible = true
    end

    # Method that subclasses should override to set up their contents before
    # Frame is made visible
    def setup opts
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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