Module: Rubeus::Extensions::Javax::Swing::JComponent

Defined in:
lib/rubeus/extensions/javax/swing/j_component.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
9
10
11
# File 'lib/rubeus/extensions/javax/swing/j_component.rb', line 6

def self.included(base)
  base.module_eval do
    alias_method :set_preferred_size, :set_preferred_size_rubeus
    alias_method :preferred_size=, :set_preferred_size_rubeus
  end
end

Instance Method Details

#set_preferred_size_rubeus(*args) ⇒ Object



13
14
15
16
# File 'lib/rubeus/extensions/javax/swing/j_component.rb', line 13

def set_preferred_size_rubeus(*args)
  dimension = Rubeus::Awt::Dimension
  java_send :setPreferredSize, [dimension], dimension.create(*args)
end