Class: Java::JavafxSceneControl::Menu

Inherits:
Object
  • Object
show all
Includes:
JRubyFX::DSL
Defined in:
lib/jrubyfx/core_ext/precompiled.rb

Constant Summary

Constants included from JRubyFX::DSL

JRubyFX::DSL::NAME_TO_CLASSES, JRubyFX::DSL::NAME_TO_CLASS_NAME

Constants included from JRubyFX::FXImports

JRubyFX::FXImports::JFX_CLASS_HIERARCHY, JRubyFX::FXImports::LOCAL_NAME_MAP

Constants included from JRubyFX

JRubyFX::VERSION

Instance Method Summary collapse

Methods included from JRubyFX::DSL

compile_dsl, included, load_dsl, #logical_lookup, #self_test_lookup, write_color_method_converter, write_enum_converter, write_enum_method_converter, write_event_method

Methods included from JRubyFX::FXImports

#const_missing

Methods included from JRubyFX

#build, included, load_fx, #run_later, #with

Methods included from JRubyFX::Utils::CommonUtils

#attempt_conversion, #populate_properties, #split_args_from_properties

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



1544
1545
1546
1547
1548
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1544

def method_missing(name, *args, &block)
  super(name, *args, &block).tap do |obj|
    add(obj) if obj.kind_of?(Java::JavafxSceneControl::MenuItem) && !name.to_s.end_with?('!')
  end
end

Instance Method Details

#add(value) ⇒ Object



1549
1550
1551
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1549

def add(value)
  get_items() << value
end

#on_hidden(&block) ⇒ Object



1516
1517
1518
1519
1520
1521
1522
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1516

def on_hidden(&block)
  if block_given?
    setOnHidden block
  else
    getOnHidden
  end
end

#on_hiding(&block) ⇒ Object



1537
1538
1539
1540
1541
1542
1543
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1537

def on_hiding(&block)
  if block_given?
    setOnHiding block
  else
    getOnHiding
  end
end

#on_showing(&block) ⇒ Object



1523
1524
1525
1526
1527
1528
1529
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1523

def on_showing(&block)
  if block_given?
    setOnShowing block
  else
    getOnShowing
  end
end

#on_shown(&block) ⇒ Object



1530
1531
1532
1533
1534
1535
1536
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1530

def on_shown(&block)
  if block_given?
    setOnShown block
  else
    getOnShown
  end
end