-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_helper added. also added lots of new events and reorganized the …
…container, component and window classes/modules a bit to reflect the original swing class structure a bit closer
- Loading branch information
Showing
20 changed files
with
389 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
############################################################################### | ||
# 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 Component | ||
|
||
include Events::ComponentEvents | ||
include Events::MouseEvents | ||
include Events::MouseMotionEvents | ||
include Events::MouseWheelEvents | ||
include Events::KeyEvents | ||
include Events::HierarchyBoundsEvents | ||
include Events::InputMethodEvents | ||
include Events::PropertyChanged | ||
include Events::FocusEvents | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
############################################################################### | ||
# 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 ComponentEvents | ||
ComponentListener = java.awt.event.ComponentListener | ||
|
||
event_for self => :on_component_hidden, ComponentListener => :componentHidden | ||
event_for self => :on_component_moved, ComponentListener => :componentMoved | ||
event_for self => :on_component_resized, ComponentListener => :componentResized | ||
event_for self => :on_component_shown, ComponentListener => :componentShown | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
############################################################################### | ||
# 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 ContainerEvents | ||
ContainerListener = java.awt.event.ContainerListener | ||
|
||
event_for self => :on_component_added, ContainerListener => :componentAdded | ||
event_for self => :on_component_removed, ContainerListener => :componentRemoved | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
############################################################################### | ||
# 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 HierarchyBoundsEvents | ||
HierarchyBoundsListener = java.awt.event.HierarchyBoundsListener | ||
|
||
event_for self => :on_ancestor_moved, HierarchyBoundsListener => :ancestorMoved | ||
event_for self => :on_ancestor_resized, HierarchyBoundsListener => :ancestorResized | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
############################################################################### | ||
# 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 InputMethodEvents | ||
InputMethodListener = java.awt.event.InputMethodListener | ||
|
||
event_for self => :on_input_method_text_changed, InputMethodListener => :inputMethodTextChanged | ||
event_for self => :on_caret_position_changed, InputMethodListener => :caretPositionChanged | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
############################################################################### | ||
# 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 MouseMotionEvents | ||
MouseMotionListener = java.awt.event.MouseMotionListener | ||
|
||
event_for self => :on_mouse_dragged, MouseMotionListener => :mouseDragged | ||
event_for self => :on_mouse_moved, MouseMotionListener => :mouseMoved | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 MouseWheelEvents | ||
MouseWheelListener = java.awt.event.MouseWheelListener | ||
|
||
event_for self => :on_mouse_wheel_moved, MouseWheelListener => :mouseWheelMoved | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 PropertyChanged | ||
PropertyChangeListener = java.beans.PropertyChangeListener | ||
|
||
event_for self => :on_property_changed, PropertyChangeListener => :propertyChange | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
############################################################################### | ||
# 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 WindowEvents | ||
WindowListener = java.awt.event.WindowListener | ||
|
||
event_for self => :on_window_activated, WindowListener => :windowActivated | ||
event_for self => :on_window_closed, WindowListener => :windowClosed | ||
event_for self => :on_window_closing, WindowListener => :windowClosing | ||
event_for self => :on_window_deactivated, WindowListener => :windowDeactivated | ||
event_for self => :on_window_deiconified, WindowListener => :windowDeiconified | ||
event_for self => :on_window_iconified, WindowListener => :windowIconified | ||
event_for self => :on_window_opened, WindowListener => :windowOpened | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
############################################################################### | ||
# 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 WindowFocus | ||
WindowFocusListener = java.awt.event.WindowFocusListener | ||
|
||
event_for self => :on_window_focus, WindowFocusListener => :windowGainedFocus | ||
event_for self => :on_window_focus_lost, WindowFocusListener => :windowLostFocus | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.