This repository has been archived by the owner on May 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
32 additions
and
15 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 26 additions & 1 deletion
27
src/org/vaadin/applet/client/ui/AppletIntegrationConnector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
/* | ||
* Copyright (c) 2011 Haulmont Technology Ltd. All Rights Reserved. | ||
* Haulmont Technology proprietary and confidential. | ||
* Use is subject to license terms. | ||
*/ | ||
|
||
package org.vaadin.applet.client.ui; | ||
|
||
import com.vaadin.client.ApplicationConnection; | ||
import com.vaadin.client.Paintable; | ||
import com.vaadin.client.UIDL; | ||
import com.vaadin.client.communication.StateChangeEvent; | ||
import com.vaadin.client.ui.AbstractComponentConnector; | ||
import com.vaadin.shared.ui.Connect; | ||
import org.vaadin.applet.AppletIntegration; | ||
|
||
import java.util.logging.Logger; | ||
|
||
/** | ||
* @author artamonov | ||
* @version $Id$ | ||
*/ | ||
@Connect(AppletIntegration.class) | ||
public class AppletIntegrationConnector extends AbstractComponentConnector implements Paintable { | ||
|
||
protected Logger log = Logger.getLogger("AppletIntegrationConnector"); | ||
|
||
@Override | ||
public VAppletIntegration getWidget() { | ||
return (VAppletIntegration) super.getWidget(); | ||
} | ||
|
||
@Override | ||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | ||
log.info("Set applet parameters"); | ||
|
||
getWidget().updateFromUIDL(uidl, client); | ||
} | ||
|
||
@Override | ||
public void onStateChanged(StateChangeEvent stateChangeEvent) { | ||
log.info("Applet state changed"); | ||
|
||
super.onStateChanged(stateChangeEvent); | ||
|
||
if (stateChangeEvent.hasPropertyChanged("width")) | ||
getWidget().setWidth(getState().width); | ||
|
||
if (stateChangeEvent.hasPropertyChanged("height")) | ||
getWidget().setHeight(getState().height); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters