parameters.put("movie", getSrc(uidl, client));
}
+ // Add the parameters to the Object
for (String name : parameters.keySet()) {
html += "<param name=\"" + escapeAttribute(name)
+ "\" value=\""
}
html += "<embed src=\"" + getSrc(uidl, client) + "\" width=\""
- + width + "\" height=\"" + height + "\"></embed>";
+ + width + "\" height=\"" + height + "\" ";
- html += "</object>";
+ // Add the parameters to the Embed
+ for (String name : parameters.keySet()) {
+ html += escapeAttribute(name) + "=\""
+ + escapeAttribute(parameters.get(name)) + "\" ";
+ }
+
+ html += "></embed></object>";
setHTML(html);
} else if (mime.equals("image/svg+xml")) {
String data;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.VTooltip;
-public class VNativeButton extends Button implements Paintable {
+public class VNativeButton extends Button implements Paintable, ClickHandler {
public static final String CLASSNAME = "v-nativebutton";
getElement().appendChild(captionElement);
captionElement.setClassName(getStyleName() + "-caption");
- addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent event) {
- if (id == null || client == null) {
- return;
- }
- if (BrowserInfo.get().isSafari()) {
- VNativeButton.this.setFocus(true);
- }
- client.updateVariable(id, "state", true, true);
- clickPending = false;
- }
- });
+ addClickHandler(this);
+
sinkEvents(VTooltip.TOOLTIP_EVENTS);
sinkEvents(Event.ONMOUSEDOWN);
sinkEvents(Event.ONMOUSEUP);
}
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event
+ * .dom.client.ClickEvent)
+ */
+ public void onClick(ClickEvent event) {
+ if (id == null || client == null) {
+ return;
+ }
+
+ if (BrowserInfo.get().isSafari()) {
+ VNativeButton.this.setFocus(true);
+ }
+
+ client.updateVariable(id, "state", true, true);
+ clickPending = false;
+ }
+
}