From: Artur Signell Date: Fri, 29 Jun 2012 09:08:48 +0000 (+0300) Subject: CRLF -> LF X-Git-Tag: 7.0.0.alpha3~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=183d43796a8c1c475e0d68ba7fce2687fbba703f;p=vaadin-framework.git CRLF -> LF --- diff --git a/tests/testbench/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java b/tests/testbench/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java index 21cf9e45a6..b458c12188 100644 --- a/tests/testbench/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java +++ b/tests/testbench/com/vaadin/tests/components/AddRemoveSetStyleNamesTest.java @@ -1,81 +1,81 @@ -package com.vaadin.tests.components; - -import com.vaadin.ui.Button; -import com.vaadin.ui.Button.ClickEvent; -import com.vaadin.ui.PopupDateField; - -public class AddRemoveSetStyleNamesTest extends TestBase { - - private String style1 = "style1"; - private String style2 = "style2"; - private String thestyle = "thestyle"; - - private PopupDateField popupDateField; - private Button button1; - private Button button2; - private Button button3; - - private Button.ClickListener listener; - - @Override - protected void setup() { - popupDateField = new PopupDateField("PopupDateField"); - popupDateField.setRequired(true); - popupDateField.setRequiredError("abcd"); - addComponent(popupDateField); - - listener = new Button.ClickListener() { - - public void buttonClick(ClickEvent event) { - String style = (String) event.getButton().getData(); - setComponentsStyle(style, !popupDateField.getStyleName() - .contains(style), event.getButton()); - } - }; - - button1 = new Button("Add style1", listener); - button1.setData(style1); - addComponent(button1); - - button2 = new Button("Add style2", listener); - button2.setData(style2); - addComponent(button2); - - button3 = new Button("Set thestyle", new Button.ClickListener() { - - public void buttonClick(ClickEvent event) { - if (popupDateField.getStyleName().contains(thestyle)) { - popupDateField.removeStyleName(thestyle); - button3.setCaption("Set thestyle"); - } else { - popupDateField.setStyleName(thestyle); - button1.setCaption("Add style1"); - button2.setCaption("Add style2"); - button3.setCaption("Remove thestyle"); - } - } - }); - addComponent(button3); - } - - private void setComponentsStyle(String style, boolean add, Button button) { - if (add) { - popupDateField.addStyleName(style); - button.setCaption("Remove " + style); - } else { - popupDateField.removeStyleName(style); - button.setCaption("Add " + style); - } - } - - @Override - protected String getDescription() { - return "If a widget has set multiple css class names, AbtractComponentConnector.getStyleNames() removes all but first one of them. This is not acceptable, because we should be able to create connector for any existing GWT component and thus we do not know it it depends on multiple css class names."; - } - - @Override - protected Integer getTicketNumber() { - return 8664; - } - +package com.vaadin.tests.components; + +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.PopupDateField; + +public class AddRemoveSetStyleNamesTest extends TestBase { + + private String style1 = "style1"; + private String style2 = "style2"; + private String thestyle = "thestyle"; + + private PopupDateField popupDateField; + private Button button1; + private Button button2; + private Button button3; + + private Button.ClickListener listener; + + @Override + protected void setup() { + popupDateField = new PopupDateField("PopupDateField"); + popupDateField.setRequired(true); + popupDateField.setRequiredError("abcd"); + addComponent(popupDateField); + + listener = new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + String style = (String) event.getButton().getData(); + setComponentsStyle(style, !popupDateField.getStyleName() + .contains(style), event.getButton()); + } + }; + + button1 = new Button("Add style1", listener); + button1.setData(style1); + addComponent(button1); + + button2 = new Button("Add style2", listener); + button2.setData(style2); + addComponent(button2); + + button3 = new Button("Set thestyle", new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + if (popupDateField.getStyleName().contains(thestyle)) { + popupDateField.removeStyleName(thestyle); + button3.setCaption("Set thestyle"); + } else { + popupDateField.setStyleName(thestyle); + button1.setCaption("Add style1"); + button2.setCaption("Add style2"); + button3.setCaption("Remove thestyle"); + } + } + }); + addComponent(button3); + } + + private void setComponentsStyle(String style, boolean add, Button button) { + if (add) { + popupDateField.addStyleName(style); + button.setCaption("Remove " + style); + } else { + popupDateField.removeStyleName(style); + button.setCaption("Add " + style); + } + } + + @Override + protected String getDescription() { + return "If a widget has set multiple css class names, AbtractComponentConnector.getStyleNames() removes all but first one of them. This is not acceptable, because we should be able to create connector for any existing GWT component and thus we do not know it it depends on multiple css class names."; + } + + @Override + protected Integer getTicketNumber() { + return 8664; + } + } \ No newline at end of file