class Glimmer::Swing::ComponentProxy::JFrameProxy
Proxy for Swing
JFrame objects
Follows the Proxy Design Pattern
Constants
- DEFAULT_HEIGHT
- DEFAULT_WIDTH
Public Instance Methods
post_add_content()
click to toggle source
# File lib/glimmer/swing/component_proxy/j_frame_proxy.rb, line 44 def post_add_content unless @initial_content_added @initial_content_added = true the_width = @minimum_size_set ? minimum_size.width : DEFAULT_WIDTH the_height = @minimum_size_set ? minimum_size.height : DEFAULT_HEIGHT set_minimum_size(Java::JavaAwt::Dimension.new(the_width, the_height)) set_default_close_operation(Java::JavaxSwing::JFrame::EXIT_ON_CLOSE) end end
set_minimum_size(*args)
click to toggle source
Calls superclass method
# File lib/glimmer/swing/component_proxy/j_frame_proxy.rb, line 34 def set_minimum_size(*args) @minimum_size_set = true if args.size == 1 && args.first.is_a?(Java::JavaAwt::Dimension) super else super(Java::JavaAwt::Dimension.new(*args)) end end
Also aliased as: minimum_size=
show()
click to toggle source
# File lib/glimmer/swing/component_proxy/j_frame_proxy.rb, line 54 def show unless @shown_at_least_once @shown_at_least_once = true Java::JavaxSwing::SwingUtilities.invoke_later do pack set_visible(true) end else set_visible(true) end end