svn commit: r16996 - trunk/src/argouml-app/src/org/argouml/uml/ui
Tom Morris <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2009-03-29 12:36:12-0700
New Revision: 16996
Modified:
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBox2.java
trunk/src/argouml-app/src/org/argouml/uml/ui/UMLListCellRenderer2.java
Log:
Clean up style and comments
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBox2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBox2.java?view=diff&pathrev=16996&r1=16995&r2=16996
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBox2.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/UMLComboBox2.java 2009-03-29 12:36:12-0700
@@ -39,12 +39,7 @@
/**
- * ComboBox for UML modelelements. <p>
- *
- * This implementation does not use
- * reflection and seperates Model, View and Controller better then does
- * UMLComboBox. The ancient UMLComboBoxModel and UMLComboBox are
- * replaced with this implementation to improve performance.
+ * ComboBox for selecting UML Elements.
*/
public class UMLComboBox2
extends JComboBox
@@ -70,10 +65,11 @@
}
/**
- * Constructor for UMLComboBox2. Via the given action, the
- * action for this combobox is done.
- * @param model the ComboBoxModel
- * @param action the action
+ * Construct a UMLComboBox2.
+ *
+ * @param model a UMLComboBoxModel2 which provides UML elements for the user
+ * to choose from
+ * @param action action to invoke when an item is selected
* @param showIcon true if an icon should be shown in front of the items
*/
public UMLComboBox2(UMLComboBoxModel2 model, Action action,
@@ -89,7 +85,7 @@
}
/**
- * The constructor.
+ * Construct a UML Element ComboxBox which shows icons in front of each item
*
* @param arg0 the ComboBoxModel
* @param action the action
@@ -101,6 +97,7 @@
/*
* @see java.awt.event.ActionListener#actionPerformed(ActionEvent)
*/
+ @Override
public void actionPerformed(ActionEvent arg0) {
int i = getSelectedIndex();
if (i >= 0) {
@@ -169,7 +166,7 @@
*
* @param event the event
*/
- protected void doIt(ActionEvent event) { }
+ protected void doIt(@SuppressWarnings("unused") ActionEvent event) { }
/**
* Utility method to get the current target.
Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/UMLListCellRenderer2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/UMLListCellRenderer2.java?view=diff&pathrev=16996&r1=16995&r2=16996
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/UMLListCellRenderer2.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/UMLListCellRenderer2.java 2009-03-29 12:36:12-0700
@@ -97,6 +97,7 @@
* @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList,
* java.lang.Object, int, boolean, boolean)
*/
+ @Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
// Leave logging commented out by default for efficiency
@@ -154,8 +155,6 @@
*
* @param value the given modelelement
* @return String the text to be shown
- *
- * TODO: I18N needed
*/
public String makeText(Object value) {
if (value instanceof String) {
@@ -166,7 +165,9 @@
Object type = Model.getFacade().getType(value);
name = getName(value);
String typeName = null;
- if (type != null) typeName = Model.getFacade().getName(type);
+ if (type != null) {
+ typeName = Model.getFacade().getName(type);
+ }
if (typeName != null || "".equals(typeName)) {
name = Translator.localize(
"misc.name.withType",
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1473442
To unsubscribe from this discussion, e-mail: [[email protected]].