Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 8 files changed
  • 0 commit comments
  • 2 contributors
Commits on Nov 07, 2012
@bduong bduong Added Javafx 34430b5
@bduong bduong changed target JDK to 1.7 02c09b4
Commits on Nov 08, 2012
Heng Du TutorialPanal changed, added creation of VideoPlayerPanel. Videoplaye…
…rPanel implemented, 3 video added into resources
0515d3b
Heng Du re commit TutorialPanel.java 8b8c4d5
View
20 GUI/pom.xml
@@ -14,6 +14,7 @@
<name>User Interface</name>
<properties>
<mary.tts.version>5.1-SNAPSHOT</mary.tts.version>
+ <jfx.version>2.2</jfx.version>
</properties>
<repositories>
@@ -68,6 +69,20 @@
<artifactId>hsqldb</artifactId>
<version>2.0.0</version>
<type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>javafx</groupId>
+ <artifactId>javafx</artifactId>
+ <version>2.0</version>
+ <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
+ <scope>system</scope>
+ </dependency>
+ <dependency>
+ <groupId>javafx</groupId>
+ <artifactId>javafx-ant</artifactId>
+ <version>2.0</version>
+ <systemPath>${java.home}/../lib/ant-javafx.jar</systemPath>
+ <scope>system</scope>
</dependency>
</dependencies>
@@ -75,6 +90,10 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
@@ -125,5 +144,4 @@
</plugin>
</plugins>
</build>
-
</project>
View
18 GUI/src/main/java/superkidsapplication/panels/TutorialPanel.java
@@ -12,6 +12,7 @@
import java.util.List;
import javax.swing.Icon;
import superkidsapplication.controllers.TutorialController;
+import java.awt.BorderLayout;
/**
*
* @author FRANKs
@@ -21,11 +22,26 @@
/**
* Creates new form TutorialPanel
*/
+
+ private VideoPlayerPanel videoplayerpanel=null;
public TutorialPanel(String category) {
initComponents();
- jLabel1.setText(category);
+ jLabel1.setText(category);
+ if (category.equals("SHAPES"))
+ {
+ videoplayerpanel=new VideoPlayerPanel("file:///../../../resources/videos/shapes.mp4");
+ }
+ if (category.equals("COLORS"))
+ {
+ videoplayerpanel=new VideoPlayerPanel("file:///../../../resources/videos/colors.mp4");
+ }
+ if (category.equals("ANIMALS"))
+ {
+ videoplayerpanel=new VideoPlayerPanel("file:///../../../resources/videos/animals.mp4");
+ }
+ //this.add(videoplayerpanel,BorderLayout.CENTER);
}
/**
View
66 GUI/src/main/java/superkidsapplication/panels/VideoPlayerPanel.java
@@ -0,0 +1,66 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package superkidsapplication.panels;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import javafx.application.Platform;
+import javax.swing.JPanel;
+import javafx.scene.media.Media;
+import javafx.scene.media.MediaPlayer;
+import javafx.scene.media.MediaView;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.embed.swing.JFXPanel;
+import javax.swing.SwingUtilities;
+
+/**
+ *
+ * @author Heng
+ */
+public class VideoPlayerPanel extends JPanel{
+
+ private String filepath=null;
+ private Media media=null;
+ private MediaPlayer mediaplayer=null;
+ private MediaView mediaview=null;
+ private Group root=null;
+ private Scene scene = null;
+ private JFXPanel jfxpanel=new JFXPanel();
+
+ public VideoPlayerPanel(String str){
+ //TODO constructor
+ this.filepath=str;
+ //this.setBackground(Color.red);
+ this.setSize(640, 360);
+ initAndShowGUI();
+ }
+
+ private void initAndShowGUI(){
+
+
+
+ this.add(jfxpanel,BorderLayout.CENTER);
+ this.setVisible(true);
+
+ Platform.runLater(new Runnable(){
+ @Override
+ public void run(){
+ initFX(jfxpanel);
+ }
+ });
+ }
+
+ private void initFX(JFXPanel jfxpenal){
+ root=new Group();
+ scene=new Scene(root,640,360);
+ media=new Media(filepath);
+ mediaplayer=new MediaPlayer(media);
+ mediaview=new MediaView(mediaplayer);
+ mediaplayer.setAutoPlay(true);
+ root.getChildren().add(mediaview);
+ jfxpanel.setScene(scene);
+ }
+}
View
BIN  GUI/src/main/resources/videos/animals.mp4
Binary file not shown
View
BIN  GUI/src/main/resources/videos/colors.mp4
Binary file not shown
View
BIN  GUI/src/main/resources/videos/shapes.mp4
Binary file not shown
View
9 pom.xml
@@ -37,6 +37,15 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
</plugin>
View
6 server/pom.xml
@@ -29,6 +29,10 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
@@ -41,7 +45,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
- <outputDirectory> ${project.build.directory}/surefire-reports </outputDirectory>
+ <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
</configuration>
<executions>
<execution>

No commit comments for this range

Something went wrong with that request. Please try again.