Skip to content

Commit

Permalink
hierarchy_changed event added
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkdoor committed Nov 3, 2008
1 parent 53ee49e commit 8b0368e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/rswing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Module
require "events/container_events"
require "events/focus_events"
require "events/hierarchy_bounds_events"
require "events/hierarchy_changed"
require "events/input_method_events"
require "events/key_events"
require "events/mouse_events"
Expand Down
1 change: 0 additions & 1 deletion lib/rswing/components/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def add(component, options = {})
if(self.respond_to?(:getContentPane))
self.add_to_content_pane(component, options)
else
# this should be handled somehow later on:
if(layout = Options.value_for(options => :layout))
super(component, layout)
else
Expand Down
30 changes: 30 additions & 0 deletions lib/rswing/components/events/hierarchy_changed.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
###############################################################################
# This file is part of RSwing. #
# RSwing - Swing wrapper for JRuby #
# (C) 2008 Christopher Bertels (bakkdoor@flasht.de) #
# #
# RSwing is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Lesser General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# RSwing is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# You should have received a copy of the GNU Lesser General Public License #
# along with RSwing. If not, see <http://www.gnu.org/licenses/>. #
###############################################################################

module RSwing
module Components
module Events
module HierarchyChanged
HierarchyListener = java.awt.event.HierarchyListener

event_for self => :on_hierarchy_changed, HierarchyListener => :hierarchyChanged
end
end
end
end

0 comments on commit 8b0368e

Please sign in to comment.