svn commit: r17462 - trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionNewModelElement.java
Bob Tarling <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2009-11-09 01:53:21-0800
New Revision: 17462
Modified:
trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionNewModelElement.java
Log:
New constructor taking an Icon
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionNewModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionNewModelElement.java?view=diff&pathrev=17462&r1=17461&r2=17462
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionNewModelElement.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/AbstractActionNewModelElement.java 2009-11-09 01:53:21-0800
@@ -26,6 +26,7 @@
package org.argouml.uml.ui;
import javax.swing.Action;
+import javax.swing.Icon;
import org.argouml.application.helpers.ResourceLoaderWrapper;
import org.argouml.i18n.Translator;
@@ -65,6 +66,20 @@
Translator.localize(name));
}
+ /**
+ * The constructor. This is provided for module developers to extend
+ * this action for their own purposes with their own icon.
+ *
+ * @param name the to be localized name of the action
+ * @param the icon to represent this action visiually
+ */
+ protected AbstractActionNewModelElement(String name, Icon icon) {
+ super(Translator.localize(name), icon);
+ // Set the tooltip string:
+ putValue(Action.SHORT_DESCRIPTION,
+ Translator.localize(name));
+ }
+
/**
* Returns the target.
* @return ModelElement
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2415720
To unsubscribe from this discussion, e-mail: [[email protected]].