forked from mozilla/rhino
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add treetable sources needed by the Rhino debugger. Add LICENSE.txt to
show the license terms, and propagate that file to the binary distribution. Remove the debugger download build rules as they are no longer needed.
- Loading branch information
1 parent
1df4000
commit 2e746cd
Showing
8 changed files
with
779 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
The majority of Rhino is available under the following license: | ||
|
||
* ***** BEGIN LICENSE BLOCK ***** | ||
* Version: MPL 1.1/GPL 2.0 | ||
* | ||
* The contents of this file are subject to the Mozilla Public License Version | ||
* 1.1 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* http://www.mozilla.org/MPL/ | ||
* | ||
* Software distributed under the License is distributed on an "AS IS" basis, | ||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||
* for the specific language governing rights and limitations under the | ||
* License. | ||
* | ||
* The Original Code is Rhino code, released | ||
* May 6, 1999. | ||
* | ||
* The Initial Developer of the Original Code is | ||
* Netscape Communications Corporation. | ||
* Portions created by the Initial Developer are Copyright (C) 1997-2000 | ||
* the Initial Developer. All Rights Reserved. | ||
* | ||
* Contributor(s): | ||
* | ||
* Alternatively, the contents of this file may be used under the terms of | ||
* the GNU General Public License Version 2 or later (the "GPL"), in which | ||
* case the provisions of the GPL are applicable instead of those above. If | ||
* you wish to allow use of your version of this file only under the terms of | ||
* the GPL and not to allow others to use your version of this file under the | ||
* MPL, indicate your decision by deleting the provisions above and replacing | ||
* them with the notice and other provisions required by the GPL. If you do | ||
* not delete the provisions above, a recipient may use your version of this | ||
* file under either the MPL or the GPL. | ||
* | ||
* ***** END LICENSE BLOCK ***** */ | ||
|
||
Additionally, some files (currently the contents of | ||
toolsrc/org/mozilla/javascript/tools/debugger/treetable/) are available | ||
under the following license: | ||
|
||
* Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* - Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* | ||
* - Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* - Neither the name of Sun Microsystems nor the names of its | ||
* contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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
89 changes: 89 additions & 0 deletions
89
toolsrc/org/mozilla/javascript/tools/debugger/treetable/AbstractCellEditor.java
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,89 @@ | ||
/* | ||
* Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* - Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* | ||
* - Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* - Neither the name of Sun Microsystems nor the names of its | ||
* contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
package org.mozilla.javascript.tools.debugger.treetable; | ||
|
||
import javax.swing.*; | ||
import javax.swing.event.*; | ||
import java.util.EventObject; | ||
|
||
public class AbstractCellEditor implements CellEditor { | ||
|
||
protected EventListenerList listenerList = new EventListenerList(); | ||
|
||
public Object getCellEditorValue() { return null; } | ||
public boolean isCellEditable(EventObject e) { return true; } | ||
public boolean shouldSelectCell(EventObject anEvent) { return false; } | ||
public boolean stopCellEditing() { return true; } | ||
public void cancelCellEditing() {} | ||
|
||
public void addCellEditorListener(CellEditorListener l) { | ||
listenerList.add(CellEditorListener.class, l); | ||
} | ||
|
||
public void removeCellEditorListener(CellEditorListener l) { | ||
listenerList.remove(CellEditorListener.class, l); | ||
} | ||
|
||
/* | ||
* Notify all listeners that have registered interest for | ||
* notification on this event type. | ||
* @see EventListenerList | ||
*/ | ||
protected void fireEditingStopped() { | ||
// Guaranteed to return a non-null array | ||
Object[] listeners = listenerList.getListenerList(); | ||
// Process the listeners last to first, notifying | ||
// those that are interested in this event | ||
for (int i = listeners.length-2; i>=0; i-=2) { | ||
if (listeners[i]==CellEditorListener.class) { | ||
((CellEditorListener)listeners[i+1]).editingStopped(new ChangeEvent(this)); | ||
} | ||
} | ||
} | ||
|
||
/* | ||
* Notify all listeners that have registered interest for | ||
* notification on this event type. | ||
* @see EventListenerList | ||
*/ | ||
protected void fireEditingCanceled() { | ||
// Guaranteed to return a non-null array | ||
Object[] listeners = listenerList.getListenerList(); | ||
// Process the listeners last to first, notifying | ||
// those that are interested in this event | ||
for (int i = listeners.length-2; i>=0; i-=2) { | ||
if (listeners[i]==CellEditorListener.class) { | ||
((CellEditorListener)listeners[i+1]).editingCanceled(new ChangeEvent(this)); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.