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



1411
1412
1413
1414
1415
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1411

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



1416
1417
1418
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1416

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

#on_hidden(&block) ⇒ Object



1383
1384
1385
1386
1387
1388
1389
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1383

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

#on_hiding(&block) ⇒ Object



1390
1391
1392
1393
1394
1395
1396
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1390

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

#on_showing(&block) ⇒ Object



1397
1398
1399
1400
1401
1402
1403
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1397

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

#on_shown(&block) ⇒ Object



1404
1405
1406
1407
1408
1409
1410
# File 'lib/jrubyfx/core_ext/precompiled.rb', line 1404

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