summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-22 20:14:30 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-22 20:14:30 +0300
commit38358ae25543433f8cc381101bc340adc7e5c67f (patch)
treee494d807e1031c04a3d07a0c56dd60be9ae6578a /server/src/com/vaadin/ui
parent02878bd07a38dc69fe415c7f60238817d2a7c434 (diff)
downloadvaadin-framework-38358ae25543433f8cc381101bc340adc7e5c67f.tar.gz
vaadin-framework-38358ae25543433f8cc381101bc340adc7e5c67f.zip
Support using public fields in state classes (#9324)
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r--server/src/com/vaadin/ui/Label.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java
index 668b99a74c..10fa741058 100644
--- a/server/src/com/vaadin/ui/Label.java
+++ b/server/src/com/vaadin/ui/Label.java
@@ -168,7 +168,7 @@ public class Label extends AbstractComponent implements Property<String>,
public String getValue() {
if (getPropertyDataSource() == null) {
// Use internal value if we are running without a data source
- return getState().getText();
+ return getState().text;
}
return ConverterUtil.convertFromModel(getPropertyDataSource()
.getValue(), String.class, getConverter(), getLocale());
@@ -189,7 +189,7 @@ public class Label extends AbstractComponent implements Property<String>,
+ String.class.getName());
}
if (getPropertyDataSource() == null) {
- getState().setText((String) newStringValue);
+ getState().text = (String) newStringValue;
requestRepaint();
} else {
throw new IllegalStateException(
@@ -277,7 +277,7 @@ public class Label extends AbstractComponent implements Property<String>,
* @see ContentMode
*/
public ContentMode getContentMode() {
- return getState().getContentMode();
+ return getState().contentMode;
}
/**
@@ -293,7 +293,7 @@ public class Label extends AbstractComponent implements Property<String>,
throw new IllegalArgumentException("Content mode can not be null");
}
- getState().setContentMode(contentMode);
+ getState().contentMode = contentMode;
requestRepaint();
}
@@ -384,7 +384,7 @@ public class Label extends AbstractComponent implements Property<String>,
@Override
public void valueChange(Property.ValueChangeEvent event) {
// Update the internal value from the data source
- getState().setText(getValue());
+ getState().text = getValue();
requestRepaint();
fireValueChange();