diff options
author | Artur Signell <artur@vaadin.com> | 2016-08-22 13:24:19 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-22 13:06:44 +0000 |
commit | a6873053f005c195c5e43211761c5f936be14a4e (patch) | |
tree | 2e29f966b48d592402f0e20b5a87330a201bb841 /client | |
parent | c6b44ac8adc9b2ffd6290c98643a633f405dd6c6 (diff) | |
download | vaadin-framework-a6873053f005c195c5e43211761c5f936be14a4e.tar.gz vaadin-framework-a6873053f005c195c5e43211761c5f936be14a4e.zip |
Move ProgressBar/ProgressIndicator to compatibility package
Change-Id: I9d8ef17fc4bd903ad6c4e258b800b72029e507fd
Diffstat (limited to 'client')
2 files changed, 0 insertions, 131 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java b/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java deleted file mode 100644 index 6cd7e6105e..0000000000 --- a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.client.ui.progressindicator; - -import com.vaadin.client.communication.StateChangeEvent; -import com.vaadin.client.ui.AbstractFieldConnector; -import com.vaadin.client.ui.VProgressBar; -import com.vaadin.shared.ui.Connect; -import com.vaadin.shared.ui.progressindicator.ProgressBarState; -import com.vaadin.ui.ProgressBar; - -/** - * Connector for {@link VProgressBar}. - * - * @since 7.1 - * @author Vaadin Ltd - */ -@Connect(ProgressBar.class) -public class ProgressBarConnector extends AbstractFieldConnector { - - public ProgressBarConnector() { - super(); - } - - @Override - public void onStateChanged(StateChangeEvent stateChangeEvent) { - super.onStateChanged(stateChangeEvent); - getWidget().setIndeterminate(getState().indeterminate); - getWidget().setState(getState().state); - } - - @Override - public ProgressBarState getState() { - return (ProgressBarState) super.getState(); - } - - @Override - public VProgressBar getWidget() { - return (VProgressBar) super.getWidget(); - } - -} diff --git a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java b/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java deleted file mode 100644 index 8e5626fb6e..0000000000 --- a/client/src/main/java/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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.client.ui.progressindicator; - -import com.google.gwt.user.client.Timer; -import com.vaadin.client.communication.StateChangeEvent; -import com.vaadin.client.ui.VProgressBar; -import com.vaadin.client.ui.VProgressIndicator; -import com.vaadin.shared.ui.Connect; -import com.vaadin.shared.ui.progressindicator.ProgressIndicatorServerRpc; -import com.vaadin.shared.ui.progressindicator.ProgressIndicatorState; -import com.vaadin.ui.ProgressIndicator; - -/** - * Connector for {@link VProgressBar} with polling support. - * - * @since 7.0 - * @author Vaadin Ltd - * @deprecated as of 7.1, use {@link ProgressBarConnector} combined with server - * push or UI polling. - */ -@Connect(ProgressIndicator.class) -@Deprecated -public class ProgressIndicatorConnector extends ProgressBarConnector { - - @Override - public ProgressIndicatorState getState() { - return (ProgressIndicatorState) super.getState(); - } - - private Timer poller = new Timer() { - - @Override - public void run() { - getRpcProxy(ProgressIndicatorServerRpc.class).poll(); - } - - }; - - @Override - public void onStateChanged(StateChangeEvent stateChangeEvent) { - super.onStateChanged(stateChangeEvent); - - if (isEnabled()) { - poller.scheduleRepeating(getState().pollingInterval); - } else { - poller.cancel(); - } - } - - @Override - public VProgressIndicator getWidget() { - return (VProgressIndicator) super.getWidget(); - } - - @Override - public void onUnregister() { - super.onUnregister(); - poller.cancel(); - } -} |