--- /dev/null
+package com.vaadin.terminal.gwt.client.ui.label;
+
+
+/**
+ * Content modes defining how the client should interpret a Label's value.
+ *
+ * @sine 7.0
+ */
+public enum ContentMode {
+ /**
+ * Content mode, where the label contains only plain text. The getValue()
+ * result is coded to XML when painting.
+ */
+ TEXT,
+
+ /**
+ * Content mode, where the label contains preformatted text.
+ */
+ PREFORMATTED,
+
+ /**
+ * Content mode, where the label contains XHTML.
+ */
+ XHTML,
+
+ /**
+ * Content mode, where the label contains well-formed or well-balanced XML.
+ * Each of the root elements must have their default namespace specified.
+ *
+ * @deprecated Use {@link #XHTML}
+ */
+ @Deprecated
+ XML,
+
+ /**
+ * Content mode, where the label contains RAW output. Output is not required
+ * to comply to with XML. In Web Adapter output is inserted inside the
+ * resulting HTML document as-is. This is useful for some specific purposes
+ * where possibly broken HTML content needs to be shown, but in most cases
+ * XHTML mode should be preferred.
+ *
+ * @deprecated Use {@link #XHTML}, {@link #TEXT} or {@link #PREFORMATTED}.
+ */
+ @Deprecated
+ RAW;
+}
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.PreElement;
import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.Paintable;
-import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
+import com.vaadin.terminal.gwt.client.communication.StateChangeEvent;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;
import com.vaadin.terminal.gwt.client.ui.Connect;
import com.vaadin.terminal.gwt.client.ui.Connect.LoadStyle;
import com.vaadin.ui.Label;
@Connect(value = Label.class, loadStyle = LoadStyle.EAGER)
-public class LabelConnector extends AbstractComponentConnector implements
- Paintable {
+public class LabelConnector extends AbstractComponentConnector {
- public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
- getWidget().setConnection(client);
- if (!isRealUpdate(uidl)) {
- return;
- }
+ public LabelState getState() {
+ return (LabelState) super.getState();
+ }
- boolean sinkOnloads = false;
+ @Override
+ protected void init() {
+ super.init();
+ getWidget().setConnection(getConnection());
+ }
- final String mode = uidl.getStringAttribute("mode");
- if (mode == null || "text".equals(mode)) {
- getWidget().setText(uidl.getChildString(0));
- } else if ("pre".equals(mode)) {
+ @Override
+ public void onStateChanged(StateChangeEvent stateChangeEvent) {
+ super.onStateChanged(stateChangeEvent);
+ boolean sinkOnloads = false;
+ switch (getState().getContentMode()) {
+ case PREFORMATTED:
PreElement preElement = Document.get().createPreElement();
- preElement.setInnerText(uidl.getChildUIDL(0).getChildString(0));
+ preElement.setInnerText(getState().getText());
// clear existing content
getWidget().setHTML("");
// add preformatted text to dom
getWidget().getElement().appendChild(preElement);
- } else if ("uidl".equals(mode)) {
- getWidget().setHTML(uidl.getChildrenAsXML());
- } else if ("xhtml".equals(mode)) {
- UIDL content = uidl.getChildUIDL(0).getChildUIDL(0);
- if (content.getChildCount() > 0) {
- getWidget().setHTML(content.getChildString(0));
- } else {
- getWidget().setHTML("");
- }
- sinkOnloads = true;
- } else if ("xml".equals(mode)) {
- getWidget().setHTML(uidl.getChildUIDL(0).getChildString(0));
- } else if ("raw".equals(mode)) {
- getWidget().setHTML(uidl.getChildUIDL(0).getChildString(0));
+ break;
+
+ case TEXT:
+ getWidget().setText(getState().getText());
+ break;
+
+ case XHTML:
+ case RAW:
sinkOnloads = true;
- } else {
+ case XML:
+ getWidget().setHTML(getState().getText());
+ break;
+ default:
getWidget().setText("");
+ break;
+
}
if (sinkOnloads) {
Util.sinkOnloadForImages(getWidget().getElement());
--- /dev/null
+package com.vaadin.terminal.gwt.client.ui.label;
+
+import com.vaadin.terminal.gwt.client.ComponentState;
+
+public class LabelState extends ComponentState {
+ private ContentMode contentMode = ContentMode.TEXT;
+ private String text = "";
+
+ public ContentMode getContentMode() {
+ return contentMode;
+ }
+
+ public void setContentMode(ContentMode contentMode) {
+ this.contentMode = contentMode;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+}
package com.vaadin.ui;
import java.lang.reflect.Method;
-import java.util.Map;
import com.vaadin.data.Property;
import com.vaadin.data.util.ObjectProperty;
-import com.vaadin.terminal.PaintException;
-import com.vaadin.terminal.PaintTarget;
-import com.vaadin.terminal.Vaadin6Component;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
+import com.vaadin.terminal.gwt.client.ui.label.LabelState;
/**
* Label component for showing non-editable short texts.
// TODO generics for interface Property
public class Label extends AbstractComponent implements Property,
Property.Viewer, Property.ValueChangeListener,
- Property.ValueChangeNotifier, Comparable<Object>, Vaadin6Component {
-
- /**
- * Content modes defining how the client should interpret a Label's value.
- *
- * @sine 7.0
- */
- public enum ContentMode {
- /**
- * Content mode, where the label contains only plain text. The
- * getValue() result is coded to XML when painting.
- */
- TEXT(null) {
- @Override
- public void paintText(String text, PaintTarget target)
- throws PaintException {
- target.addText(text);
- }
- },
-
- /**
- * Content mode, where the label contains preformatted text.
- */
- PREFORMATTED("pre") {
- @Override
- public void paintText(String text, PaintTarget target)
- throws PaintException {
- target.startTag("pre");
- target.addText(text);
- target.endTag("pre");
- }
- },
-
- /**
- * Content mode, where the label contains XHTML. Contents is then
- * enclosed in DIV elements having namespace of
- * "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd".
- */
- XHTML("xhtml") {
- @Override
- public void paintText(String text, PaintTarget target)
- throws PaintException {
- target.startTag("data");
- target.addXMLSection("div", text,
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd");
- target.endTag("data");
- }
- },
-
- /**
- * Content mode, where the label contains well-formed or well-balanced
- * XML. Each of the root elements must have their default namespace
- * specified.
- */
- XML("xml") {
- @Override
- public void paintText(String text, PaintTarget target)
- throws PaintException {
- target.addXMLSection("data", text, null);
- }
- },
-
- /**
- * Content mode, where the label contains RAW output. Output is not
- * required to comply to with XML. In Web Adapter output is inserted
- * inside the resulting HTML document as-is. This is useful for some
- * specific purposes where possibly broken HTML content needs to be
- * shown, but in most cases XHTML mode should be preferred.
- */
- RAW("raw") {
- @Override
- public void paintText(String text, PaintTarget target)
- throws PaintException {
- target.startTag("data");
- target.addAttribute("escape", false);
- target.addText(text);
- target.endTag("data");
- }
- };
-
- private final String uidlName;
-
- /**
- * The default content mode is text
- */
- public static ContentMode DEFAULT = TEXT;
-
- private ContentMode(String uidlName) {
- this.uidlName = uidlName;
- }
-
- /**
- * Gets the name representing this content mode in UIDL messages
- *
- * @return the UIDL name of this content mode
- */
- public String getUidlName() {
- return uidlName;
- }
-
- /**
- * Adds the text value to a {@link PaintTarget} according to this
- * content mode
- *
- * @param text
- * the text to add
- * @param target
- * the paint target to add the value to
- * @throws PaintException
- * if the paint operation failed
- */
- public abstract void paintText(String text, PaintTarget target)
- throws PaintException;
- }
+ Property.ValueChangeNotifier, Comparable<Object> {
/**
* @deprecated From 7.0, use {@link ContentMode#TEXT} instead
public static final ContentMode CONTENT_RAW = ContentMode.RAW;
/**
- * @deprecated From 7.0, use {@link ContentMode#DEFAULT} instead
+ * @deprecated From 7.0, use {@link ContentMode#TEXT} instead
*/
@Deprecated
- public static final ContentMode CONTENT_DEFAULT = ContentMode.DEFAULT;
+ public static final ContentMode CONTENT_DEFAULT = ContentMode.TEXT;
private static final String DATASOURCE_MUST_BE_SET = "Datasource must be set";
private Property dataSource;
- private ContentMode contentMode = ContentMode.DEFAULT;
-
/**
* Creates an empty Label.
*/
* @param content
*/
public Label(String content) {
- this(content, ContentMode.DEFAULT);
+ this(content, ContentMode.TEXT);
}
/**
* @param contentSource
*/
public Label(Property contentSource) {
- this(contentSource, ContentMode.DEFAULT);
+ this(contentSource, ContentMode.TEXT);
}
/**
*/
public Label(Property contentSource, ContentMode contentMode) {
setPropertyDataSource(contentSource);
- if (contentMode != ContentMode.DEFAULT) {
- setContentMode(contentMode);
- }
+ setContentMode(contentMode);
setWidth(100, UNITS_PERCENTAGE);
}
- /**
- * Paints the content of this component.
- *
- * @param target
- * the Paint Event.
- * @throws PaintException
- * if the Paint Operation fails.
- */
- public void paintContent(PaintTarget target) throws PaintException {
- String uidlName = contentMode.getUidlName();
- if (uidlName != null) {
- target.addAttribute("mode", uidlName);
- }
- contentMode.paintText(getStringValue(), target);
+ @Override
+ public void updateState() {
+ super.updateState();
+ // We don't know when the text is updated so update it here before
+ // sending the state to the client
+ getState().setText(getStringValue());
+ }
+ @Override
+ public LabelState getState() {
+ return (LabelState) super.getState();
}
/**
* @see ContentMode
*/
public ContentMode getContentMode() {
- return contentMode;
+ return getState().getContentMode();
}
/**
if (contentMode == null) {
throw new IllegalArgumentException("Content mode can not be null");
}
- if (contentMode != this.contentMode) {
- this.contentMode = contentMode;
- requestRepaint();
- }
+
+ getState().setContentMode(contentMode);
+ requestRepaint();
}
/* Value change events */
String thisValue;
String otherValue;
- if (contentMode == ContentMode.XML || contentMode == ContentMode.XHTML) {
+ if (getContentMode() == ContentMode.XML
+ || getContentMode() == ContentMode.XHTML) {
thisValue = stripTags(getStringValue());
} else {
thisValue = getStringValue();
return res.toString();
}
- public void changeVariables(Object source, Map<String, Object> variables) {
- // TODO Remove once Vaadin6Component is no longer implemented
- }
-
}
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.Sizeable;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.AbstractComponentTest;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Component;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Tree;
import com.vaadin.ui.Tree.ItemStyleGenerator;
package com.vaadin.tests;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Component.Event;
import com.vaadin.ui.CustomLayout;
import com.vaadin.ui.Field;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.PasswordField;
import com.vaadin.ui.Root.LegacyWindow;
package com.vaadin.tests;
import com.vaadin.terminal.ClassResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Component;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Root.LegacyWindow;
import java.net.URL;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Window;
import java.util.Map;
import com.vaadin.terminal.UserError;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.DateField;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
import com.vaadin.ui.TextField;
import java.util.Date;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractOrderedLayout;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.VerticalLayout;
public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent {
import java.util.Date;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.terminal.ErrorMessage;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.UserError;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
import com.vaadin.ui.NativeSelect;
import java.net.URL;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Window;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.RichTextArea;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.Application;
import com.vaadin.terminal.StreamResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
import com.vaadin.ui.Panel;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.terminal.StreamResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
import com.vaadin.ui.Panel;
package com.vaadin.tests;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.VerticalLayout;
public class TestIFrames extends CustomComponent {
import java.io.File;
import com.vaadin.data.Item;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.util.SampleDirectory;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Tree;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Select;
package com.vaadin.tests.application;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.terminal.gwt.server.WebApplicationContext;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
public class ApplicationCloseTest extends TestBase {
import com.vaadin.Application;
import com.vaadin.service.ApplicationContext;
import com.vaadin.terminal.WrappedRequest;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.terminal.gwt.server.AbstractWebApplicationContext;
import com.vaadin.terminal.gwt.server.WebBrowser;
import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root;
import com.vaadin.ui.VerticalLayout;
package com.vaadin.tests.components;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
package com.vaadin.tests.components.button;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
public class ButtonMouseDetails extends TestBase {
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.terminal.ThemeResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.VaadinClasses;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.Log;
import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.VerticalLayout;
public class IconsInCaption extends TestBase {
import com.vaadin.event.FieldEvents;
import com.vaadin.event.FieldEvents.BlurEvent;
import com.vaadin.event.FieldEvents.FocusEvent;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.TextField;
public class ComboFocusBlurEvents extends TestBase {
package com.vaadin.tests.components.customcomponent;
import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.TextField;
public class ClipContent extends TestBase {
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.Log;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.DateField;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.PopupDateField;
@SuppressWarnings("serial")
import com.vaadin.data.Property;
import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.DateField;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.PopupDateField;
public class ValueThroughProperty extends TestBase {
package com.vaadin.tests.components.label;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.ComponentTestCase;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
public class LabelModes extends ComponentTestCase<Label> {
import java.util.List;
import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.AbstractComponentTest;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
public class LabelTest extends AbstractComponentTest<Label> implements
ValueChangeListener {
package com.vaadin.tests.components.label;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.ComponentTestCase;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
public class Labels extends ComponentTestCase<Label> {
package com.vaadin.tests.components.label;
import com.vaadin.terminal.WrappedRequest;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.AbstractTestRoot;
import com.vaadin.ui.AbstractLayout;
import com.vaadin.ui.Accordion;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.OptionGroup;
public class OptionGroupMultipleValueChange extends TestBase {
package com.vaadin.tests.components.panel;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Component;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
import java.util.ArrayList;
import java.util.List;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.PopupView;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.WrappedRequest;
import com.vaadin.terminal.WrappedRequest.BrowserDetails;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.AbstractTestApplication;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Link;
import com.vaadin.ui.Root;
import com.vaadin.data.Container;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.TestUtils;
import com.vaadin.ui.Button;
import com.vaadin.ui.DefaultFieldFactory;
import com.vaadin.ui.Field;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Table;
public class EditableTableLeak extends TestBase {
import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.terminal.ThemeResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Component;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Table;
public class LabelEmbeddedClickThroughForTable extends TestBase {
import java.util.Collection;
-import com.vaadin.Application;
import com.vaadin.data.Property;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
-import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
public class LongMultiselect extends TestBase {
import com.vaadin.event.Action.Handler;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.terminal.Resource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.select.AbstractSelectTestCase;
import com.vaadin.ui.AbstractSelect.MultiSelectMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.Align;
import com.vaadin.ui.Table.CellStyleGenerator;
package com.vaadin.tests.components.tabsheet;
-import com.vaadin.Application;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
public class WrapTabSheetInTabSheet extends TestBase {
@Override
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.tests.util.Log;
import com.vaadin.tests.util.LoremIpsum;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.BrowserWindowResizeEvent;
import com.vaadin.ui.Root.BrowserWindowResizeListener;
import com.vaadin.ui.Root.LegacyWindow;
package com.vaadin.tests.components.window;
import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.Window;
import com.vaadin.ui.Button;
-import com.vaadin.ui.Table;
import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.Window;
public class SubWindowWithUndefinedHeight extends TestBase {
import com.vaadin.Application;
import com.vaadin.terminal.ExternalResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.terminal.gwt.server.PortletApplicationContext2;
import com.vaadin.terminal.gwt.server.PortletApplicationContext2.PortletListener;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Link;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Root;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.ThemeResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.AbstractSelect;
import com.vaadin.ui.Accordion;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.InlineDateField;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.MenuBar;
package com.vaadin.tests.layouts;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.VerticalLayout;
public class HiddenHorizontalLayout extends TestBase {
package com.vaadin.tests.layouts;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Button;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.TextField;
import com.vaadin.terminal.SystemError;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.terminal.UserError;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.DateField;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
import com.vaadin.ui.Select;
import com.vaadin.terminal.SystemError;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.terminal.UserError;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.DateField;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Link;
import com.vaadin.ui.NativeSelect;
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.tests.TestForTablesInitialColumnWidthLogicRendering;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.Table;
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.TextField;
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.data.Validator;
import com.vaadin.data.util.MethodProperty;
import com.vaadin.terminal.SystemError;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Select;
import com.vaadin.ui.Window;
import com.vaadin.data.Validator;
import com.vaadin.data.validator.StringLengthValidator;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Window;
import java.util.Iterator;
import java.util.LinkedList;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractField;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Select;
import com.vaadin.ui.Window;
import java.util.Iterator;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
public class Ticket1970 extends Application.LegacyApplication {
import com.vaadin.event.ItemClickEvent;
import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.terminal.ExternalResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Table;
import com.vaadin.ui.Tree;
import com.vaadin.Application;
import com.vaadin.terminal.ExternalResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
public class Ticket2117 extends Application.LegacyApplication {
import com.vaadin.data.Property;
import com.vaadin.data.util.ObjectProperty;
import com.vaadin.terminal.ExternalResource;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Layout;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Select;
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.AbstractOrderedLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.TextField;
import java.net.URL;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
public class Ticket2287 extends Ticket2292 {
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.themes.Reindeer;
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
public class Ticket2426 extends Application.LegacyApplication {
final String content = "<select/>";
w.addComponent(new Label("CONTENT_DEFAULT: " + content,
- ContentMode.DEFAULT));
+ ContentMode.TEXT));
w.addComponent(new Label("CONTENT_PREFORMATTED: " + content,
ContentMode.PREFORMATTED));
w.addComponent(new Label("CONTENT_RAW: " + content, ContentMode.RAW));
package com.vaadin.tests.tickets;
import com.vaadin.Application;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Root.LegacyWindow;
public class Ticket5952 extends Application.LegacyApplication {
import com.vaadin.data.Item;
import com.vaadin.data.Property;
import com.vaadin.data.util.BeanItem;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.Table;
import java.util.ArrayList;
import java.util.List;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.VerticalLayout;
public class Log extends VerticalLayout {
import com.vaadin.Application;
import com.vaadin.terminal.SystemError;
+import com.vaadin.terminal.gwt.client.ui.label.ContentMode;
import com.vaadin.ui.Label;
-import com.vaadin.ui.Label.ContentMode;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Root;