lib/monkeybars/view.rb in Neurogami-jimpanzee-1.0.2.1 vs lib/monkeybars/view.rb in Neurogami-jimpanzee-1.0.3.2
- old
+ new
@@ -69,10 +69,12 @@
EXIT = javax::swing::WindowConstants::EXIT_ON_CLOSE
HIDE = javax::swing::WindowConstants::HIDE_ON_CLOSE
METHOD = :method
end
+
+
private
@@view_nestings_for_child_view ||= {}
def self.view_nestings
@@view_nestings_for_child_view[self] ||= {}
end
@@ -434,9 +436,16 @@
nesting.nests_with_remove?
}.each {|nesting|
nesting.remove(self, nested_view, nested_component, model, transfer)
}
end
+
+ def have_focus?
+ !@main_view_component.focus_owner?.nil?
+ end
+ alias_method :focused?, :have_focus?
+
+
def update(model, transfer)
self.class.view_mappings.select{|mapping| mapping.maps_to_view?}.each {|mapping| mapping.to_view(self, model, transfer)}
transfer.clear
end