Author: ruschein
Date: 2011-07-19 10:07:30 -0700 (Tue, 19 Jul 2011)
New Revision: 26209
Modified:
core3/swing-util-api/trunk/src/main/java/org/cytoscape/util/swing/CyAbstractEdit.java
Log:
Added missing invocation of the parent class' constructor.
Modified:
core3/swing-util-api/trunk/src/main/java/org/cytoscape/util/swing/CyAbstractEdit.java
===================================================================
---
core3/swing-util-api/trunk/src/main/java/org/cytoscape/util/swing/CyAbstractEdit.java
2011-07-19 11:56:28 UTC (rev 26208)
+++
core3/swing-util-api/trunk/src/main/java/org/cytoscape/util/swing/CyAbstractEdit.java
2011-07-19 17:07:30 UTC (rev 26209)
@@ -1,16 +1,8 @@
-
/*
File: CyAbstractEdit.java
- Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2006, 2011, The Cytoscape Consortium (www.cytoscape.org)
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
This library 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 2.1 of the License, or
@@ -35,41 +27,42 @@
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-
package org.cytoscape.util.swing;
+
import javax.swing.undo.AbstractUndoableEdit;
-/**
+
+/**
* A small convenience class that can be used to create new edits. All
* you should have to do is implement the undo() and redo() methods. The
* benefit is that you don't need to worry about setting up names.
*/
public abstract class CyAbstractEdit extends AbstractUndoableEdit {
+ protected String desc;
- protected String desc;
+ public CyAbstractEdit(String desc) {
+ super();
+ this.desc = desc;
+ }
- public CyAbstractEdit(String desc) {
- this.desc = desc;
- }
+ public String getPresentationName() {
+ return desc;
+ }
- public String getPresentationName() {
- return desc;
- }
+ public String getRedoPresentationName() {
+ return "Redo: " + desc;
+ }
- public String getRedoPresentationName() {
- return "Redo: " + desc;
- }
+ public String getUndoPresentationName() {
+ return "Undo: " + desc;
+ }
- public String getUndoPresentationName() {
- return "Undo: " + desc;
- }
+ public void undo() {
+ super.undo();
+ }
- public void undo() {
- super.undo();
- }
-
- public void redo() {
- super.redo();
- }
+ public void redo() {
+ super.redo();
+ }
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.