Author: bobtarling
Date: 2011-03-14 19:39:31-0700
New Revision: 19115
Modified:
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Log:
Use the handy local variable instead of calling the same class method repeatedly.
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java?view=diff&pathrev=19115&r1=19114&r2=19115
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java 2011-03-14 19:39:31-0700
@@ -215,19 +215,19 @@
final String propertyName = prop.getPropertyName();
final Class<?> type = prop.getType();
- if ("initialValue".equals(prop.getPropertyName())) {
+ if ("initialValue".equals(propertyName)) {
UMLExpressionModel model =
new UMLInitialValueExpressionModel(target);
- p = new UMLExpressionPanel(model, prop.getPropertyName());
+ p = new UMLExpressionPanel(model, propertyName);
control = p;
- } else if ("defaultValue".equals(prop.getPropertyName())) {
+ } else if ("defaultValue".equals(propertyName)) {
UMLExpressionModel model =
new UMLDefaultValueExpressionModel(target);
- p = new UMLExpressionPanel(model, prop.getPropertyName());
+ p = new UMLExpressionPanel(model, propertyName);
control = p;
- } else if ("specification".equals(prop.getPropertyName())) {
+ } else if ("specification".equals(propertyName)) {
UMLPlainTextDocument document =
- new UMLOperationSpecificationDocument(prop.getPropertyName(), target);
+ new UMLOperationSpecificationDocument(propertyName, target);
UMLTextArea osta = new UMLTextArea(document);
osta.setRows(3);
control = new JScrollPane(osta);
@@ -237,34 +237,34 @@
text.setLineWrap(true);
text.setRows(5);
control = new JScrollPane(text);
- } else if ("condition".equals(prop.getPropertyName())) {
+ } else if ("condition".equals(propertyName)) {
UMLExpressionModel conditionModel =
new UMLConditionExpressionModel(target);
JTextArea conditionArea =
new UMLExpressionBodyField(conditionModel, true);
conditionArea.setRows(5);
control = new JScrollPane(conditionArea);
- } else if ("script".equals(prop.getPropertyName())) {
+ } else if ("script".equals(propertyName)) {
UMLExpressionModel scriptModel =
new UMLScriptExpressionModel(target);
p = new UMLExpressionPanel(scriptModel, prop.getPropertyName());
control = p;
- } else if ("recurrence".equals(prop.getPropertyName())) {
+ } else if ("recurrence".equals(propertyName)) {
UMLExpressionModel recurrenceModel =
new UMLRecurrenceExpressionModel(target);
- p = new UMLExpressionPanel(recurrenceModel, prop.getPropertyName());
+ p = new UMLExpressionPanel(recurrenceModel, propertyName);
control = p;
- } else if ("expression".equals(prop.getPropertyName())) {
+ } else if ("expression".equals(propertyName)) {
UMLExpressionModel model = new UMLExpressionExpressionModel(target);
- p = new UMLExpressionPanel(model, prop.getPropertyName());
+ p = new UMLExpressionPanel(model, propertyName);
control = p;
- } else if ("changeExpression".equals(prop.getPropertyName())) {
+ } else if ("changeExpression".equals(propertyName)) {
UMLExpressionModel model = new UMLChangeExpressionModel(target);
- p = new UMLExpressionPanel(model, prop.getPropertyName());
+ p = new UMLExpressionPanel(model, propertyName);
control = p;
- } else if ("when".equals(prop.getPropertyName())) {
+ } else if ("when".equals(propertyName)) {
UMLExpressionModel model = new UMLTimeExpressionModel(target);
- p = new UMLExpressionPanel(model, prop.getPropertyName());
+ p = new UMLExpressionPanel(model, propertyName);
control = p;
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2711524
To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.