diff options
author | Artur Signell <artur@vaadin.com> | 2016-08-30 14:18:12 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-30 17:19:35 +0300 |
commit | a23bf9481cedb7f981a5ff95f6acc19a7c46ffd2 (patch) | |
tree | d53b3b569d50e9ccfcb60de5b07a642f7845e3c1 /compatibility-shared | |
parent | b31a71ae635d431c258d387a90bacb27d62a6bbf (diff) | |
download | vaadin-framework-a23bf9481cedb7f981a5ff95f6acc19a7c46ffd2.tar.gz vaadin-framework-a23bf9481cedb7f981a5ff95f6acc19a7c46ffd2.zip |
Move and duplicate client side and state to compatibility package
* DateField
* PopupDateField
* InlineDateField
Change-Id: I7d6c0253435dcdf424b7914d025e81af504be11d
Diffstat (limited to 'compatibility-shared')
4 files changed, 121 insertions, 0 deletions
diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/DateFieldConstants.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/DateFieldConstants.java new file mode 100644 index 0000000000..3aa399554e --- /dev/null +++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/DateFieldConstants.java @@ -0,0 +1,26 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.v7.shared.ui.datefield; + +import java.io.Serializable; + +@Deprecated +public class DateFieldConstants implements Serializable { + + @Deprecated + public static final String ATTR_WEEK_NUMBERS = "wn"; + +} diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/InlineDateFieldState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/InlineDateFieldState.java new file mode 100644 index 0000000000..ab780091df --- /dev/null +++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/InlineDateFieldState.java @@ -0,0 +1,24 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.v7.shared.ui.datefield; + +import com.vaadin.shared.ui.datefield.TextualDateFieldState; + +public class InlineDateFieldState extends TextualDateFieldState { + { + primaryStyleName = "v-inline-datefield"; + } +} diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/PopupDateFieldState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/PopupDateFieldState.java new file mode 100644 index 0000000000..7a2f10255a --- /dev/null +++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/PopupDateFieldState.java @@ -0,0 +1,30 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.v7.shared.ui.datefield; + +import com.vaadin.shared.annotations.NoLayout; + +public class PopupDateFieldState extends TextualDateFieldState { + public static final String DESCRIPTION_FOR_ASSISTIVE_DEVICES = "Arrow down key opens calendar element for choosing the date"; + + { + primaryStyleName = "v-datefield"; + } + + public boolean textFieldEnabled = true; + @NoLayout + public String descriptionForAssistiveDevices = DESCRIPTION_FOR_ASSISTIVE_DEVICES; +} diff --git a/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/TextualDateFieldState.java b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/TextualDateFieldState.java new file mode 100644 index 0000000000..f9362dc358 --- /dev/null +++ b/compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/TextualDateFieldState.java @@ -0,0 +1,41 @@ +/* + * Copyright 2000-2016 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.v7.shared.ui.datefield; + +import java.util.Date; + +import com.vaadin.shared.AbstractFieldState; +import com.vaadin.shared.annotations.NoLayout; + +public class TextualDateFieldState extends AbstractFieldState { + { + primaryStyleName = "v-datefield"; + } + + /* + * Start range that has been cleared, depending on the resolution of the + * date field + */ + @NoLayout + public Date rangeStart = null; + + /* + * End range that has been cleared, depending on the resolution of the date + * field + */ + @NoLayout + public Date rangeEnd = null; +} |