svn commit: r17522 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java
Bob Tarling <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2009-11-22 10:46:57-0800
New Revision: 17522
Modified:
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java
Log:
Javadoc
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java?view=diff&pathrev=17522&r1=17521&r2=17522
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/XmlPropertyPanel.java 2009-11-22 10:46:57-0800
@@ -51,6 +51,9 @@
setName("UML Properties");
}
+ /**
+ * If a RowSelector is added then add a selection listener
+ */
public Component add(Component comp) {
super.add(comp);
if (comp instanceof RowSelector) {
@@ -60,6 +63,9 @@
return comp;
}
+ /**
+ * If a RowSelector is removed then its selection listener
+ */
public void remove(Component comp) {
super.add(comp);
if (comp instanceof RowSelector) {
@@ -68,10 +74,18 @@
}
}
+ /**
+ * If a row is selected in a RowSelector then clear the selection in any
+ * other Row Selector.
+ */
@Override
public void valueChanged(ListSelectionEvent e) {
final JList list = (JList) e.getSource();
+ /**
+ * Remove all the listeners first as we will get events from them
+ * while their selctions are being cleared
+ */
for (Component c : getComponents()) {
if (c instanceof RowSelector) {
RowSelector rs = (RowSelector) c;
@@ -79,6 +93,10 @@
}
}
+ /**
+ * If a row has been selected then clear the selections in all other
+ * RowSelectors.
+ */
if (list.getSelectedValues().length > 0) {
for (Component c : getComponents()) {
if (c instanceof RowSelector && ((RowSelector) c).getList() != list) {
@@ -87,6 +105,10 @@
}
}
+ /**
+ * Remove all the listeners first as we will get events from them
+ * while their selctions are being cleared
+ */
for (Component c : getComponents()) {
if (c instanceof RowSelector) {
RowSelector rs = (RowSelector) c;
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2423083
To unsubscribe from this discussion, e-mail: [[email protected]].