From a23bf9481cedb7f981a5ff95f6acc19a7c46ffd2 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 30 Aug 2016 14:18:12 +0300 Subject: Move and duplicate client side and state to compatibility package * DateField * PopupDateField * InlineDateField Change-Id: I7d6c0253435dcdf424b7914d025e81af504be11d --- .../v7/shared/ui/datefield/DateFieldConstants.java | 26 ++++++++++++++ .../shared/ui/datefield/InlineDateFieldState.java | 24 +++++++++++++ .../shared/ui/datefield/PopupDateFieldState.java | 30 ++++++++++++++++ .../shared/ui/datefield/TextualDateFieldState.java | 41 ++++++++++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/DateFieldConstants.java create mode 100644 compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/InlineDateFieldState.java create mode 100644 compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/PopupDateFieldState.java create mode 100644 compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/datefield/TextualDateFieldState.java (limited to 'compatibility-shared/src/main/java/com/vaadin/v7') 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; +} -- cgit v1.2.3