Permalink
Browse files

Project with vaadin addons for multimedia demo

  • Loading branch information...
1 parent 5b817b6 commit da62d93e97f07b0013e5d679fa0c78d79967b7c4 @semanticsoft committed Nov 22, 2012
Showing with 1,057 additions and 0 deletions.
  1. +7 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/.classpath
  2. +28 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/.project
  3. +7 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/.settings/org.eclipse.jdt.core.prefs
  4. +9 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/META-INF/MANIFEST.MF
  5. +4 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/build.properties
  6. BIN ...clipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/CustomClickableOverlay$ClickListener.class
  7. BIN ...manticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/CustomClickableOverlay.class
  8. +94 −0 ...emanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/CustomClickableOverlay.java
  9. BIN org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/CustomOverlay$1.class
  10. BIN org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/CustomOverlay.class
  11. +296 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/CustomOverlay.java
  12. BIN org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/ImageOverlay.class
  13. +88 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/ImageOverlay.java
  14. BIN ...semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlayClickListener.class
  15. +16 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlayClickListener.java
  16. BIN ...icsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlaySampleApplication$1.class
  17. BIN ...icsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlaySampleApplication$2.class
  18. BIN ...icsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlaySampleApplication$3.class
  19. BIN ...nticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlaySampleApplication.class
  20. +95 −0 ...anticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlaySampleApplication.java
  21. +24 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/OverlaysWidgetset.gwt.xml
  22. BIN org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/TextOverlay.class
  23. +127 −0 org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/TextOverlay.java
  24. BIN ...icsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/client/ui/VCustomOverlay$1.class
  25. BIN ...icsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/client/ui/VCustomOverlay$2.class
  26. BIN ...icsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/client/ui/VCustomOverlay$3.class
  27. BIN ...nticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/client/ui/VCustomOverlay.class
  28. +244 −0 ...anticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/client/ui/VCustomOverlay.java
  29. BIN org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/icon-new.png
  30. +11 −0 ...emanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/public/overlays/overlays.js
  31. +7 −0 ...semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons/org/vaadin/overlay/public/overlays/styles.css
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry exported="true" kind="lib" path=""/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Vaadinaddons
+Bundle-SymbolicName: org.semanticsoft.vaaclipsedemo.mediaplayer.vaadinaddons
+Bundle-Version: 1.0.0
+Export-Package: org.vaadin.overlay,
+ org.vaadin.overlay.client.ui
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: com.vaadin;bundle-version="6.8.1"
@@ -0,0 +1,4 @@
+source.. = .
+output.. = .
+bin.includes = META-INF/,\
+ org/
@@ -0,0 +1,94 @@
+package org.vaadin.overlay;
+
+import com.vaadin.event.LayoutEvents.LayoutClickEvent;
+import com.vaadin.event.LayoutEvents.LayoutClickListener;
+import com.vaadin.terminal.Resource;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CssLayout;
+
+/**
+ * Server-side class for creating image overlays that can be clicked. This class
+ * is used to implement click support to {@link TextOverlay} and
+ * {@link ImageOverlay} but it can be used for other similar Overlays that need
+ * the click support.
+ *
+ * @author Sami Ekblad
+ *
+ */
+public class CustomClickableOverlay extends CustomOverlay {
+ private static final long serialVersionUID = -354623604620366005L;
+ private CssLayout layout = new CssLayout();
+ private Component realOverlay;
+ private OverlayClickListener clickListener;
+
+ public CustomClickableOverlay() {
+ layout.addListener(new ClickListener());
+ super.setOverlay(layout);
+ }
+
+ /**
+ * Create new overlay for a component. The image resource must be added
+ * later using {@link #setImage(Resource)}
+ *
+ * @param overlay
+ * @param referenceComponent
+ * @see #setComponentAnchor(com.vaadin.ui.Alignment)
+ * @see #setXOffset(int)
+ * @see #setYOffset(int)
+ */
+ public CustomClickableOverlay(Component overlay,
+ Component referenceComponent) {
+ this();
+ setComponent(referenceComponent);
+ setOverlay(overlay);
+ }
+
+ @Override
+ public Component getOverlay() {
+ return realOverlay;
+ }
+
+ @Override
+ public void setOverlay(Component overlay) {
+ realOverlay = overlay;
+ layout.removeAllComponents();
+ if (realOverlay != null) {
+ layout.addComponent(realOverlay);
+ }
+ }
+
+ /**
+ * Set a click listener for to receive the overlay click events.
+ *
+ * @param clickListener
+ */
+ public void setClickListener(OverlayClickListener clickListener) {
+ this.clickListener = clickListener;
+ }
+
+ /**
+ * Get a click listener for to receive the overlay click events.
+ *
+ * @return clickListener
+ */
+ public OverlayClickListener getClickListener() {
+ return clickListener;
+ }
+
+ /**
+ * Implementation of the LayoutClickListener to receive the clicks.
+ *
+ */
+ private class ClickListener implements LayoutClickListener {
+
+ private static final long serialVersionUID = 1L;
+
+ public void layoutClick(LayoutClickEvent event) {
+ if (clickListener != null) {
+ clickListener.overlayClicked(CustomClickableOverlay.this);
+ }
+ }
+
+ }
+
+}
Oops, something went wrong.

0 comments on commit da62d93

Please sign in to comment.