Sha256: c102ae5c62f831f95538601fed9aca377b520154cbd443c0d4eaf2ec37ea953e

Contents?: true

Size: 667 Bytes

Versions: 1

Compression:

Stored size: 667 Bytes

Contents

require 'swing/attr_setter'

import javax.swing.JFrame

module Clients

  # Swing-based GUI controls
  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

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