Commit f2169cf57cc976570228b881f460952facfc4f6c
1 parent
6dceebd0
Exists in
master
Todos os manuais, relatórios, código-fonte e materiais relativos ao projeto PPB-Ginga
Showing
163 changed files
with
53685 additions
and
0 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 163 files displayed.
No preview for this file type
Projeto PPB-Ginga/Manuais/Manual_AstroTV_MOPA_DommXStream_08-02-13.pdf
0 → 100644
No preview for this file type
Projeto PPB-Ginga/Manuais/Relatorio_ Avaliação_ Middlewares_Comerciais_08-02-2013.pdf
0 → 100644
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/bin/jmfcustomizer
0 → 100644
| ... | ... | @@ -0,0 +1,88 @@ |
| 1 | +#!/bin/sh | |
| 2 | +# | |
| 3 | +# A script to launch the JMFCustomizer java application. | |
| 4 | + | |
| 5 | +# | |
| 6 | +# If a path name is a symbolic link, resolve it. | |
| 7 | +# | |
| 8 | +GetRealPath() | |
| 9 | +{ | |
| 10 | + pathName="$1" | |
| 11 | + level=1 | |
| 12 | + | |
| 13 | + while [ -h "$pathName" ] ; do | |
| 14 | + level=`/bin/expr $level + 1` | |
| 15 | + if [ $level -gt 10 ] ; then | |
| 16 | + echo "$pathName: too many levels of symbolic links" | |
| 17 | + break; | |
| 18 | + fi | |
| 19 | + | |
| 20 | + # | |
| 21 | + # First, make sure we have an absolute path name. | |
| 22 | + # | |
| 23 | + if IsRelativePath "$pathName" ; then | |
| 24 | + pathName=`/bin/pwd`/"$pathName" | |
| 25 | + fi | |
| 26 | + | |
| 27 | + # | |
| 28 | + # Then determine where the link points (via "ls -l") | |
| 29 | + # | |
| 30 | + dirName=`/bin/dirname $pathName` | |
| 31 | + link=`/bin/ls -l $pathName | sed -e 's,.* -> ,,g'` | |
| 32 | + | |
| 33 | + if IsRelativePath "$link" ; then | |
| 34 | + pathName="$dirName"/"$link" | |
| 35 | + else | |
| 36 | + pathName="$link" | |
| 37 | + fi | |
| 38 | + done | |
| 39 | + | |
| 40 | + echo "$pathName" | |
| 41 | + | |
| 42 | + return 0 | |
| 43 | +} | |
| 44 | + | |
| 45 | +# | |
| 46 | +# Is this a relative path name (i.e., doesn't begin with "/")? | |
| 47 | +# | |
| 48 | +IsRelativePath() | |
| 49 | +{ | |
| 50 | + pathName="$1" | |
| 51 | + | |
| 52 | + if [ `echo "$pathName" | sed -e 's,^/.*,absolute,g'` = "absolute" ] ; then | |
| 53 | + return 1 | |
| 54 | + else | |
| 55 | + return 0 | |
| 56 | + fi | |
| 57 | +} | |
| 58 | + | |
| 59 | +# | |
| 60 | +# Figure out the real path to this shell script and then setup | |
| 61 | +# the JMFHOME environment | |
| 62 | +# | |
| 63 | +PROGPATH=`GetRealPath $0` | |
| 64 | +TMPDIR=`dirname $PROGPATH` | |
| 65 | +JMFHOME=`( cd $TMPDIR/.. && /bin/pwd )`; export JMFHOME | |
| 66 | + | |
| 67 | +CLASSPATH=${JMFHOME}/lib/jmf.jar:${JMFHOME}/lib/sound.jar:${JMFHOME}/lib/customizer.jar:${CLASSPATH}; export CLASSPATH | |
| 68 | + | |
| 69 | +LD_LIBRARY_PATH=.:/usr/openwin/lib:${JMFHOME}/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH | |
| 70 | + | |
| 71 | +# Use this to run with native threads: | |
| 72 | +# THREADS_FLAG=native; export THREADS_FLAG | |
| 73 | + | |
| 74 | +# If it's running on Solaris 2.6, we are forced to use native threads. | |
| 75 | +UNAME=`uname -r` | |
| 76 | +case $UNAME in | |
| 77 | +5.6) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 78 | +5.6.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 79 | +5.7) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 80 | +5.7.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 81 | +5.8) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 82 | +5.8.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 83 | +esac | |
| 84 | + | |
| 85 | +if [ $# -gt 0 ]; then | |
| 86 | + FILE=$1 | |
| 87 | +fi | |
| 88 | +exec java JMFCustomizer | ... | ... |
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/bin/jmfinit
0 → 100644
| ... | ... | @@ -0,0 +1,88 @@ |
| 1 | +#!/bin/sh | |
| 2 | +# | |
| 3 | +# A script to launch the Export java application. | |
| 4 | + | |
| 5 | +# | |
| 6 | +# If a path name is a symbolic link, resolve it. | |
| 7 | +# | |
| 8 | +GetRealPath() | |
| 9 | +{ | |
| 10 | + pathName="$1" | |
| 11 | + level=1 | |
| 12 | + | |
| 13 | + while [ -h "$pathName" ] ; do | |
| 14 | + level=`/bin/expr $level + 1` | |
| 15 | + if [ $level -gt 10 ] ; then | |
| 16 | + echo "$pathName: too many levels of symbolic links" | |
| 17 | + break; | |
| 18 | + fi | |
| 19 | + | |
| 20 | + # | |
| 21 | + # First, make sure we have an absolute path name. | |
| 22 | + # | |
| 23 | + if IsRelativePath "$pathName" ; then | |
| 24 | + pathName=`/bin/pwd`/"$pathName" | |
| 25 | + fi | |
| 26 | + | |
| 27 | + # | |
| 28 | + # Then determine where the link points (via "ls -l") | |
| 29 | + # | |
| 30 | + dirName=`/bin/dirname $pathName` | |
| 31 | + link=`/bin/ls -l $pathName | sed -e 's,.* -> ,,g'` | |
| 32 | + | |
| 33 | + if IsRelativePath "$link" ; then | |
| 34 | + pathName="$dirName"/"$link" | |
| 35 | + else | |
| 36 | + pathName="$link" | |
| 37 | + fi | |
| 38 | + done | |
| 39 | + | |
| 40 | + echo "$pathName" | |
| 41 | + | |
| 42 | + return 0 | |
| 43 | +} | |
| 44 | + | |
| 45 | +# | |
| 46 | +# Is this a relative path name (i.e., doesn't begin with "/")? | |
| 47 | +# | |
| 48 | +IsRelativePath() | |
| 49 | +{ | |
| 50 | + pathName="$1" | |
| 51 | + | |
| 52 | + if [ `echo "$pathName" | sed -e 's,^/.*,absolute,g'` = "absolute" ] ; then | |
| 53 | + return 1 | |
| 54 | + else | |
| 55 | + return 0 | |
| 56 | + fi | |
| 57 | +} | |
| 58 | + | |
| 59 | +# | |
| 60 | +# Figure out the real path to this shell script and then setup | |
| 61 | +# the JMFHOME environment | |
| 62 | +# | |
| 63 | +PROGPATH=`GetRealPath $0` | |
| 64 | +TMPDIR=`dirname $PROGPATH` | |
| 65 | +JMFHOME=`( cd $TMPDIR/.. && /bin/pwd )`; export JMFHOME | |
| 66 | + | |
| 67 | +CLASSPATH=${JMFHOME}/lib/jmf.jar:${JMFHOME}/lib/sound.jar:${CLASSPATH}; export CLASSPATH | |
| 68 | + | |
| 69 | +LD_LIBRARY_PATH=.:/usr/openwin/lib:${JMFHOME}/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH | |
| 70 | + | |
| 71 | +# Use this to run with native threads: | |
| 72 | +# THREADS_FLAG=native; export THREADS_FLAG | |
| 73 | + | |
| 74 | +# If it's running on Solaris 2.6, we are forced to use native threads. | |
| 75 | +UNAME=`uname -r` | |
| 76 | +case $UNAME in | |
| 77 | +5.6) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 78 | +5.6.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 79 | +5.7) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 80 | +5.7.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 81 | +5.8) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 82 | +5.8.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 83 | +esac | |
| 84 | + | |
| 85 | +if [ $# -gt 0 ]; then | |
| 86 | + FILE=$1 | |
| 87 | +fi | |
| 88 | +exec java JMFInit $* | ... | ... |
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/bin/jmfregistry
0 → 100644
| ... | ... | @@ -0,0 +1,88 @@ |
| 1 | +#!/bin/sh | |
| 2 | +# | |
| 3 | +# A script to launch the JMFRegistry java application. | |
| 4 | + | |
| 5 | +# | |
| 6 | +# If a path name is a symbolic link, resolve it. | |
| 7 | +# | |
| 8 | +GetRealPath() | |
| 9 | +{ | |
| 10 | + pathName="$1" | |
| 11 | + level=1 | |
| 12 | + | |
| 13 | + while [ -h "$pathName" ] ; do | |
| 14 | + level=`/bin/expr $level + 1` | |
| 15 | + if [ $level -gt 10 ] ; then | |
| 16 | + echo "$pathName: too many levels of symbolic links" | |
| 17 | + break; | |
| 18 | + fi | |
| 19 | + | |
| 20 | + # | |
| 21 | + # First, make sure we have an absolute path name. | |
| 22 | + # | |
| 23 | + if IsRelativePath "$pathName" ; then | |
| 24 | + pathName=`/bin/pwd`/"$pathName" | |
| 25 | + fi | |
| 26 | + | |
| 27 | + # | |
| 28 | + # Then determine where the link points (via "ls -l") | |
| 29 | + # | |
| 30 | + dirName=`/bin/dirname $pathName` | |
| 31 | + link=`/bin/ls -l $pathName | sed -e 's,.* -> ,,g'` | |
| 32 | + | |
| 33 | + if IsRelativePath "$link" ; then | |
| 34 | + pathName="$dirName"/"$link" | |
| 35 | + else | |
| 36 | + pathName="$link" | |
| 37 | + fi | |
| 38 | + done | |
| 39 | + | |
| 40 | + echo "$pathName" | |
| 41 | + | |
| 42 | + return 0 | |
| 43 | +} | |
| 44 | + | |
| 45 | +# | |
| 46 | +# Is this a relative path name (i.e., doesn't begin with "/")? | |
| 47 | +# | |
| 48 | +IsRelativePath() | |
| 49 | +{ | |
| 50 | + pathName="$1" | |
| 51 | + | |
| 52 | + if [ `echo "$pathName" | sed -e 's,^/.*,absolute,g'` = "absolute" ] ; then | |
| 53 | + return 1 | |
| 54 | + else | |
| 55 | + return 0 | |
| 56 | + fi | |
| 57 | +} | |
| 58 | + | |
| 59 | +# | |
| 60 | +# Figure out the real path to this shell script and then setup | |
| 61 | +# the JMFHOME environment | |
| 62 | +# | |
| 63 | +PROGPATH=`GetRealPath $0` | |
| 64 | +TMPDIR=`dirname $PROGPATH` | |
| 65 | +JMFHOME=`( cd $TMPDIR/.. && /bin/pwd )`; export JMFHOME | |
| 66 | + | |
| 67 | +CLASSPATH=${JMFHOME}/lib/jmf.jar:${JMFHOME}/lib:${JMFHOME}/lib/sound.jar:${CLASSPATH}; export CLASSPATH | |
| 68 | + | |
| 69 | +LD_LIBRARY_PATH=.:/usr/openwin/lib:${JMFHOME}/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH | |
| 70 | + | |
| 71 | +# Use this to run with native threads: | |
| 72 | +# THREADS_FLAG=native; export THREADS_FLAG | |
| 73 | + | |
| 74 | +# If it's running on Solaris 2.6, we are forced to use native threads. | |
| 75 | +UNAME=`uname -r` | |
| 76 | +case $UNAME in | |
| 77 | +5.6) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 78 | +5.6.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 79 | +5.7) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 80 | +5.7.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 81 | +5.8) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 82 | +5.8.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 83 | +esac | |
| 84 | + | |
| 85 | +if [ $# -gt 0 ]; then | |
| 86 | + FILE=$1 | |
| 87 | +fi | |
| 88 | +exec java JMFRegistry | ... | ... |
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/bin/jmstudio
0 → 100644
| ... | ... | @@ -0,0 +1,88 @@ |
| 1 | +#!/bin/sh | |
| 2 | +# | |
| 3 | +# A script to launch the JMStudio java application. | |
| 4 | + | |
| 5 | +# | |
| 6 | +# If a path name is a symbolic link, resolve it. | |
| 7 | +# | |
| 8 | +GetRealPath() | |
| 9 | +{ | |
| 10 | + pathName="$1" | |
| 11 | + level=1 | |
| 12 | + | |
| 13 | + while [ -h "$pathName" ] ; do | |
| 14 | + level=`/bin/expr $level + 1` | |
| 15 | + if [ $level -gt 10 ] ; then | |
| 16 | + echo "$pathName: too many levels of symbolic links" | |
| 17 | + break; | |
| 18 | + fi | |
| 19 | + | |
| 20 | + # | |
| 21 | + # First, make sure we have an absolute path name. | |
| 22 | + # | |
| 23 | + if IsRelativePath "$pathName" ; then | |
| 24 | + pathName=`/bin/pwd`/"$pathName" | |
| 25 | + fi | |
| 26 | + | |
| 27 | + # | |
| 28 | + # Then determine where the link points (via "ls -l") | |
| 29 | + # | |
| 30 | + dirName=`/bin/dirname $pathName` | |
| 31 | + link=`/bin/ls -l $pathName | sed -e 's,.* -> ,,g'` | |
| 32 | + | |
| 33 | + if IsRelativePath "$link" ; then | |
| 34 | + pathName="$dirName"/"$link" | |
| 35 | + else | |
| 36 | + pathName="$link" | |
| 37 | + fi | |
| 38 | + done | |
| 39 | + | |
| 40 | + echo "$pathName" | |
| 41 | + | |
| 42 | + return 0 | |
| 43 | +} | |
| 44 | + | |
| 45 | +# | |
| 46 | +# Is this a relative path name (i.e., doesn't begin with "/")? | |
| 47 | +# | |
| 48 | +IsRelativePath() | |
| 49 | +{ | |
| 50 | + pathName="$1" | |
| 51 | + | |
| 52 | + if [ `echo "$pathName" | sed -e 's,^/.*,absolute,g'` = "absolute" ] ; then | |
| 53 | + return 1 | |
| 54 | + else | |
| 55 | + return 0 | |
| 56 | + fi | |
| 57 | +} | |
| 58 | + | |
| 59 | +# | |
| 60 | +# Figure out the real path to this shell script and then setup | |
| 61 | +# the JMFHOME environment | |
| 62 | +# | |
| 63 | +PROGPATH=`GetRealPath $0` | |
| 64 | +TMPDIR=`dirname $PROGPATH` | |
| 65 | +JMFHOME=`( cd $TMPDIR/.. && /bin/pwd )`; export JMFHOME | |
| 66 | + | |
| 67 | +CLASSPATH=${JMFHOME}/lib/jmf.jar:${JMFHOME}/lib:${JMFHOME}/lib/sound.jar:${CLASSPATH}; export CLASSPATH | |
| 68 | + | |
| 69 | +LD_LIBRARY_PATH=.:/usr/openwin/lib:${JMFHOME}/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH | |
| 70 | + | |
| 71 | +# Use this to run with native threads: | |
| 72 | +# THREADS_FLAG=native; export THREADS_FLAG | |
| 73 | + | |
| 74 | +# If it's running on Solaris 2.6, we are forced to use native threads. | |
| 75 | +UNAME=`uname -r` | |
| 76 | +case $UNAME in | |
| 77 | +5.6) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 78 | +5.6.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 79 | +5.7) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 80 | +5.7.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 81 | +5.8) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 82 | +5.8.*) THREADS_FLAG=native; export THREADS_FLAG;; | |
| 83 | +esac | |
| 84 | + | |
| 85 | +if [ $# -gt 0 ]; then | |
| 86 | + FILE=$1 | |
| 87 | +fi | |
| 88 | +exec java JMStudio $* | ... | ... |
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/doc/attributions.html
0 → 100644
| ... | ... | @@ -0,0 +1,298 @@ |
| 1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | |
| 2 | +<HTML> | |
| 3 | +<HEAD> | |
| 4 | + <!--#config timefmt="%d-%b-%y" --> | |
| 5 | + <TITLE>JMF - Attributions</TITLE> | |
| 6 | + <META NAME="keywords" CONTENT="JMF, Attributions, Java Media Framework"> | |
| 7 | +</HEAD> | |
| 8 | + | |
| 9 | +<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="8B4513" VLINK="8B4513" > | |
| 10 | + | |
| 11 | +<!-- page headline --> | |
| 12 | +<FONT SIZE="+2"> | |
| 13 | +JMF Attributions | |
| 14 | +</FONT> | |
| 15 | +<BR> | |
| 16 | + | |
| 17 | +<!-- end page headline --> | |
| 18 | + | |
| 19 | +<!-- optional subnav links --> | |
| 20 | +<!-- end optional subnav links --> | |
| 21 | + | |
| 22 | +<!-- main page content --> | |
| 23 | + | |
| 24 | +<p> | |
| 25 | +The Java<SUP><FONT SIZE="-2">TM</FONT></SUP> Media Framework | |
| 26 | +reference implementation was developed by by Sun Microsystems, Inc. | |
| 27 | +It is based in part on software written by external individuals and | |
| 28 | +organizations, who are listed below along with the copyrights and | |
| 29 | +conditions by which their technology is allowed to be used in JMF. | |
| 30 | +</p> | |
| 31 | + | |
| 32 | +<!---------------------------------------------------------------> | |
| 33 | +<hr> | |
| 34 | + | |
| 35 | +<b> | |
| 36 | +<p> | |
| 37 | +Java Versions of: GSM Decoder, GSM Encoder, MPEG-1 Video Decoder, | |
| 38 | +ADPCM Encoder, ADPCM Decoder, A-law Decoder and H.263 Decoder | |
| 39 | + | |
| 40 | +<p> | |
| 41 | +Native Versions of: MPEG-1 Parser, H.263 Encoder, GSM Encoder | |
| 42 | +</b> | |
| 43 | + | |
| 44 | +<p> | |
| 45 | +Copyright © IBM Corporation 1997-1999 All Rights Reserved | |
| 46 | + | |
| 47 | +<p><FONT SIZE=-1> | |
| 48 | +Licensed Materials - Property of IBM<br> | |
| 49 | +"Restricted Materials of IBM" 5748-B81<br> | |
| 50 | +US Government Users Restricted Rights - Use, duplication or | |
| 51 | +disclosure restricted by GSA ADP Schedule Contract with IBM | |
| 52 | +Corporation.</font> | |
| 53 | +</p> | |
| 54 | + | |
| 55 | +<!---------------------------------------------------------------> | |
| 56 | +<hr> | |
| 57 | + | |
| 58 | +<p> | |
| 59 | +<b> | |
| 60 | +GSM 06.10</b> | |
| 61 | + | |
| 62 | +<p> | |
| 63 | +Copyright © 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, | |
| 64 | +Technische Universitaet Berlin | |
| 65 | + | |
| 66 | +<P><FONT SIZE=-1>Any use of this software is permitted provided that this | |
| 67 | +notice is not removed and that neither the authors nor the Technische Universitaet | |
| 68 | +Berlin are deemed to have made any representations as to the suitability | |
| 69 | +of this software for any purpose nor are held responsible for any defects | |
| 70 | +of this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.</FONT> | |
| 71 | + | |
| 72 | +<P><FONT SIZE=-1>As a matter of courtesy, the authors request to be informed | |
| 73 | +about uses this software has found, about bugs in this software, and about | |
| 74 | +any improvements that may be of general interest.</FONT> | |
| 75 | +</p> | |
| 76 | + | |
| 77 | +<!---------------------------------------------------------------> | |
| 78 | +<hr> | |
| 79 | + | |
| 80 | +<p> | |
| 81 | +<b> | |
| 82 | +DVI ADPCM</b> | |
| 83 | + | |
| 84 | +<p> | |
| 85 | +Copyright © 1992 by Stichting Mathematisch Centrum, Amsterdam, The | |
| 86 | +Netherlands. All rights reserved. | |
| 87 | + | |
| 88 | +<P><FONT SIZE=-1>Permission to use, copy, modify, and distribute this software | |
| 89 | +and its documentation for any purpose and without fee is hereby granted, | |
| 90 | +provided that the above copyright notice appear in all copies and that | |
| 91 | +both that copyright notice and this permission notice appear in supporting | |
| 92 | +documentation, and that the names of Stichting Mathematisch Centrum or | |
| 93 | +CWI not be used in advertising or publicity pertaining to distribution | |
| 94 | +of the software without specific, written prior permission.</FONT> | |
| 95 | + | |
| 96 | +<P><FONT SIZE=-1>STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES | |
| 97 | +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
| 98 | +AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE | |
| 99 | +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER | |
| 100 | +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | |
| 101 | +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH | |
| 102 | +THE USE OR PERFORMANCE OF THIS SOFTWARE.</FONT> | |
| 103 | +</p> | |
| 104 | + | |
| 105 | +<!---------------------------------------------------------------> | |
| 106 | +<hr> | |
| 107 | + | |
| 108 | +<p> | |
| 109 | +<b> | |
| 110 | +H.261, Motion JPEG</b> | |
| 111 | + | |
| 112 | +<p> | |
| 113 | +This product includes software developed by the University of California, | |
| 114 | +Berkeley and the Network Research Group at Lawrence Berkeley Laboratory. | |
| 115 | + | |
| 116 | +<P>Copyright © 1993-1994 The Regents of the University of California. | |
| 117 | +All rights reserved. | |
| 118 | + | |
| 119 | +<P><FONT SIZE=-1> | |
| 120 | +Redistribution and use in source and binary forms, with | |
| 121 | +or without modification, are permitted provided that the following | |
| 122 | +conditions are met: | |
| 123 | + | |
| 124 | +<ol> | |
| 125 | +<!-- 1 --> | |
| 126 | +<li> | |
| 127 | +Redistributions of source code must retain the above | |
| 128 | +copyright notice, this list of conditions and the following disclaimer. | |
| 129 | + | |
| 130 | +<!-- 2 --> | |
| 131 | +<li> | |
| 132 | +Redistributions in binary form must reproduce the | |
| 133 | +above copyright notice, this list of conditions and the following disclaimer | |
| 134 | +in the documentation and/or other materials provided with the distribution. | |
| 135 | + | |
| 136 | +<!-- 3 --> | |
| 137 | +<li> | |
| 138 | +All advertising materials mentioning features or use | |
| 139 | +of this software must display the following acknowledgement: This product | |
| 140 | +includes software developed by the University of California, Berkeley and | |
| 141 | +the Network Research Group at Lawrence Berkeley Laboratory. | |
| 142 | + | |
| 143 | +<!-- 4 --> | |
| 144 | +<li> | |
| 145 | +Neither the name of the University nor of the Laboratory | |
| 146 | +may be used to endorse or promote products derived from this software without | |
| 147 | +specific prior written permission. | |
| 148 | +</ol> | |
| 149 | + | |
| 150 | +<P> | |
| 151 | +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS | |
| 152 | +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
| 153 | +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
| 154 | +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS | |
| 155 | +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
| 156 | +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
| 157 | +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 158 | +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 159 | +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
| 160 | +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
| 161 | +SUCH DAMAGE. | |
| 162 | +</p> | |
| 163 | +</font> | |
| 164 | + | |
| 165 | +<!---------------------------------------------------------------> | |
| 166 | +<hr> | |
| 167 | + | |
| 168 | +<p> | |
| 169 | +<b> | |
| 170 | +JPEG</b> | |
| 171 | + | |
| 172 | +<p> | |
| 173 | +This software is based in part on the work of the | |
| 174 | +<a href="http://www.ijg.org">Independent JPEG Group</a>. | |
| 175 | +The following is an exerpt from the README file which comes with their | |
| 176 | +software: | |
| 177 | +</p> | |
| 178 | + | |
| 179 | +<font size="-1"> | |
| 180 | + | |
| 181 | +<b><underline> | |
| 182 | +LEGAL ISSUES | |
| 183 | +</underline></b> | |
| 184 | + | |
| 185 | +<p> | |
| 186 | +In plain English: | |
| 187 | + | |
| 188 | +<ol> | |
| 189 | + | |
| 190 | +<!-- 1. --> | |
| 191 | +<li> | |
| 192 | +We don't promise that this software works. | |
| 193 | +(But if you find any bugs, please let us know!) | |
| 194 | + | |
| 195 | + | |
| 196 | +<!-- 2. --> | |
| 197 | +<li> | |
| 198 | +You can use this software for whatever you want. | |
| 199 | +You don't have to pay us. | |
| 200 | + | |
| 201 | +<!-- 3. --> | |
| 202 | +<li> | |
| 203 | +You may not pretend that you wrote this software. If you use it in a | |
| 204 | +program, you must acknowledge somewhere in your documentation that | |
| 205 | +you've used the IJG code. | |
| 206 | +</ol> | |
| 207 | + | |
| 208 | +<p> | |
| 209 | +In legalese: | |
| 210 | + | |
| 211 | +<p> | |
| 212 | +The authors make NO WARRANTY or representation, either express or implied, | |
| 213 | +with respect to this software, its quality, accuracy, merchantability, or | |
| 214 | +fitness for a particular purpose. This software is provided "AS IS", and you, | |
| 215 | +its user, assume the entire risk as to its quality and accuracy. | |
| 216 | + | |
| 217 | +<p> | |
| 218 | +This software is copyright (C) 1991-1998, Thomas G. Lane. | |
| 219 | +All Rights Reserved except as specified below. | |
| 220 | + | |
| 221 | +<p> | |
| 222 | +Permission is hereby granted to use, copy, modify, and distribute this | |
| 223 | +software (or portions thereof) for any purpose, without fee, subject to these | |
| 224 | +conditions: | |
| 225 | + | |
| 226 | +<ol> | |
| 227 | +<!-- (1) --> | |
| 228 | +<li> | |
| 229 | +If any part of the source code for this software is distributed, then this | |
| 230 | +README file must be included, with this copyright and no-warranty notice | |
| 231 | +unaltered; and any additions, deletions, or changes to the original files | |
| 232 | +must be clearly indicated in accompanying documentation. | |
| 233 | + | |
| 234 | +<!-- (2) --> | |
| 235 | +<li> | |
| 236 | +If only executable code is distributed, then the accompanying | |
| 237 | +documentation must state that "this software is based in part on the work of | |
| 238 | +the Independent JPEG Group". | |
| 239 | + | |
| 240 | +<!-- (3) --> | |
| 241 | +<li> | |
| 242 | +Permission for use of this software is granted only if the user accepts | |
| 243 | +full responsibility for any undesirable consequences; the authors accept | |
| 244 | +NO LIABILITY for damages of any kind. | |
| 245 | +</ol> | |
| 246 | + | |
| 247 | +<p> | |
| 248 | +These conditions apply to any software derived from or based on the IJG code, | |
| 249 | +not just to the unmodified library. If you use our work, you ought to | |
| 250 | +acknowledge us. | |
| 251 | + | |
| 252 | +<p> | |
| 253 | +Permission is NOT granted for the use of any IJG author's name or company name | |
| 254 | +in advertising or publicity relating to this software or products derived from | |
| 255 | +it. This software may be referred to only as "the Independent JPEG Group's | |
| 256 | +software". | |
| 257 | + | |
| 258 | +<p> | |
| 259 | +We specifically permit and encourage the use of this software as the basis of | |
| 260 | +commercial products, provided that all warranty or liability claims are | |
| 261 | +assumed by the product vendor. | |
| 262 | +</p> | |
| 263 | +</font> | |
| 264 | + | |
| 265 | +<!---------------------------------------------------------------> | |
| 266 | +<hr> | |
| 267 | + | |
| 268 | +<p> | |
| 269 | +<b> | |
| 270 | +VIVO, H.263</b> | |
| 271 | + | |
| 272 | +<p> | |
| 273 | +Vivo is a product of the Vivo Software, Inc. at Waltham, MA 02154.8414. | |
| 274 | +<p> | |
| 275 | +Copyright © 1995 Vivo Software, Inc. All rights reserved. | |
| 276 | +</p> | |
| 277 | + | |
| 278 | +<!---------------------------------------------------------------> | |
| 279 | +<hr> | |
| 280 | + | |
| 281 | +<h2>Trademarks</h2> | |
| 282 | + | |
| 283 | +<P>Java<SUP><FONT SIZE=-2>TM</FONT></SUP> is a trademark of Sun Microsystems, | |
| 284 | +Inc. | |
| 285 | +<BR>QuickTime<SUP><FONT SIZE=-2>TM</FONT></SUP> is a trademark of Apple | |
| 286 | +Computer, Inc. | |
| 287 | +<BR>AVI<SUP><FONT SIZE=-2>TM</FONT></SUP> is a trademark of Microsoft Corporation. | |
| 288 | +<BR>Vivo<SUP><FONT SIZE=-2>TM</FONT></SUP> is a trademark of Vivo Software, | |
| 289 | +Inc. | |
| 290 | +<!--Blank Space--> | |
| 291 | +</P> | |
| 292 | + | |
| 293 | + | |
| 294 | +<!-- end main page content --> | |
| 295 | + | |
| 296 | +</BODY> | |
| 297 | +</HTML> | |
| 298 | + | ... | ... |
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/doc/formats.html
0 → 100644
| ... | ... | @@ -0,0 +1,780 @@ |
| 1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | |
| 2 | +<HTML> | |
| 3 | +<HEAD> | |
| 4 | + <!--#config timefmt="%d-%b-%y" --> | |
| 5 | + <TITLE>JMF 2.1.1 - Supported Formats</TITLE> | |
| 6 | + <META NAME="keywords" CONTENT="JMF, formats, Java Media Framework"> | |
| 7 | +</HEAD> | |
| 8 | + | |
| 9 | +<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="8B4513" VLINK="8B4513" > | |
| 10 | + | |
| 11 | +<!-- page headline --> | |
| 12 | +<A NAME="JMFFormats"></A> | |
| 13 | +<FONT SIZE="+2"> | |
| 14 | +Supported Media Formats and Capture Devices | |
| 15 | +</FONT> | |
| 16 | +<BR> | |
| 17 | + | |
| 18 | +<!-- end page headline --> | |
| 19 | + | |
| 20 | +<!-- optional subnav links --> | |
| 21 | +<!-- end optional subnav links --> | |
| 22 | + | |
| 23 | +<!-- main page content --> | |
| 24 | +<p> | |
| 25 | +This page lists the <a href="#Formats">media formats</a> supported | |
| 26 | +in the JMF 2.1.1 FCS implementation, the | |
| 27 | +<a href="#RTPFormats">RTP formats</a> this implementation can | |
| 28 | +receive and transmit, and the | |
| 29 | +<a href="#Capturers">capture devices</a> that it supports. | |
| 30 | + | |
| 31 | +<p> | |
| 32 | +<A NAME="Formats"></A> | |
| 33 | +<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#CC9966" NOSAVE > | |
| 34 | +<TR> | |
| 35 | +<TD><FONT SIZE=+2>Supported Media Formats</FONT></TD> | |
| 36 | +</TR> | |
| 37 | +</TABLE> | |
| 38 | + | |
| 39 | + | |
| 40 | +<p> | |
| 41 | +JMF supports audio sample rates from 8KHz to 48KHz. Note that | |
| 42 | +cross-platform version of JMF only supports the following | |
| 43 | +rates: 8, 11.025, 11.127, 16, 22.05, 22.254, 32, 44.1, and 48 KHz. | |
| 44 | + | |
| 45 | +<p> | |
| 46 | +The JMF 2.1.1 Reference Implementation supports the media types and | |
| 47 | +formats listed in the table below. In this table: | |
| 48 | + | |
| 49 | +<ul> | |
| 50 | +<LI> | |
| 51 | +<b>D</b> indicates the format can be decoded and presented.</LI> | |
| 52 | +<LI> | |
| 53 | +<b>E</b> indicates the media stream can be encoded in the format.</LI> | |
| 54 | +<LI> | |
| 55 | +<b>read</b> indicates the media type can be used as input (read from a file)</LI> | |
| 56 | +<LI> | |
| 57 | +<b>write</b> indicates the media type can be generated as output (written to a file)</LI> | |
| 58 | +</ul> | |
| 59 | + | |
| 60 | +<p> | |
| 61 | + | |
| 62 | +<TABLE BORDER=1> | |
| 63 | + | |
| 64 | +<TR> | |
| 65 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>Media Type</FONT></B></TD> | |
| 66 | + | |
| 67 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 68 | +<FONT SIZE=-1>Cross Platform Version</FONT></B></TD> | |
| 69 | + | |
| 70 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 71 | +<FONT SIZE=-1>Solaris Performance Pack</FONT></B></TD> | |
| 72 | + | |
| 73 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 74 | +<FONT SIZE=-1>Windows Performance Pack</FONT></B></TD> | |
| 75 | + | |
| 76 | +</TR> | |
| 77 | + | |
| 78 | +<TR> | |
| 79 | +<TD><B>AIFF (.aiff)</B></TD> | |
| 80 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 81 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 82 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 83 | +</TR> | |
| 84 | + | |
| 85 | +<TR> | |
| 86 | +<TD>8-bit mono/stereo linear </TD> | |
| 87 | +<TD ALIGN=CENTER>D,E</TD> | |
| 88 | +<TD ALIGN=CENTER>D,E</TD> | |
| 89 | +<TD ALIGN=CENTER>D,E</TD> | |
| 90 | +</TR> | |
| 91 | + | |
| 92 | +<TR> | |
| 93 | +<TD>16-bit mono/stereo linear </TD> | |
| 94 | +<TD ALIGN=CENTER>D,E</TD> | |
| 95 | +<TD ALIGN=CENTER>D,E</TD> | |
| 96 | +<TD ALIGN=CENTER>D,E</TD> | |
| 97 | +</TR> | |
| 98 | + | |
| 99 | +<TR> | |
| 100 | +<TD>G.711 (U-law) </TD> | |
| 101 | +<TD ALIGN=CENTER>D,E</TD> | |
| 102 | +<TD ALIGN=CENTER>D,E</TD> | |
| 103 | +<TD ALIGN=CENTER>D,E</TD> | |
| 104 | +</TR> | |
| 105 | + | |
| 106 | +<TR> | |
| 107 | +<TD>A-law </TD> | |
| 108 | +<TD ALIGN=CENTER>D</TD> | |
| 109 | +<TD ALIGN=CENTER>D</TD> | |
| 110 | +<TD ALIGN=CENTER>D</TD> | |
| 111 | +</TR> | |
| 112 | + | |
| 113 | +<TR> | |
| 114 | +<TD>IMA4 ADPCM</TD> | |
| 115 | +<TD ALIGN=CENTER>D,E</TD> | |
| 116 | +<TD ALIGN=CENTER>D,E</TD> | |
| 117 | +<TD ALIGN=CENTER>D,E</TD> | |
| 118 | +</TR> | |
| 119 | + | |
| 120 | +<TR> | |
| 121 | +<TD><B>AVI (.avi)</B></TD> | |
| 122 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 123 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 124 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 125 | +</TR> | |
| 126 | + | |
| 127 | +<TR> | |
| 128 | +<TD>Audio: 8-bit mono/stereo linear </TD> | |
| 129 | +<TD ALIGN=CENTER>D,E</TD> | |
| 130 | +<TD ALIGN=CENTER>D,E</TD> | |
| 131 | +<TD ALIGN=CENTER>D,E</TD> | |
| 132 | +</TR> | |
| 133 | + | |
| 134 | +<TR> | |
| 135 | +<TD>Audio: 16-bit mono/stereo linear </TD> | |
| 136 | +<TD ALIGN=CENTER>D,E</TD> | |
| 137 | +<TD ALIGN=CENTER>D,E</TD> | |
| 138 | +<TD ALIGN=CENTER>D,E</TD> | |
| 139 | +</TR> | |
| 140 | + | |
| 141 | +<TR> | |
| 142 | +<TD>Audio: DVI ADPCM compressed </TD> | |
| 143 | +<TD ALIGN=CENTER>D,E</TD> | |
| 144 | +<TD ALIGN=CENTER>D,E</TD> | |
| 145 | +<TD ALIGN=CENTER>D,E</TD> | |
| 146 | +</TR> | |
| 147 | + | |
| 148 | +<TR> | |
| 149 | +<TD>Audio: G.711 (U-law) </TD> | |
| 150 | +<TD ALIGN=CENTER>D,E</TD> | |
| 151 | +<TD ALIGN=CENTER>D,E</TD> | |
| 152 | +<TD ALIGN=CENTER>D,E</TD> | |
| 153 | +</TR> | |
| 154 | + | |
| 155 | +<TR> | |
| 156 | +<TD>Audio: A-law </TD> | |
| 157 | +<TD ALIGN=CENTER>D</TD> | |
| 158 | +<TD ALIGN=CENTER>D</TD> | |
| 159 | +<TD ALIGN=CENTER>D</TD> | |
| 160 | +</TR> | |
| 161 | + | |
| 162 | +<TR> | |
| 163 | +<TD>Audio: GSM mono</TD> | |
| 164 | +<TD ALIGN=CENTER>D,E</TD> | |
| 165 | +<TD ALIGN=CENTER>D,E</TD> | |
| 166 | +<TD ALIGN=CENTER>D,E</TD> | |
| 167 | +</TR> | |
| 168 | + | |
| 169 | +<TR> | |
| 170 | +<TD>Audio: ACM**</TD> | |
| 171 | +<TD ALIGN=CENTER>-</TD> | |
| 172 | +<TD ALIGN=CENTER>-</TD> | |
| 173 | +<TD ALIGN=CENTER>D,E</TD> | |
| 174 | +</TR> | |
| 175 | + | |
| 176 | +<TR> | |
| 177 | +<TD>Video: Cinepak </TD> | |
| 178 | +<TD ALIGN=CENTER>D</TD> | |
| 179 | +<TD ALIGN=CENTER>D,E</TD> | |
| 180 | +<TD ALIGN=CENTER>D</TD> | |
| 181 | +</TR> | |
| 182 | + | |
| 183 | +<TR> | |
| 184 | +<TD>Video: MJPEG (422)</TD> | |
| 185 | +<TD ALIGN=CENTER>D</TD> | |
| 186 | +<TD ALIGN=CENTER>D,E</TD> | |
| 187 | +<TD ALIGN=CENTER>D,E </TD> | |
| 188 | +</TR> | |
| 189 | + | |
| 190 | +<TR> | |
| 191 | +<TD>Video: RGB</TD> | |
| 192 | +<TD ALIGN=CENTER>D,E</TD> | |
| 193 | +<TD ALIGN=CENTER>D,E</TD> | |
| 194 | +<TD ALIGN=CENTER>D,E </TD> | |
| 195 | +</TR> | |
| 196 | + | |
| 197 | +<TR> | |
| 198 | +<TD>Video: YUV</TD> | |
| 199 | +<TD ALIGN=CENTER>D,E</TD> | |
| 200 | +<TD ALIGN=CENTER>D,E</TD> | |
| 201 | +<TD ALIGN=CENTER>D,E </TD> | |
| 202 | +</TR> | |
| 203 | + | |
| 204 | +<TR> | |
| 205 | +<TD>Video: VCM**</TD> | |
| 206 | +<TD ALIGN=CENTER>-</TD> | |
| 207 | +<TD ALIGN=CENTER>-</TD> | |
| 208 | +<TD ALIGN=CENTER>D,E</TD> | |
| 209 | +</TR> | |
| 210 | + | |
| 211 | +<TR> | |
| 212 | +<TD><B>GSM (.gsm)</B></TD> | |
| 213 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 214 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 215 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 216 | +</TR> | |
| 217 | + | |
| 218 | +<TR> | |
| 219 | +<TD>GSM mono audio</TD> | |
| 220 | +<TD ALIGN=CENTER>D,E</TD> | |
| 221 | +<TD ALIGN=CENTER>D,E</TD> | |
| 222 | +<TD ALIGN=CENTER>D,E</TD> | |
| 223 | +</TR> | |
| 224 | + | |
| 225 | +<TR> | |
| 226 | +<TD><B>HotMedia (.mvr)</B></TD> | |
| 227 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 228 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 229 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 230 | +</TR> | |
| 231 | + | |
| 232 | +<TR> | |
| 233 | +<TD>IBM HotMedia</TD> | |
| 234 | +<TD ALIGN=CENTER>D</TD> | |
| 235 | +<TD ALIGN=CENTER>D</TD> | |
| 236 | +<TD ALIGN=CENTER>D</TD> | |
| 237 | +</TR> | |
| 238 | + | |
| 239 | +<TR> | |
| 240 | +<TD><B>MIDI (.mid)</B></TD> | |
| 241 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 242 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 243 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 244 | +</TR> | |
| 245 | + | |
| 246 | +<TR> | |
| 247 | +<TD>Type 1 & 2 MIDI</TD> | |
| 248 | +<TD ALIGN=CENTER>-</TD> | |
| 249 | +<TD ALIGN=CENTER>D</TD> | |
| 250 | +<TD ALIGN=CENTER>D</TD> | |
| 251 | +</TR> | |
| 252 | + | |
| 253 | +<TR> | |
| 254 | +<TD><B>MPEG-1 Video (.mpg)</B></TD> | |
| 255 | +<TD ALIGN=CENTER><B>-</B></TD> | |
| 256 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 257 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 258 | +</TR> | |
| 259 | + | |
| 260 | +<TR> | |
| 261 | +<TD>Multiplexed System stream </TD> | |
| 262 | +<TD ALIGN=CENTER>-</TD> | |
| 263 | +<TD ALIGN=CENTER>D</TD> | |
| 264 | +<TD ALIGN=CENTER>D</TD> | |
| 265 | +</TR> | |
| 266 | + | |
| 267 | +<TR> | |
| 268 | +<TD>Video-only stream </TD> | |
| 269 | +<TD ALIGN=CENTER>-</TD> | |
| 270 | +<TD ALIGN=CENTER>D</TD> | |
| 271 | +<TD ALIGN=CENTER>D</TD> | |
| 272 | +</TR> | |
| 273 | + | |
| 274 | +<TR> | |
| 275 | +<TD><B>MPEG Layer II Audio (.mp2)</B></TD> | |
| 276 | +<TD ALIGN=CENTER><B>read only</B></TD> | |
| 277 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 278 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 279 | +</TR> | |
| 280 | + | |
| 281 | +<TR> | |
| 282 | +<TD>MPEG layer 1, 2 audio </TD> | |
| 283 | +<TD ALIGN=CENTER>D</TD> | |
| 284 | +<TD ALIGN=CENTER>D,E</TD> | |
| 285 | +<TD ALIGN=CENTER>D,E</TD> | |
| 286 | +</TR> | |
| 287 | + | |
| 288 | +<TR> | |
| 289 | +<TD><B>QuickTime (.mov)</B></TD> | |
| 290 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 291 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 292 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 293 | +</TR> | |
| 294 | + | |
| 295 | +<TR> | |
| 296 | +<TD>Audio: 8 bits mono/stereo linear </TD> | |
| 297 | +<TD ALIGN=CENTER>D,E</TD> | |
| 298 | +<TD ALIGN=CENTER>D,E</TD> | |
| 299 | +<TD ALIGN=CENTER>D,E</TD> | |
| 300 | +</TR> | |
| 301 | + | |
| 302 | +<TR> | |
| 303 | +<TD>Audio: 16 bits mono/stereo linear</TD> | |
| 304 | +<TD ALIGN=CENTER>D,E</TD> | |
| 305 | +<TD ALIGN=CENTER>D,E</TD> | |
| 306 | +<TD ALIGN=CENTER>D,E</TD> | |
| 307 | +</TR> | |
| 308 | + | |
| 309 | +<TR> | |
| 310 | +<TD>Audio: G.711 (U-law) </TD> | |
| 311 | +<TD ALIGN=CENTER>D,E</TD> | |
| 312 | +<TD ALIGN=CENTER>D,E</TD> | |
| 313 | +<TD ALIGN=CENTER>D,E</TD> | |
| 314 | +</TR> | |
| 315 | + | |
| 316 | +<TR> | |
| 317 | +<TD>Audio: A-law </TD> | |
| 318 | +<TD ALIGN=CENTER>D</TD> | |
| 319 | +<TD ALIGN=CENTER>D</TD> | |
| 320 | +<TD ALIGN=CENTER>D</TD> | |
| 321 | +</TR> | |
| 322 | + | |
| 323 | +<TR> | |
| 324 | +<TD>Audio: GSM mono </TD> | |
| 325 | +<TD ALIGN=CENTER>D,E</TD> | |
| 326 | +<TD ALIGN=CENTER>D,E</TD> | |
| 327 | +<TD ALIGN=CENTER>D,E</TD> | |
| 328 | +</TR> | |
| 329 | + | |
| 330 | +<TR> | |
| 331 | +<TD>Audio: IMA4 ADPCM </TD> | |
| 332 | +<TD ALIGN=CENTER>D,E</TD> | |
| 333 | +<TD ALIGN=CENTER>D,E</TD> | |
| 334 | +<TD ALIGN=CENTER>D,E</TD> | |
| 335 | +</TR> | |
| 336 | + | |
| 337 | +<TR> | |
| 338 | +<TD>Video: Cinepak </TD> | |
| 339 | +<TD ALIGN=CENTER>D</TD> | |
| 340 | +<TD ALIGN=CENTER>D,E</TD> | |
| 341 | +<TD ALIGN=CENTER>D</TD> | |
| 342 | +</TR> | |
| 343 | + | |
| 344 | +<TR> | |
| 345 | +<TD>Video: H.261</TD> | |
| 346 | +<TD ALIGN=CENTER>-</TD> | |
| 347 | +<TD ALIGN=CENTER>D</TD> | |
| 348 | +<TD ALIGN=CENTER>D</TD> | |
| 349 | +</TR> | |
| 350 | + | |
| 351 | +<TR> | |
| 352 | +<TD>Video: H.263 </TD> | |
| 353 | +<TD ALIGN=CENTER>D</TD> | |
| 354 | +<TD ALIGN=CENTER>D,E</TD> | |
| 355 | +<TD ALIGN=CENTER>D,E</TD> | |
| 356 | +</TR> | |
| 357 | + | |
| 358 | +<TR> | |
| 359 | +<TD>Video: JPEG (420, 422, 444) </TD> | |
| 360 | +<TD ALIGN=CENTER>D</TD> | |
| 361 | +<TD ALIGN=CENTER>D,E</TD> | |
| 362 | +<TD ALIGN=CENTER>D,E</TD> | |
| 363 | +</TR> | |
| 364 | + | |
| 365 | +<TR> | |
| 366 | +<TD>Video: RGB</TD> | |
| 367 | +<TD ALIGN=CENTER>D,E</TD> | |
| 368 | +<TD ALIGN=CENTER>D,E</TD> | |
| 369 | +<TD ALIGN=CENTER>D,E</TD> | |
| 370 | +</TR> | |
| 371 | + | |
| 372 | +<TR> | |
| 373 | +<TD><B>Sun Audio (.au)</B></TD> | |
| 374 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 375 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 376 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 377 | +</TR> | |
| 378 | + | |
| 379 | +<TR> | |
| 380 | +<TD>8 bits mono/stereo linear </TD> | |
| 381 | +<TD ALIGN=CENTER>D,E</TD> | |
| 382 | +<TD ALIGN=CENTER>D,E</TD> | |
| 383 | +<TD ALIGN=CENTER>D,E</TD> | |
| 384 | +</TR> | |
| 385 | + | |
| 386 | +<TR> | |
| 387 | +<TD>16 bits mono/stereo linear </TD> | |
| 388 | +<TD ALIGN=CENTER>D,E</TD> | |
| 389 | +<TD ALIGN=CENTER>D,E</TD> | |
| 390 | +<TD ALIGN=CENTER>D,E</TD> | |
| 391 | +</TR> | |
| 392 | + | |
| 393 | +<TR> | |
| 394 | +<TD>G.711 (U-law)</TD> | |
| 395 | +<TD ALIGN=CENTER>D,E</TD> | |
| 396 | +<TD ALIGN=CENTER>D,E</TD> | |
| 397 | +<TD ALIGN=CENTER>D,E</TD> | |
| 398 | +</TR> | |
| 399 | + | |
| 400 | +<TR> | |
| 401 | +<TD>A-law </TD> | |
| 402 | +<TD ALIGN=CENTER>D</TD> | |
| 403 | +<TD ALIGN=CENTER>D</TD> | |
| 404 | +<TD ALIGN=CENTER>D</TD> | |
| 405 | +</TR> | |
| 406 | + | |
| 407 | +<TR> | |
| 408 | +<TD><B>Wave (.wav)</B></TD> | |
| 409 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 410 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 411 | +<TD ALIGN=CENTER><B>read/write</B></TD> | |
| 412 | +</TR> | |
| 413 | + | |
| 414 | +<TR> | |
| 415 | +<TD>8-bit mono/stereo linear </TD> | |
| 416 | +<TD ALIGN=CENTER>D,E</TD> | |
| 417 | +<TD ALIGN=CENTER>D,E</TD> | |
| 418 | +<TD ALIGN=CENTER>D,E</TD> | |
| 419 | +</TR> | |
| 420 | + | |
| 421 | +<TR> | |
| 422 | +<TD>16-bit mono/stereo linear </TD> | |
| 423 | +<TD ALIGN=CENTER>D,E</TD> | |
| 424 | +<TD ALIGN=CENTER>D,E</TD> | |
| 425 | +<TD ALIGN=CENTER>D,E</TD> | |
| 426 | +</TR> | |
| 427 | + | |
| 428 | +<TR> | |
| 429 | +<TD>G.711 (U-law)</TD> | |
| 430 | +<TD ALIGN=CENTER>D,E</TD> | |
| 431 | +<TD ALIGN=CENTER>D,E</TD> | |
| 432 | +<TD ALIGN=CENTER>D,E</TD> | |
| 433 | +</TR> | |
| 434 | + | |
| 435 | +<TR> | |
| 436 | +<TD>A-law </TD> | |
| 437 | +<TD ALIGN=CENTER>D</TD> | |
| 438 | +<TD ALIGN=CENTER>D</TD> | |
| 439 | +<TD ALIGN=CENTER>D</TD> | |
| 440 | +</TR> | |
| 441 | + | |
| 442 | +<TR> | |
| 443 | +<TD>GSM mono </TD> | |
| 444 | +<TD ALIGN=CENTER>D,E</TD> | |
| 445 | +<TD ALIGN=CENTER>D,E</TD> | |
| 446 | +<TD ALIGN=CENTER>D,E</TD> | |
| 447 | +</TR> | |
| 448 | + | |
| 449 | +<TR> | |
| 450 | +<TD>DVI ADPCM</TD> | |
| 451 | +<TD ALIGN=CENTER>D,E</TD> | |
| 452 | +<TD ALIGN=CENTER>D,E </TD> | |
| 453 | +<TD ALIGN=CENTER>D,E</TD> | |
| 454 | +</TR> | |
| 455 | + | |
| 456 | +<TR> | |
| 457 | +<TD>MS ADPCM</TD> | |
| 458 | +<TD ALIGN=CENTER>D</TD> | |
| 459 | +<TD ALIGN=CENTER>D </TD> | |
| 460 | +<TD ALIGN=CENTER>D</TD> | |
| 461 | +</TR> | |
| 462 | + | |
| 463 | +<TR> | |
| 464 | +<TD>ACM**</TD> | |
| 465 | +<TD ALIGN=CENTER>-</TD> | |
| 466 | +<TD ALIGN=CENTER>-</TD> | |
| 467 | +<TD ALIGN=CENTER>D,E</TD> | |
| 468 | +</TR> | |
| 469 | +</TABLE> | |
| 470 | + | |
| 471 | +<P>Notes: | |
| 472 | + | |
| 473 | +<UL> | |
| 474 | + | |
| 475 | +<LI> | |
| 476 | +ACM** - Window's Audio Compression Manager | |
| 477 | +support. Tested for these formats: A-law, GSM610, MSNAudio, MSADPCM, Truespeech, | |
| 478 | +mp3, PCM, Voxware AC8, Voxware AC10.</LI> | |
| 479 | + | |
| 480 | +<LI> | |
| 481 | +VCM** - Window's Video Compression Manager | |
| 482 | +support. Tested for these formats: IV41, IV51, VGPX, WINX, YV12, | |
| 483 | +I263, CRAM, MPG4.</LI> | |
| 484 | +</UL> | |
| 485 | + | |
| 486 | +<p> | |
| 487 | +<A NAME="RTPFormats"></A> | |
| 488 | +<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#CC9966" NOSAVE > | |
| 489 | +<TR> | |
| 490 | +<TD><FONT SIZE=+2>RTP Formats</FONT></TD> | |
| 491 | +</TR> | |
| 492 | +</TABLE> | |
| 493 | + | |
| 494 | +<p> | |
| 495 | +The JMF 2.1.1 Reference Implementation can receive and transmit the | |
| 496 | +following RTP formats: | |
| 497 | + | |
| 498 | +<ul> | |
| 499 | +<LI> | |
| 500 | +<b>R</b> indicates that the format can be decoded and presented.</LI> | |
| 501 | +<LI> | |
| 502 | +<b>T</b> indicates that media streams can be encoded and transmitted in the format.</LI> | |
| 503 | +</ul> | |
| 504 | + | |
| 505 | +<p> | |
| 506 | +<TABLE BORDER > | |
| 507 | + | |
| 508 | +<TD ALIGN=CENTER><B><FONT SIZE=+1>Media Type</FONT></B></TD> | |
| 509 | + | |
| 510 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>RTP</FONT><br> | |
| 511 | +<FONT SIZE=-1>Payload</FONT></B></TD> | |
| 512 | + | |
| 513 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 514 | +<FONT SIZE=-1>Cross Platform Version</FONT></B></TD> | |
| 515 | + | |
| 516 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 517 | +<FONT SIZE=-1>Solaris Performance Pack</FONT></B></TD> | |
| 518 | + | |
| 519 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 520 | +<FONT SIZE=-1>Windows Performance Pack</FONT></B></TD> | |
| 521 | + | |
| 522 | +</TR> | |
| 523 | + | |
| 524 | +<TR> | |
| 525 | +<TD>Audio: G.711 (U-law) 8 kHz </TD> | |
| 526 | +<TD ALIGN=CENTER>0</TD> | |
| 527 | +<TD ALIGN=CENTER>R,T</TD> | |
| 528 | +<TD ALIGN=CENTER>R,T</TD> | |
| 529 | +<TD ALIGN=CENTER>R,T</TD> | |
| 530 | +</TR> | |
| 531 | + | |
| 532 | +<TR> | |
| 533 | +<TD>Audio: GSM mono </TD> | |
| 534 | +<TD ALIGN=CENTER>3</TD> | |
| 535 | +<TD ALIGN=CENTER>R,T</TD> | |
| 536 | +<TD ALIGN=CENTER>R,T</TD> | |
| 537 | +<TD ALIGN=CENTER>R,T</TD> | |
| 538 | +</TR> | |
| 539 | + | |
| 540 | +<TR> | |
| 541 | +<TD>Audio: G.723 mono</TD> | |
| 542 | +<TD ALIGN=CENTER>4</TD> | |
| 543 | +<TD ALIGN=CENTER>R</TD> | |
| 544 | +<TD ALIGN=CENTER>R,T</TD> | |
| 545 | +<TD ALIGN=CENTER>R,T</TD> | |
| 546 | +</TR> | |
| 547 | + | |
| 548 | +<TR> | |
| 549 | +<TD>Audio: 4-bit mono DVI 8 kHz </TD> | |
| 550 | +<TD ALIGN=CENTER>5</TD> | |
| 551 | +<TD ALIGN=CENTER>R,T</TD> | |
| 552 | +<TD ALIGN=CENTER>R,T</TD> | |
| 553 | +<TD ALIGN=CENTER>R,T</TD> | |
| 554 | +</TR> | |
| 555 | + | |
| 556 | +<TR> | |
| 557 | +<TD>Audio: 4-bit mono DVI 11.025 kHz </TD> | |
| 558 | +<TD ALIGN=CENTER>16</TD> | |
| 559 | +<TD ALIGN=CENTER>R,T</TD> | |
| 560 | +<TD ALIGN=CENTER>R,T</TD> | |
| 561 | +<TD ALIGN=CENTER>R,T</TD> | |
| 562 | +</TR> | |
| 563 | + | |
| 564 | +<TR> | |
| 565 | +<TD>Audio: 4-bit mono DVI 22.05 kHz </TD> | |
| 566 | +<TD ALIGN=CENTER>17</TD> | |
| 567 | +<TD ALIGN=CENTER>R,T</TD> | |
| 568 | +<TD ALIGN=CENTER>R,T</TD> | |
| 569 | +<TD ALIGN=CENTER>R,T</TD> | |
| 570 | +</TR> | |
| 571 | + | |
| 572 | +<TR> | |
| 573 | +<TD>Audio: MPEG Layer I, II </TD> | |
| 574 | +<TD ALIGN=CENTER>14</TD> | |
| 575 | +<TD ALIGN=CENTER>R,T</TD> | |
| 576 | +<TD ALIGN=CENTER>R,T</TD> | |
| 577 | +<TD ALIGN=CENTER>R,T</TD> | |
| 578 | +</TR> | |
| 579 | + | |
| 580 | +<!-- REMOVE UNTIL JMF 2.1 FCS - NEED LEGAL PERMISSION TO USE | |
| 581 | +<TR> | |
| 582 | +<TD>Audio: G.728 mono</TD> | |
| 583 | +<TD ALIGN=CENTER>15</TD> | |
| 584 | +<TD ALIGN=CENTER>R,T</TD> | |
| 585 | +<TD ALIGN=CENTER>R,T</TD> | |
| 586 | +<TD ALIGN=CENTER>R,T</TD> | |
| 587 | +</TR> | |
| 588 | +---> | |
| 589 | + | |
| 590 | +<!-- REMOVE UNTIL JMF 2.X FCS - NEED LEGAL PERMISSION TO USE | |
| 591 | +<TR> | |
| 592 | +<TD>Audio: G.729 mono</TD> | |
| 593 | +<TD ALIGN=CENTER>18</TD> | |
| 594 | +<TD ALIGN=CENTER>R,T</TD> | |
| 595 | +<TD ALIGN=CENTER>R,T</TD> | |
| 596 | +<TD ALIGN=CENTER>R,T</TD> | |
| 597 | +</TR> | |
| 598 | +---> | |
| 599 | + | |
| 600 | +<TR> | |
| 601 | +<TD>Video: JPEG (420, 422, 444)* </TD> | |
| 602 | +<TD ALIGN=CENTER>26</TD> | |
| 603 | +<TD ALIGN=CENTER>R</TD> | |
| 604 | +<TD ALIGN=CENTER>R,T</TD> | |
| 605 | +<TD ALIGN=CENTER>R,T</TD> | |
| 606 | +</TR> | |
| 607 | + | |
| 608 | +<TR> | |
| 609 | +<TD>Video: H.261 </TD> | |
| 610 | +<TD ALIGN=CENTER>31</TD> | |
| 611 | +<TD ALIGN=CENTER>-</TD> | |
| 612 | +<TD ALIGN=CENTER>R</TD> | |
| 613 | +<TD ALIGN=CENTER>R</TD> | |
| 614 | +</TR> | |
| 615 | + | |
| 616 | +<TR> | |
| 617 | +<TD>Video: H.263**</TD> | |
| 618 | +<TD ALIGN=CENTER>34</TD> | |
| 619 | +<TD ALIGN=CENTER>Mode A Only</TD> | |
| 620 | +<TD ALIGN=CENTER>R,T</TD> | |
| 621 | +<TD ALIGN=CENTER>R,T</TD> | |
| 622 | +</TR> | |
| 623 | + | |
| 624 | +<TR> | |
| 625 | +<TD>Video: MPEG-I***</TD> | |
| 626 | +<TD ALIGN=CENTER>32</TD> | |
| 627 | +<TD ALIGN=CENTER>T</TD> | |
| 628 | +<TD ALIGN=CENTER>R,T</TD> | |
| 629 | +<TD ALIGN=CENTER>R,T</TD> | |
| 630 | +</TR> | |
| 631 | + | |
| 632 | +</table> | |
| 633 | + | |
| 634 | +<P>* JPEG/RTP can only be transmitted in video dimensions | |
| 635 | +that are in multiple of 8 pixels. | |
| 636 | +</p> | |
| 637 | + | |
| 638 | +<P>** H.263/RTP can only be transmitted in 3 different video dimensions: | |
| 639 | +SQCIF (128x96), QCIF (176x144) and CIF (352x288). | |
| 640 | +</p> | |
| 641 | + | |
| 642 | +<P>*** MPEG/RTP video can only be transmitted from pre-encoded MPEG | |
| 643 | +content, i.e. from an MPEG-encoded file or MPEG enabled capture source. | |
| 644 | +Real-time software MPEG encoding is not feasible for RTP transmission. | |
| 645 | +</p> | |
| 646 | + | |
| 647 | +<p> | |
| 648 | +<A NAME="Capturers"></A> | |
| 649 | +<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#CC9966" NOSAVE > | |
| 650 | +<TR> | |
| 651 | +<TD><FONT SIZE=+2>Capture Devices</FONT></TD> | |
| 652 | +</TR> | |
| 653 | +</TABLE> | |
| 654 | +<p> | |
| 655 | +<p> | |
| 656 | +The JMF 2.1.1 Reference Implementation supports SunVideo / | |
| 657 | +SunVideoPlus capture devices on Solaris. On Windows, most capture | |
| 658 | +devices that have VFW drivers are supported. The table below lists | |
| 659 | +the capture devices known to work with this release. | |
| 660 | + | |
| 661 | +<p> | |
| 662 | +<TABLE BORDER > | |
| 663 | +<TR> | |
| 664 | +<TD ALIGN=CENTER><B><FONT SIZE=+1>Capturer</FONT></B></TD> | |
| 665 | + | |
| 666 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 667 | +<FONT SIZE=-1>Cross Platform Version</FONT></B></TD> | |
| 668 | + | |
| 669 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 670 | +<FONT SIZE=-1>Solaris Performance Pack</FONT></B></TD> | |
| 671 | + | |
| 672 | +<TH ALIGN=CENTER><B><FONT SIZE=+1>JMF 2.1.1</FONT><br> | |
| 673 | +<FONT SIZE=-1>Windows Performance Pack</FONT></B></TD> | |
| 674 | + | |
| 675 | +</TR> | |
| 676 | + | |
| 677 | +<TR> | |
| 678 | +<TD>JavaSound (16-bit, 44100, 22050, 11025Hz, 8000Hz linear)</TD> | |
| 679 | +<TD ALIGN=CENTER><B>-</B></TD> | |
| 680 | +<TD ALIGN=CENTER><B>X</B></TD> | |
| 681 | +<TD ALIGN=CENTER><B>X</B></TD> | |
| 682 | +</TR> | |
| 683 | + | |
| 684 | +<TR> | |
| 685 | +<TD>SunVideo</TD> | |
| 686 | +<TD ALIGN=CENTER>-</TD> | |
| 687 | +<TD ALIGN=CENTER>X</TD> | |
| 688 | +<TD ALIGN=CENTER>-</TD> | |
| 689 | +</TR> | |
| 690 | + | |
| 691 | +<TR> | |
| 692 | +<TD>SunVideoPlus</TD> | |
| 693 | +<TD ALIGN=CENTER>-</TD> | |
| 694 | +<TD ALIGN=CENTER>X</TD> | |
| 695 | +<TD ALIGN=CENTER>-</TD> | |
| 696 | +</TR> | |
| 697 | + | |
| 698 | +<TR> | |
| 699 | +<TD>VFW</TD> | |
| 700 | +<TD ALIGN=CENTER>-</TD> | |
| 701 | +<TD ALIGN=CENTER>-</TD> | |
| 702 | +<TD ALIGN=CENTER>X</TD> | |
| 703 | +</TR> | |
| 704 | + | |
| 705 | +<TR> | |
| 706 | +<TD>Intel Create & Share</TD> | |
| 707 | +<TD ALIGN=CENTER>-</TD> | |
| 708 | +<TD ALIGN=CENTER>-</TD> | |
| 709 | +<TD ALIGN=CENTER>Win9x</TD> | |
| 710 | +</TR> | |
| 711 | + | |
| 712 | +<TR> | |
| 713 | +<TD>Diamond Supra Video Kit; Share</TD> | |
| 714 | +<TD ALIGN=CENTER>-</TD> | |
| 715 | +<TD ALIGN=CENTER>-</TD> | |
| 716 | +<TD ALIGN=CENTER>Win98</TD> | |
| 717 | +</TR> | |
| 718 | + | |
| 719 | +<TR> | |
| 720 | +<TD>QuickCam VC (camera)</TD> | |
| 721 | +<TD ALIGN=CENTER>-</TD> | |
| 722 | +<TD ALIGN=CENTER>-</TD> | |
| 723 | +<TD ALIGN=CENTER>WinNT</TD> | |
| 724 | +</TR> | |
| 725 | + | |
| 726 | +<TR> | |
| 727 | +<TD>e-cam (camera)</TD> | |
| 728 | +<TD ALIGN=CENTER>-</TD> | |
| 729 | +<TD ALIGN=CENTER>-</TD> | |
| 730 | +<TD ALIGN=CENTER>WinNT, 9X</TD> | |
| 731 | +</TR> | |
| 732 | + | |
| 733 | +<TR> | |
| 734 | +<TD>Winnow Videum</TD> | |
| 735 | +<TD ALIGN=CENTER>-</TD> | |
| 736 | +<TD ALIGN=CENTER>-</TD> | |
| 737 | +<TD ALIGN=CENTER>WinNT, 9X</TD> | |
| 738 | +</TR> | |
| 739 | + | |
| 740 | +<TR> | |
| 741 | +<TD>Creative Web Cam II</TD> | |
| 742 | +<TD ALIGN=CENTER>-</TD> | |
| 743 | +<TD ALIGN=CENTER>-</TD> | |
| 744 | +<TD ALIGN=CENTER>Win9X</TD> | |
| 745 | +</TR> | |
| 746 | + | |
| 747 | +<TR> | |
| 748 | +<TD>Miro Video DC30</TD> | |
| 749 | +<TD ALIGN=CENTER>-</TD> | |
| 750 | +<TD ALIGN=CENTER>-</TD> | |
| 751 | +<TD ALIGN=CENTER>Win9X</TD> | |
| 752 | +</TR> | |
| 753 | + | |
| 754 | +<TR> | |
| 755 | +<TD>Iomega Buz</TD> | |
| 756 | +<TD ALIGN=CENTER>-</TD> | |
| 757 | +<TD ALIGN=CENTER>-</TD> | |
| 758 | +<TD ALIGN=CENTER>Win9X</TD> | |
| 759 | +</TR> | |
| 760 | + | |
| 761 | +<TR> | |
| 762 | +<TD>QuickCam Home USB (Camera)</TD> | |
| 763 | +<TD ALIGN=CENTER>-</TD> | |
| 764 | +<TD ALIGN=CENTER>-</TD> | |
| 765 | +<TD ALIGN=CENTER>Win98</TD> | |
| 766 | +</TR> | |
| 767 | + | |
| 768 | +<TR> | |
| 769 | +<TD>Smart Video Recorder III</TD> | |
| 770 | +<TD ALIGN=CENTER>-</TD> | |
| 771 | +<TD ALIGN=CENTER>-</TD> | |
| 772 | +<TD ALIGN=CENTER>Win9X</TD> | |
| 773 | +</TR> | |
| 774 | + | |
| 775 | +</TABLE> | |
| 776 | + | |
| 777 | +<!-- end main page content --> | |
| 778 | + | |
| 779 | +</BODY> | |
| 780 | +</HTML> | ... | ... |
Projeto PPB-Ginga/Plaver Framework/Jars_JMF2.1.1/doc/readme.html
0 → 100644
| ... | ... | @@ -0,0 +1,523 @@ |
| 1 | +<HTML> | |
| 2 | +<HEAD> | |
| 3 | + <TITLE>JMF 2.1.1c README</TITLE> | |
| 4 | +</HEAD> | |
| 5 | + | |
| 6 | +<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#A11430" VLINK="#333366" ALINK="#FF0000"> | |
| 7 | + | |
| 8 | +<center> | |
| 9 | +<H1> | |
| 10 | +Java<sup><font size="-2">TM</font></sup> Media Framework 2.1.1c API<BR> | |
| 11 | +README and BINARY CODE LICENSE | |
| 12 | +</H1> | |
| 13 | +</center> | |
| 14 | + | |
| 15 | +<h3> | |
| 16 | +Table of Contents | |
| 17 | +</h3> | |
| 18 | +<ul> | |
| 19 | +<li><a href="#intro">Introduction</a> | |
| 20 | +<li><a href="#install">Quick Install</a> | |
| 21 | +<li><a href="#security">Security Note</a> | |
| 22 | +<li><a href="#contents">JMF Install Contents</a> | |
| 23 | +<li><a href="#distribution">Distributing JMF with your Java software</a> | |
| 24 | +<li><a href="#license">JMF Binary Code License</a> | |
| 25 | +</ul> | |
| 26 | + | |
| 27 | +<!----------------------------------------------------------------------> | |
| 28 | +<a name="intro"></a> | |
| 29 | +<hr> | |
| 30 | +<h3> | |
| 31 | +Introduction | |
| 32 | +</h3> | |
| 33 | + | |
| 34 | +<P>The Java<sup><font size="-2">TM</font></sup> Media Framework (JMF) | |
| 35 | +is an application programming interface (API) for incorporating media | |
| 36 | +data such as audio and video into Java applications and applets. It is | |
| 37 | +specifically designed to take advantage of Java platform features. | |
| 38 | + | |
| 39 | +<P>The JMF 1.0 API (the Java Media Player API) enables programmers to | |
| 40 | +develop Java programs for playback of time-based media. The JMF 2.0 API | |
| 41 | +extends the framework by providing support for capturing and storing | |
| 42 | +media data, controlling the type of processing that is performed during | |
| 43 | +playback, and performing custom processing on media data streams. In | |
| 44 | +addition, JMF 2.0 defines a plug-in API that enables advanced | |
| 45 | +developers and technology providers to more easily customize and extend | |
| 46 | +JMF functionality. | |
| 47 | + | |
| 48 | +<p> | |
| 49 | +The latest implemenation of this API from Sun is JMF 2.1.1c, | |
| 50 | +which includes several improvements to RTP/RTSP components | |
| 51 | +and numerous bug-fixes. | |
| 52 | + | |
| 53 | +<p> | |
| 54 | +You can download all of the documentation for this | |
| 55 | +release, including the setup information and sample code, from: | |
| 56 | +<blockquote> | |
| 57 | +<code> | |
| 58 | + <a href="http://java.sun.com/products/java-media/jmf/2.1.1/documentation.html"> | |
| 59 | + http://java.sun.com/products/java-media/jmf/2.1.1/documentation.html</a> | |
| 60 | +</code> | |
| 61 | +</blockquote> | |
| 62 | + | |
| 63 | +<!----------------------------------------------------------------------> | |
| 64 | +<a name="install"></a> | |
| 65 | +<hr> | |
| 66 | +<h3> | |
| 67 | +Quick Install</h3> | |
| 68 | + | |
| 69 | +<p> | |
| 70 | +Here are some quick instructions for installing JMF 2.1.1c. | |
| 71 | +Complete instructions for setting up and running JMF are | |
| 72 | +available from the JMF web site at: | |
| 73 | + | |
| 74 | +<blockquote> | |
| 75 | +<code> | |
| 76 | + <a href="http://java.sun.com/products/java-media/jmf/2.1.1/setup.html"> | |
| 77 | + http://java.sun.com/products/java-media/jmf/2.1.1/setup.html</a> | |
| 78 | +</code> | |
| 79 | +</blockquote> | |
| 80 | + | |
| 81 | +<h4> | |
| 82 | +Installing JMF 2.1.1c or JMF 2.1.1c for Web Servers (i.e. Java versions) | |
| 83 | +</h4> | |
| 84 | +<p> | |
| 85 | +The install package for Java clients is a zip file. Use a zip utility | |
| 86 | +to extract the files and then set your class path to reference the JMF | |
| 87 | +directory. For example: | |
| 88 | + | |
| 89 | +<blockquote> | |
| 90 | +<p> | |
| 91 | + On Solaris: | |
| 92 | +<blockquote> | |
| 93 | +<code> | |
| 94 | + setenv JMFHOME /home/someuser/JMF2.1.1 <br> | |
| 95 | + setenv CLASSPATH $JMFHOME/lib/jmf.jar:.:${CLASSPATH}: | |
| 96 | +</blockquote> | |
| 97 | +</code> | |
| 98 | +<p> | |
| 99 | +On AIX: | |
| 100 | +<blockquote> | |
| 101 | +<code> | |
| 102 | + setenv JMFHOME /usr/JMF2.1.1 <br> | |
| 103 | + setenv CLASSPATH $JMFHOME/lib/jmf.jar:.:${CLASSPATH}: | |
| 104 | +</blockquote> | |
| 105 | +</code> | |
| 106 | +<p> | |
| 107 | + On Windows: | |
| 108 | +<blockquote> | |
| 109 | +<code> | |
| 110 | + set JMFHOME=C:\JMF2.1.1 <br> | |
| 111 | + set CLASSPATH=%JMFHOME%\lib\jmf.jar;.;%CLASSPATH% | |
| 112 | +</blockquote> | |
| 113 | +</code> | |
| 114 | +</blockquote> | |
| 115 | + | |
| 116 | +<h4> | |
| 117 | +Installing JMF 2.1.1 with Solaris Performance Pack | |
| 118 | +</h4> | |
| 119 | +<p> | |
| 120 | +The Solaris install package contains an exectuable installation | |
| 121 | +program. Run the installation program to extract JMF and then set your | |
| 122 | +class path to reference the JMF directory. For example: | |
| 123 | + | |
| 124 | +<blockquote> | |
| 125 | +<code> | |
| 126 | + setenv JMFHOME /home/someuser/JMF2.1.1 <br> | |
| 127 | + setenv CLASSPATH $JMFHOME/lib/jmf.jar:$JMFHOME/lib/sound.jar:.:${CLASSPATH} | |
| 128 | +</code> | |
| 129 | +</blockquote> | |
| 130 | +<p> | |
| 131 | +You'll also need to set your LD_LIBRARY_PATH (shared libraries path) | |
| 132 | +to point to the JMF libraries. For example: | |
| 133 | +<blockquote> | |
| 134 | +<code> | |
| 135 | + setenv LD_LIBRARY_PATH $JMFHOME/lib:${LD_LIBRARY_PATH} | |
| 136 | +</code> | |
| 137 | +</blockquote> | |
| 138 | + | |
| 139 | +<h4> | |
| 140 | +Installing JMF 2.1.1 with Windows Performance Pack | |
| 141 | +</h4> | |
| 142 | +<p> | |
| 143 | +The Windows install package package contains an InstallShield | |
| 144 | +installation program. Run the installation program to extract JMF and | |
| 145 | +configure your environment variables.During installation, InstallShield | |
| 146 | +should automatically set up your CLASSPATH and PATH: | |
| 147 | + | |
| 148 | +<blockquote> | |
| 149 | +<code> | |
| 150 | + set CLASSPATH=%JMFHOME%\lib\jmf.jar;%JMFHOME%\lib\sound.jar;.;%CLASSPATH%<br> | |
| 151 | +<br> | |
| 152 | + set PATH=%WINDIR%\System32;%PATH% (on Windows NT) <br> | |
| 153 | + set PATH=%WINDIR%\System;%PATH% (on Windows 95/98) <br> | |
| 154 | +</blockquote> | |
| 155 | +</code> | |
| 156 | +<a name="verify"></a> | |
| 157 | +<h3>Verifying your Installation</h3> | |
| 158 | +<p> | |
| 159 | +To verify that JMF is set up properly on your system, use the JMF Diagnostics | |
| 160 | +applet at: | |
| 161 | + | |
| 162 | +<blockquote> | |
| 163 | +<code> | |
| 164 | + <a href="http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html"> | |
| 165 | + http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html</a> | |
| 166 | +</code> | |
| 167 | +</blockquote> | |
| 168 | + | |
| 169 | +<!----------------------------------------------------------------------> | |
| 170 | +<a name="security"></a> | |
| 171 | +<hr> | |
| 172 | +<h3> | |
| 173 | +Security Note</h3> | |
| 174 | + | |
| 175 | +<p> | |
| 176 | +During the installation, you will be asked two security related questions: | |
| 177 | +<ul> | |
| 178 | + <li><b>Permit recording from an applet</b> | |
| 179 | + <P> | |
| 180 | + If you agree to this, JMF will allow applets to capture audio and | |
| 181 | + video from the local capture devices. It is possible for a malicious | |
| 182 | + hidden applet on a web page to quietly record sounds or video from your | |
| 183 | + system and transmit the data back to a system on the internet. This is usually | |
| 184 | + a risk only if you visit unfamiliar web sites.<P> | |
| 185 | + You can disable or enable this | |
| 186 | + feature by running the JMFRegistry application (or choose Preferences from the | |
| 187 | + JMStudio File menu), modify the setting in the User Settings tab and commit the | |
| 188 | + changes.<P> | |
| 189 | + <li><b>Permit writing local files from an applet</b> | |
| 190 | + <P> | |
| 191 | + This is a greater security risk since a malicious applet can overwrite files | |
| 192 | + on your hard disk without your knowledge. Enable this feature only if you | |
| 193 | + need it for a specific application and are sure that you will not visit | |
| 194 | + any possibly malicious web sites.<P> | |
| 195 | + You can disable or enable this | |
| 196 | + feature by running the JMFRegistry application (or choose Preferences from the | |
| 197 | + JMStudio File menu), modify the setting in the User Settings tab and commit the | |
| 198 | + changes.<P> | |
| 199 | +</ul> | |
| 200 | + | |
| 201 | +<!----------------------------------------------------------------------> | |
| 202 | +<a name="contents"></a> | |
| 203 | +<hr> | |
| 204 | +<h3> | |
| 205 | +JMF Install Contents</h3> | |
| 206 | + | |
| 207 | +<p> | |
| 208 | +This release contains the following directories: | |
| 209 | + | |
| 210 | +<ul> | |
| 211 | +<li><b>bin</b> - contains scripts to launch a few java applications | |
| 212 | +<li><b>doc</b> - contains this file | |
| 213 | +<li><b>lib</b> - contains the compiled java classes and the compiled native | |
| 214 | +libraries for the JMF players | |
| 215 | +</ul> | |
| 216 | + | |
| 217 | + | |
| 218 | +<!----------------------------------------------------------------------> | |
| 219 | +<a name="distribution"></a> | |
| 220 | +<hr> | |
| 221 | +<h3> | |
| 222 | +Distributing JMF with your Java software</h3> | |
| 223 | + | |
| 224 | +Sun Microsystems allows vendors to distribute JMF 2.1.1c with their Java | |
| 225 | +software, as long as their software uses JMF 2.1.1c and provided they | |
| 226 | +follow the terms of the JMF 2.1.1c Binary Code License agreement. | |
| 227 | + | |
| 228 | +This document uses the term "vendors" to refer to licensees, | |
| 229 | +developers, and independent software vendors (ISVs) who | |
| 230 | +license and distribute the JMF with their Java programs. | |
| 231 | + | |
| 232 | +<h4> | |
| 233 | +REQUIRED versus OPTIONAL FILES | |
| 234 | +</h4> | |
| 235 | + | |
| 236 | +<p> | |
| 237 | +Vendors must follow the terms of the JMF Binary Code License agreement, | |
| 238 | +which includes these terms: | |
| 239 | + | |
| 240 | +<ul> | |
| 241 | +<li>Don't arbitrarily subset the JMF. You may, however, omit those | |
| 242 | +files that have been designated below as "optional" or that are | |
| 243 | +removable by using the JMF Customizer Tool provided. | |
| 244 | + | |
| 245 | +<li>Include in your product's license the provisions called out | |
| 246 | +in the JMF Binary Code License. | |
| 247 | + | |
| 248 | +</ul> | |
| 249 | + | |
| 250 | +<h4> | |
| 251 | +Bundling JMF | |
| 252 | +</h4> | |
| 253 | + | |
| 254 | +<p> | |
| 255 | +This Solaris and Windows version of the JMF comes with its own | |
| 256 | +installer that simplifies the installation of JMF. Other versions | |
| 257 | +of JMF are bundled in a zip file which needs to be unzipped to | |
| 258 | +be installed. | |
| 259 | + | |
| 260 | +<p> | |
| 261 | +Vendors have the option of delivering the Solaris, Windows, and/or zip | |
| 262 | +install binaries with their software, and having the user run them | |
| 263 | +separately, or to bundle JMF directly with the install procedures of | |
| 264 | +thier software. | |
| 265 | + | |
| 266 | +<h4> | |
| 267 | +Required Files | |
| 268 | +</h4> | |
| 269 | + | |
| 270 | +<p> | |
| 271 | +All the files and directories in the <b>lib</b> directory are required | |
| 272 | +unless they are listed under <b>Optional Files</b> below or are | |
| 273 | +removable using the JMF Customizer Tool. Likewise, this | |
| 274 | +<b>readme.html</b> is a required file and must always be included | |
| 275 | +with JMF 2.1.1c. | |
| 276 | + | |
| 277 | +<h4> | |
| 278 | +Optional Files | |
| 279 | +</h4> | |
| 280 | + | |
| 281 | +<p> | |
| 282 | +The following files are optional: | |
| 283 | + | |
| 284 | +<ul> | |
| 285 | +<li>doc/* | |
| 286 | +<li>bin/* | |
| 287 | +<li>lib/soundbank.gm | |
| 288 | +<li>lib/sound.jar | |
| 289 | +<li>lib/jsound.dll or lib/libjsound.so | |
| 290 | +</ul> | |
| 291 | + | |
| 292 | +<!----------------------------------------------------------------------> | |
| 293 | +<a name="license"></a> | |
| 294 | +<hr> | |
| 295 | + | |
| 296 | +<!----- Begin AGREEMENT section -----> | |
| 297 | + | |
| 298 | +<a name="AGREEMENT"> | |
| 299 | +<center> | |
| 300 | + | |
| 301 | +<font size ="-1" face="Arial,Helvetica"> | |
| 302 | + | |
| 303 | +<A NAME="AGREEMENT"> | |
| 304 | +<P ALIGN=CENTER><FONT SIZE=4><B>Java | |
| 305 | +<FONT SIZE=-2><SUP>TM</SUP></FONT> Media Framework | |
| 306 | +(JMF) 2.1.1c</B><BR><B>Binary Code License Agreement</B></FONT></P> | |
| 307 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3>READ THE | |
| 308 | +TERMS OF THIS AGREEMENT AND ANY PROVIDED | |
| 309 | +<A HREF="#SUPPLEMENTAL_LICENSE">SUPPLEMENTAL LICENSE TERMS</A> | |
| 310 | +(COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE | |
| 311 | +SOFTWARE MEDIA PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU | |
| 312 | +AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING THE | |
| 313 | +SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY | |
| 314 | +SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. | |
| 315 | +IF YOU DO NOT AGREE TO ALL OF THE TERMS, PROMPTLY RETURN THE UNUSED | |
| 316 | +SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE SOFTWARE | |
| 317 | +IS ACCESSED ELECTRONICALLY, SELECT THE "DECLINE" BUTTON AT | |
| 318 | +THE END OF THIS AGREEMENT. </FONT> | |
| 319 | +</P> | |
| 320 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>1. License | |
| 321 | +to Use.</B> Sun Microsystems, Inc. ("Sun") grants you a | |
| 322 | +non-exclusive and non-transferable license for the internal use only | |
| 323 | +of the accompanying software and documentation and any error | |
| 324 | +corrections provided by Sun (collectively "Software"), by | |
| 325 | +the number of users and the class of computer hardware for which the | |
| 326 | +corresponding fee has been paid. </FONT> | |
| 327 | +</P> | |
| 328 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>2. | |
| 329 | +Restrictions. </B>Software is confidential and copyrighted. Title to | |
| 330 | +Software and all associated intellectual property rights is retained | |
| 331 | +by Sun and/or its licensors. Except as specifically authorized in any | |
| 332 | +Supplemental License Terms, you may not make copies of Software, | |
| 333 | +other than a single copy of Software for archival purposes. Unless | |
| 334 | +enforcement is prohibited by applicable law, you may not modify, | |
| 335 | +decompile, or reverse engineer Software. You acknowledge that | |
| 336 | +Software is not designed or intended for use in the design, | |
| 337 | +construction, operation or maintenance of any nuclear facility. Sun | |
| 338 | +disclaims any express or implied warranty of fitness for such uses. | |
| 339 | +No right, title or interest in or to any trademark, service mark, | |
| 340 | +logo or trade name of Sun or its licensors is granted under this | |
| 341 | +Agreement. </FONT> | |
| 342 | +</P> | |
| 343 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>3. Limited | |
| 344 | +Warranty.</B> Sun warrants to you that for a period of ninety (90) | |
| 345 | +days from the date of purchase, as evidenced by a copy of the | |
| 346 | +receipt, the media on which Software is furnished (if any) will be | |
| 347 | +free of defects in materials and workmanship under normal use. Except | |
| 348 | +for the foregoing, Software is provided "AS IS". Your | |
| 349 | +exclusive remedy and Sun's entire liability under this limited | |
| 350 | +warranty will be at Sun's option to replace Software media or refund | |
| 351 | +the fee paid for Software. </FONT> | |
| 352 | +</P> | |
| 353 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>4. | |
| 354 | +DISCLAIMER OF WARRANTY.</B> UNLESS SPECIFIED IN THIS AGREEMENT, ALL | |
| 355 | +EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, | |
| 356 | +INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A | |
| 357 | +PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE | |
| 358 | +EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. </FONT> | |
| 359 | +</P> | |
| 360 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>5. | |
| 361 | +LIMITATION OF LIABILITY.</B> TO THE EXTENT NOT PROHIBITED BY LAW, IN | |
| 362 | +NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, | |
| 363 | +PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL | |
| 364 | +OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF | |
| 365 | +LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO | |
| 366 | +USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | |
| 367 | +DAMAGES. In no event will Sun's liability to you, whether in | |
| 368 | +contract, tort (including negligence), or otherwise, exceed the | |
| 369 | +amount paid by you for Software under this Agreement. The foregoing | |
| 370 | +limitations will apply even if the above stated warranty fails of its | |
| 371 | +essential purpose. </FONT> | |
| 372 | +</P> | |
| 373 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>6. | |
| 374 | +Termination.</B> This Agreement is effective until terminated. You | |
| 375 | +may terminate this Agreement at any time by destroying all copies of | |
| 376 | +Software. This Agreement will terminate immediately without notice | |
| 377 | +from Sun if you fail to comply with any provision of this Agreement. | |
| 378 | +Upon Termination, you must destroy all copies of Software. </FONT> | |
| 379 | +</P> | |
| 380 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>7. Export | |
| 381 | +Regulations.</B> All Software and technical data delivered under this | |
| 382 | +Agreement are subject to US export control laws and may be subject to | |
| 383 | +export or import regulations in other countries. You agree to comply | |
| 384 | +strictly with all such laws and regulations and acknowledge that you | |
| 385 | +have the responsibility to obtain such licenses to export, re-export, | |
| 386 | +or import as may be required after delivery to you. </FONT> | |
| 387 | +</P> | |
| 388 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>8. U.S. | |
| 389 | +Government Restricted Rights. </B>If Software is being acquired by or | |
| 390 | +on behalf of the U.S. Government or by a U.S. Government prime | |
| 391 | +contractor or subcontractor (at any tier), then the Government's | |
| 392 | +rights in Software and accompanying documentation will be only as set | |
| 393 | +forth in this Agreement; this is in accordance with 48 C.F.R. | |
| 394 | +227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48 | |
| 395 | +CFR 2.101 and 12.212 (for non-DOD acquisitions). </FONT> | |
| 396 | +</P> | |
| 397 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>9. | |
| 398 | +Governing Law. </B>Any action related to this Agreement will be | |
| 399 | +governed by California law and controlling U.S. federal law. No | |
| 400 | +choice of law rules of any jurisdiction will apply. </FONT> | |
| 401 | +</P> | |
| 402 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>10. | |
| 403 | +Severability.</B> If any provision of this Agreement is held to be | |
| 404 | +unenforceable, this Agreement will remain in effect with the | |
| 405 | +provision omitted, unless omission would frustrate the intent of the | |
| 406 | +parties, in which case this Agreement will immediately terminate. </FONT> | |
| 407 | +</P> | |
| 408 | +<P ALIGN=JUSTIFY STYLE="line-height: 100%"><FONT SIZE=3><B>11. | |
| 409 | +Integration. </B>This Agreement is the entire agreement between you | |
| 410 | +and Sun relating to its subject matter. It supersedes all prior or | |
| 411 | +contemporaneous oral or written communications, proposals, | |
| 412 | +representations and warranties and prevails over any conflicting or | |
| 413 | +additional terms of any quote, order, acknowledgment, or other | |
| 414 | +communication between the parties relating to its subject matter | |
| 415 | +during the term of this Agreement. No modification of this Agreement | |
| 416 | +will be binding, unless in writing and signed by an authorized | |
| 417 | +representative of each party. </FONT> | |
| 418 | +</P> | |
| 419 | + | |
| 420 | +<A NAME="SUPPLEMENTAL_LICENSE"> | |
| 421 | +<P ALIGN=CENTER><FONT SIZE=4><B>Java | |
| 422 | +<FONT SIZE=-2><SUP>TM</SUP></FONT> Media Framework | |
| 423 | +(JMF) 2.1.1c<BR>Supplemental License Terms</B></FONT></P> | |
| 424 | +<P ALIGN=JUSTIFY><FONT SIZE=3>These supplemental license terms | |
| 425 | +("Supplemental Terms") add to or modify the terms of the | |
| 426 | +Binary Code License Agreement | |
| 427 | +(collectively, the "<A HREF="#AGREEMENT">Agreement</A>"). | |
| 428 | +Capitalized terms not defined in these Supplemental Terms shall have | |
| 429 | +the same meanings ascribed to them in the Agreement. These | |
| 430 | +Supplemental Terms shall supersede any inconsistent or conflicting | |
| 431 | +terms in the Agreement, or in any license contained within the | |
| 432 | +Software.</FONT></P> | |
| 433 | +<P ALIGN=JUSTIFY><FONT SIZE=3><B>1. Software Internal Use and | |
| 434 | +Development License Grant.</B> Subject to the terms and conditions of | |
| 435 | +this Agreement, including, but not limited to Section 3 (Java | |
| 436 | +Technology Restrictions) of these Supplemental Terms, Sun grants you | |
| 437 | +a non-exclusive, non-transferable, limited license to reproduce | |
| 438 | +internally and use internally the binary form of the Software, | |
| 439 | +complete and unmodified, for the sole purpose of designing, | |
| 440 | +developing and testing your Java applets and applications | |
| 441 | +("Programs").</FONT></P> | |
| 442 | +<P ALIGN=JUSTIFY><FONT SIZE=3><B>2. License to Distribute Software.</B> | |
| 443 | +In addition to the license granted in Section 1 (Software Internal | |
| 444 | +Use and Development License Grant) of these Supplemental Terms, | |
| 445 | +subject to the terms and conditions of this Agreement, including but | |
| 446 | +not limited to, Section 3 (Java Technology Restrictions) of these | |
| 447 | +Supplemental Terms, Sun grants you a non-exclusive, non-transferable, | |
| 448 | +limited license to reproduce and distribute the Software in binary | |
| 449 | +code form only, provided that you: (i) distribute the Software | |
| 450 | +complete and unmodified, except that you may omit those files | |
| 451 | +specifically identified as"optional" in the Software | |
| 452 | +"README" file, which include samples, documents, and bin | |
| 453 | +files, or that are removable by using the Software customizer tool | |
| 454 | +provided, only as part of and for the sole purpose of running your | |
| 455 | +Program into which the Software is incorporated; (ii) do not | |
| 456 | +distribute additional software intended to replace any components of | |
| 457 | +the Software; (iii) do not remove or alter any proprietary legends or | |
| 458 | +notices contained in the Software; (iv) only distribute the Software | |
| 459 | +subject to a license agreement that protects Sun's interests | |
| 460 | +consistent with the terms contained in this Agreement; and (v) agree | |
| 461 | +to defend and indemnify Sun and its licensors from and against any | |
| 462 | +damages, costs, liabilities, settlement amounts or expenses, | |
| 463 | +including attorneys' fees, incurred in connection with any claim, | |
| 464 | +lawsuit or action by any third party that arises or results from the | |
| 465 | +use or distribution of any and all Programs or Software.</FONT></P> | |
| 466 | +<P ALIGN=JUSTIFY><FONT SIZE=3><B>3. Java<SUP> </SUP>Technology | |
| 467 | +Restrictions.</B> You may not modify the Java Platform Interface | |
| 468 | +("JPI", identified as classes contained within the "java" | |
| 469 | +package or any subpackages of the "java" package), by | |
| 470 | +creating additional classes within the JPI or otherwise causing the | |
| 471 | +addition to or modification of the classes in the JPI. In the event | |
| 472 | +that you create an additional class and associated API's, which: (i) | |
| 473 | +extends the functionality of the Java platform, and (ii) is exposed | |
| 474 | +to third party software developers for the purpose of developing | |
| 475 | +additional software which invokes such additional API, you must | |
| 476 | +promptly publish broadly an accurate specification for such API for | |
| 477 | +free use by all developers. You may not create, or authorize your | |
| 478 | +licensees to create additional classes, interfaces, packages or | |
| 479 | +subpackages that are in any way identified as "java", | |
| 480 | +"javax", "sun" or similar convention as specified | |
| 481 | +by Sun in any class file naming convention designation.</FONT></P> | |
| 482 | +<P ALIGN=JUSTIFY><FONT SIZE=2 STYLE="font-size: 9pt"><FONT SIZE=3><B>4. | |
| 483 | +Java Runtime Availability. </B>Refer to the appropriate version of | |
| 484 | +the Java Runtime Environment binary code license (currently located | |
| 485 | +at </FONT> | |
| 486 | +<A HREF="http://www.java.sun.com/jdk/index.html"> | |
| 487 | +<FONT SIZE=3>http://www.java.sun.com/jdk/index.html</FONT></A><FONT SIZE=3>) | |
| 488 | +for the availability of runtime code which may be distributed with | |
| 489 | +Java applets and applications.</FONT></FONT></P> | |
| 490 | +<P ALIGN=JUSTIFY><FONT SIZE=3><B>5. Trademarks and Logos.</B> You | |
| 491 | +acknowledge and agree as between you and Sun that Sun owns the SUN, | |
| 492 | +SOLARIS, JAVA, JINI, FORTE, STAROFFICE, STARPORTAL and iPLANET | |
| 493 | +trademarks and all SUN, SOLARIS, JAVA, JINI, FORTE, STAROFFICE, | |
| 494 | +STARPORTAL and iPLANET-related trademarks, service marks, logos and | |
| 495 | +other brand designations ("Sun Marks"), and you agree to | |
| 496 | +comply with the Sun Trademark and Logo Usage Requirements currently | |
| 497 | +located at | |
| 498 | +<A HREF="http://www.sun.com/policies/trademarks"> | |
| 499 | +http://www.sun.com/policies/trademarks</a>. | |
| 500 | +Any use you make | |
| 501 | +of the Sun Marks inures to Sun's benefit.</FONT></P> | |
| 502 | +<P ALIGN=JUSTIFY><FONT SIZE=3><B>6. Source Code</B>. Software may | |
| 503 | +contain source code that is provided solely for reference purposes | |
| 504 | +pursuant to the terms of this Agreement. Source code may not be | |
| 505 | +redistributed unless expressly provided for in this Agreement.</FONT></P> | |
| 506 | +<P ALIGN=JUSTIFY><FONT SIZE=3><B>7. Termination for Infringement.</B> | |
| 507 | +Either party may terminate this Agreement immediately should any | |
| 508 | +Software become, or in either party's opinion be likely to become, | |
| 509 | +the subject of a claim of infringement of any intellectual property | |
| 510 | +right.</FONT></P> | |
| 511 | +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3>For inquiries | |
| 512 | +please contact: Sun Microsystems, Inc. 901 San Antonio Road, Palo | |
| 513 | +Alto, California 94303</FONT></P> | |
| 514 | +<P ALIGN=LEFT STYLE="font-weight: medium"><FONT SIZE=1 STYLE="font-size: 8pt"><I><FONT SIZE=2>LFI# | |
| 515 | +117891/Form ID#011801</FONT> </I></FONT> | |
| 516 | +</P> | |
| 517 | +<hr> | |
| 518 | +<p> | |
| 519 | +<font size="-1"> | |
| 520 | +This page was last modified on 17-Dec-2002<br> | |
| 521 | +Copyright 1995-2002, Sun Microsystems, Inc.<br> | |
| 522 | +All Rights Reserved</font> | |
| 523 | + | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
| ... | ... | @@ -0,0 +1,326 @@ |
| 1 | +import java.awt.Color; | |
| 2 | +import java.io.IOException; | |
| 3 | +import java.util.ArrayList; | |
| 4 | +import java.util.Iterator; | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | +import javax.microedition.xlet.Xlet; | |
| 8 | +import javax.microedition.xlet.XletContext; | |
| 9 | +import javax.microedition.xlet.XletStateChangeException; | |
| 10 | + | |
| 11 | +import plaver.dtvtest.DTVTestController; | |
| 12 | +import plaver.dtvtest.DTVTestEvent; | |
| 13 | +import plaver.dtvtest.DTVTestListener; | |
| 14 | +import plaver.qrcode.BitToString; | |
| 15 | +import plaver.qrcode.MatrizImgQR; | |
| 16 | +import plaver.qrcode.QRCode; | |
| 17 | + | |
| 18 | +import com.sun.dtv.lwuit.Font; | |
| 19 | +import com.sun.dtv.lwuit.Form; | |
| 20 | +import com.sun.dtv.lwuit.Graphics; | |
| 21 | +import com.sun.dtv.lwuit.Image; | |
| 22 | +import com.sun.dtv.lwuit.Label; | |
| 23 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 24 | +import com.sun.dtv.lwuit.layouts.CoordinateLayout; | |
| 25 | +import com.sun.dtv.lwuit.plaf.Style; | |
| 26 | +import com.sun.dtv.ui.Capabilities; | |
| 27 | +import com.sun.dtv.ui.Device; | |
| 28 | +import com.sun.dtv.ui.Plane; | |
| 29 | +import com.sun.dtv.ui.PlaneSetup; | |
| 30 | +import com.sun.dtv.ui.Screen; | |
| 31 | + | |
| 32 | +public class TestSuitXlet implements Xlet, DTVTestListener { | |
| 33 | + | |
| 34 | + private Form form; | |
| 35 | + | |
| 36 | + private List controllerList = new ArrayList(); | |
| 37 | + private int cIndex = 0; | |
| 38 | + | |
| 39 | + private int qtdApps; | |
| 40 | + private int qtdAutoApps; /* Apenas aplicações automáticas (i.e., visuais) * | |
| 41 | + * farão parte do QR Code */ | |
| 42 | + | |
| 43 | + private boolean[] boolVector; | |
| 44 | + private int contBoolList; | |
| 45 | + private int contCurrentAPP = 1; | |
| 46 | + | |
| 47 | + private Font font; | |
| 48 | + private Graphics grapCont; | |
| 49 | + | |
| 50 | + private XletContext contextXlet; | |
| 51 | + | |
| 52 | + public void initXlet(XletContext ctx) throws XletStateChangeException { | |
| 53 | + this.contextXlet = ctx; | |
| 54 | + | |
| 55 | + form = new Form(); | |
| 56 | + setPlane(form); | |
| 57 | + | |
| 58 | + controllerList = DTVTestController.createTestSuit("apps.txt", form, contextXlet); | |
| 59 | + qtdApps = controllerList.size(); | |
| 60 | + qtdAutoApps = DTVTestController.getQtdAutoApps(); | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + private void setPlane(Form form) { | |
| 65 | + | |
| 66 | + Device device = Device.getInstance(); | |
| 67 | + Screen currentScreen = device.getDefaultScreen(); | |
| 68 | + PlaneSetup planeSetup = null; | |
| 69 | + Plane[] planes = currentScreen.getAllPlanes(); | |
| 70 | + | |
| 71 | + for(int i=0; i < planes.length; i++) { | |
| 72 | + Capabilities cap = planes[i].getCapabilities(); | |
| 73 | + if(cap.isGraphicsRenderingSupported()) { | |
| 74 | + Plane plane = planes[i]; | |
| 75 | + planeSetup = plane.getCurrentSetup(); | |
| 76 | + | |
| 77 | + break; | |
| 78 | + } | |
| 79 | + } | |
| 80 | + | |
| 81 | + Style style = new Style(); | |
| 82 | + style.setBgColor(Color.WHITE); | |
| 83 | + form.setStyle(style); | |
| 84 | + form.setLayout(new CoordinateLayout(planeSetup.getScreenResolution())); | |
| 85 | + | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void startXlet() throws XletStateChangeException { | |
| 89 | + | |
| 90 | + exibeImagemInicial(); | |
| 91 | + | |
| 92 | + DTVTestController controller; | |
| 93 | + Iterator it = controllerList.iterator(); | |
| 94 | + | |
| 95 | + boolVector = new boolean[qtdAutoApps]; | |
| 96 | + | |
| 97 | + while (it.hasNext()) { | |
| 98 | + controller = (DTVTestController) it.next(); | |
| 99 | + controller.addDTVTestEventListener(this); | |
| 100 | + } | |
| 101 | + | |
| 102 | + exibeImgExecucao(); | |
| 103 | + exibeContador(); | |
| 104 | + | |
| 105 | + ( (DTVTestController) controllerList.get(cIndex++)).start(); | |
| 106 | + } | |
| 107 | + | |
| 108 | + | |
| 109 | + public void testLogEventReceived(DTVTestEvent e) { | |
| 110 | + | |
| 111 | + if(e.getStatus() == DTVTestEvent.TEST_SUCCESS) | |
| 112 | + boolVector[contBoolList++] = true; | |
| 113 | + else if(e.getStatus() == DTVTestEvent.TEST_FAILURE || e.getStatus() == DTVTestEvent.TEST_TIMEOUT) | |
| 114 | + boolVector[contBoolList++] = false; | |
| 115 | + | |
| 116 | + if (cIndex < controllerList.size()) { | |
| 117 | + exibeContador(); | |
| 118 | + ( (DTVTestController) controllerList.get(cIndex++)).start(); | |
| 119 | + } else { | |
| 120 | + exibeImagemFinal(); | |
| 121 | + exibeQRCode(); | |
| 122 | + } | |
| 123 | + | |
| 124 | + } | |
| 125 | + | |
| 126 | + private void exibeImagemInicial() { | |
| 127 | + | |
| 128 | + Label labInit = new Label(); | |
| 129 | + labInit.setSize(new Dimension(form.getWidth(), form.getHeight())); | |
| 130 | + labInit.getStyle().setBgColor(Color.WHITE); | |
| 131 | + | |
| 132 | + font = Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, 50); | |
| 133 | + | |
| 134 | + try { | |
| 135 | + Image imgInit = Image.createImage("plaver/imagens/inicio.png"); | |
| 136 | + imgInit = imgInit.scaled(form.getWidth()/100 * 40, form.getWidth()/100 * 40); | |
| 137 | + | |
| 138 | + Image imgBack = Image.createImage(form.getWidth(), form.getHeight()); | |
| 139 | + Graphics gBack = imgBack.getGraphics(); | |
| 140 | + gBack.drawImage(imgInit, (form.getWidth() - imgInit.getWidth())/2, (form.getHeight() - imgInit.getHeight())/2); | |
| 141 | + | |
| 142 | + labInit.setIcon(imgBack); | |
| 143 | + | |
| 144 | + form.addComponent(labInit); | |
| 145 | + form.show(); | |
| 146 | + | |
| 147 | + try { | |
| 148 | + Thread.sleep(5000); | |
| 149 | + } catch (InterruptedException e) { | |
| 150 | + e.printStackTrace(); | |
| 151 | + } | |
| 152 | + | |
| 153 | + } catch (IOException e) { | |
| 154 | + e.printStackTrace(); | |
| 155 | + } | |
| 156 | + } | |
| 157 | + | |
| 158 | + private void exibeContador() { | |
| 159 | + | |
| 160 | + grapCont.setColor(Color.WHITE); | |
| 161 | +// grapCont.fillRect(725, 135, 100, 70); | |
| 162 | + grapCont.fillRect( (int) (form.getWidth()/1.55), form.getHeight()/5, form.getWidth()/6, form.getHeight()/8); | |
| 163 | + | |
| 164 | + grapCont.setColor(Color.BLACK); | |
| 165 | + | |
| 166 | + if(contCurrentAPP > 99) { | |
| 167 | + grapCont.drawString("Executanto Teste: " + contCurrentAPP , 350, 140); | |
| 168 | + } else if(contCurrentAPP > 9) { | |
| 169 | + grapCont.drawString("Executanto Teste: 0" + contCurrentAPP , 350, 140); | |
| 170 | + } else { | |
| 171 | + grapCont.drawString("Executanto Teste: 00" + contCurrentAPP , 350, 140); | |
| 172 | + } | |
| 173 | + | |
| 174 | + contCurrentAPP++; | |
| 175 | + form.show(); | |
| 176 | + } | |
| 177 | + | |
| 178 | + private void exibeImgExecucao() { | |
| 179 | + | |
| 180 | + Label logo = new Label(); | |
| 181 | + logo.getStyle().setBgTransparency(0); | |
| 182 | + logo.setSize(new Dimension(250,200)); | |
| 183 | + logo.setX((int)(form.getWidth()*0.96) - logo.getWidth()); | |
| 184 | + logo.setY(form.getHeight() - logo.getHeight()); | |
| 185 | + | |
| 186 | + Label labExec = new Label(); | |
| 187 | + labExec.setSize(new Dimension(form.getWidth(), form.getHeight())); | |
| 188 | + labExec.setY(form.getHeight()/6); | |
| 189 | + | |
| 190 | + labExec.getStyle().setBgColor(Color.WHITE); | |
| 191 | + grapCont = null; | |
| 192 | + | |
| 193 | + try { | |
| 194 | + | |
| 195 | + logo.setIcon(Image.createImage("plaver/imagens/logo.png")); | |
| 196 | + | |
| 197 | + Image imgBgExec = Image.createImage(form.getWidth(), form.getHeight()); | |
| 198 | + grapCont = imgBgExec.getGraphics(); | |
| 199 | + | |
| 200 | + grapCont.setColor(Color.BLACK); | |
| 201 | + grapCont.setFont(font); | |
| 202 | + | |
| 203 | + if(qtdApps > 99) { | |
| 204 | + grapCont.drawString("Suíte de Testes 01 (" + qtdApps + " Aplicações)" , 245, 50); | |
| 205 | + } else if(qtdApps > 9) { | |
| 206 | + grapCont.drawString("Suíte de Testes 01 (" + qtdApps + " Aplicações)" , 245, 50); | |
| 207 | + } else { | |
| 208 | + grapCont.drawString("Suíte de Testes 01 (" + qtdApps + " Aplicações)" , 245, 50); | |
| 209 | + } | |
| 210 | + | |
| 211 | + labExec.setIcon(imgBgExec); | |
| 212 | + | |
| 213 | + } catch (IOException e) { | |
| 214 | + e.printStackTrace(); | |
| 215 | + } | |
| 216 | + | |
| 217 | + form.removeAll(); | |
| 218 | + form.addComponent(labExec); | |
| 219 | + form.addComponent(logo); | |
| 220 | + | |
| 221 | + form.show(); | |
| 222 | + | |
| 223 | + } | |
| 224 | + | |
| 225 | + private void exibeImagemFinal() { | |
| 226 | + form.removeAll(); | |
| 227 | + | |
| 228 | + Label labelEnd = new Label(); | |
| 229 | + labelEnd.setSize(new Dimension(form.getWidth(), form.getHeight())); | |
| 230 | + labelEnd.getStyle().setBgColor(Color.WHITE); | |
| 231 | + | |
| 232 | + try { | |
| 233 | + Image imgEnd = Image.createImage("plaver/imagens/fim.png"); | |
| 234 | + labelEnd.setIcon(imgEnd); | |
| 235 | + | |
| 236 | + form.addComponent(labelEnd); | |
| 237 | + form.show(); | |
| 238 | + } catch (IOException e) { | |
| 239 | + e.printStackTrace(); | |
| 240 | + } | |
| 241 | + } | |
| 242 | + | |
| 243 | + private void exibeQRCode() { | |
| 244 | + String strResult = ""; | |
| 245 | + | |
| 246 | + /* Não há nenhuma aplicação não visual para ser apresentada no QR Code*/ | |
| 247 | + if(boolVector.length == 0) | |
| 248 | + return; | |
| 249 | + | |
| 250 | + BitToString bitToString = new BitToString(); | |
| 251 | + bitToString.addBits(boolVector); | |
| 252 | + | |
| 253 | + strResult = bitToString.getString(); | |
| 254 | + | |
| 255 | +// imprimeDebuger(strResult, boolVector); | |
| 256 | + | |
| 257 | + Label bbbImage = new Label(); | |
| 258 | + | |
| 259 | + QRCode qr = new QRCode(2, 3, 2, strResult); | |
| 260 | + qr.init(); | |
| 261 | + | |
| 262 | + Image imagem = null; | |
| 263 | + try { | |
| 264 | + imagem = MatrizImgQR.GerarImagem(qr.getVector(), qr.getVersion(), qr.getEccLevel(), 14); | |
| 265 | + } catch (IOException e1) { | |
| 266 | + e1.printStackTrace(); | |
| 267 | + } | |
| 268 | + | |
| 269 | + bbbImage.setX((int)(form.getWidth()/2.05) - imagem.getWidth()/2); | |
| 270 | + bbbImage.setY((int)(form.getHeight()/1.55) - imagem.getHeight()/2); | |
| 271 | + bbbImage.getStyle().setBgColor(Color.WHITE); | |
| 272 | + bbbImage.setIcon(imagem); | |
| 273 | + | |
| 274 | + form.addComponent(bbbImage); | |
| 275 | + form.repaint(); | |
| 276 | + } | |
| 277 | + | |
| 278 | + /* Exibe na tela informações como: String codificada e lista de resultados das aplicações não-visuais */ | |
| 279 | +// private void imprimeDebuger(String strResult, boolean[] boolVector) { | |
| 280 | +// | |
| 281 | +// int cont = 1; | |
| 282 | +// | |
| 283 | +// Label texto = new Label(); | |
| 284 | +// texto.setText(strResult); | |
| 285 | +// texto.setX(30); | |
| 286 | +// texto.setY(10); | |
| 287 | +// form.addComponent(texto); | |
| 288 | +// | |
| 289 | +// texto = new Label(); | |
| 290 | +// | |
| 291 | +// strResult = "["; | |
| 292 | +// for(int i = 0; i < (boolVector.length - 1); i++) { | |
| 293 | +// | |
| 294 | +// if(i%20 == 0 && i != 0) { | |
| 295 | +// cont++; | |
| 296 | +// | |
| 297 | +// texto = new Label(); | |
| 298 | +// texto.setX(30); | |
| 299 | +// texto.setY(20*cont); | |
| 300 | +// texto.setText(strResult); | |
| 301 | +// | |
| 302 | +// form.addComponent(texto); | |
| 303 | +// strResult = " "; | |
| 304 | +// | |
| 305 | +// } | |
| 306 | +// | |
| 307 | +// strResult += boolVector[i] + ", "; | |
| 308 | +// } | |
| 309 | +// strResult += boolVector[boolVector.length - 1] + "]"; | |
| 310 | +// cont++; | |
| 311 | +// | |
| 312 | +// texto = new Label(); | |
| 313 | +// texto.setText(strResult); | |
| 314 | +// texto.setX(30); | |
| 315 | +// texto.setY(20*cont); | |
| 316 | +// form.addComponent(texto); | |
| 317 | +// } | |
| 318 | + | |
| 319 | + public void pauseXlet() { | |
| 320 | + | |
| 321 | + } | |
| 322 | + | |
| 323 | + public void destroyXlet(boolean unconditional) | |
| 324 | + throws XletStateChangeException { | |
| 325 | + } | |
| 326 | +} | ... | ... |
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +[timeout_default] | |
| 2 | +[classname] [id] [modo_de_execução(auto/interactive)] [timeout] | |
| 3 | +15000 | |
| 4 | + | |
| 5 | +plaver.com.sun.dtv.lwuit.Graphics.ClearRectTest 001 interactive | |
| 6 | +plaver.com.sun.dtv.lwuit.Graphics.ClipRectTest 002 interactive | |
| 7 | +plaver.com.sun.dtv.lwuit.Graphics.CopyAreaTest 003 interactive | |
| 8 | +plaver.com.sun.dtv.lwuit.Graphics.Draw3DRectTest 004 interactive | |
| 9 | + | |
| 10 | +plaver.javax.tv.media.Awtvideosize.EqualsTest 005 auto | |
| 11 | +plaver.javax.tv.media.Awtvideosize.GetDestinationTest 006 auto | |
| 12 | +plaver.javax.tv.media.Awtvideosize.GetSourceTest 007 auto | |
| 13 | + | |
| 14 | +plaver.com.sun.dtv.ui.DownloadableFont.InstallFontTest 008 auto 50000 | |
| 15 | + | |
| 16 | +plaver.com.sun.dtv.ui.event.KeyEvent.GetInstancesTest 009 auto | |
| 17 | +plaver.com.sun.dtv.ui.event.KeyEvent.AddResourceTypeListenerTest 010 auto 20000 | |
| 18 | +plaver.com.sun.dtv.ui.event.KeyEvent.IsAvailableTest 011 auto | |
| 19 | +plaver.com.sun.dtv.ui.event.KeyEvent.ReleaseTest 012 auto | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/ClearRectTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class ClearRectTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fill3DRect(0,0,100,100, true); | |
| 44 | + g.clearRect(10, 10, 70, 70); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/ClipRectTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class ClipRectTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.clipRect( 25, 0, 100, 100 ); | |
| 42 | + g.setColor( Color.RED ); | |
| 43 | + g.fillRect( 0, 0, 100, 100 ); | |
| 44 | + g.setColor( Color.BLACK ); | |
| 45 | + g.drawOval( 50, 0, 100, 100 ); | |
| 46 | + | |
| 47 | + labelImg = new Label(); | |
| 48 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 49 | + labelImg.setSize(dimLabel); | |
| 50 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 51 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 52 | + | |
| 53 | + labelImg.setIcon(img); | |
| 54 | + form.addComponent(labelImg); | |
| 55 | + | |
| 56 | + form.repaint(); | |
| 57 | + dtvTestLog.visualAppFinished(); | |
| 58 | + | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void pause() { | |
| 62 | + // TODO Auto-generated method stub | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/CopyAreaTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,79 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class CopyAreaTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 35 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 36 | + | |
| 37 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 38 | + | |
| 39 | + g = img.getGraphics(); | |
| 40 | + g.setColor(Color.BLACK); | |
| 41 | + | |
| 42 | + try { | |
| 43 | + g.drawRect(0,0, 100, 100); | |
| 44 | + g.fillRect(0, 0, 50, 50); | |
| 45 | + g.copyArea(0, 0,50,50,110,110); | |
| 46 | + } catch (Exception e1) { | |
| 47 | + e1.printStackTrace(); | |
| 48 | + } | |
| 49 | + | |
| 50 | + labelImg = new Label(); | |
| 51 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 52 | + labelImg.setSize(dimLabel); | |
| 53 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 54 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 55 | + | |
| 56 | + labelImg.setIcon(img); | |
| 57 | + form.addComponent(labelImg); | |
| 58 | + | |
| 59 | + form.repaint(); | |
| 60 | + dtvTestLog.visualAppFinished(); | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void pause() { | |
| 67 | + // TODO Auto-generated method stub | |
| 68 | + | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void destroy() { | |
| 72 | + form.removeComponent(labelImg); | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setForm(Form form) { | |
| 76 | + this.form = form; | |
| 77 | + } | |
| 78 | + | |
| 79 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/Draw3DRectTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class Draw3DRectTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.draw3DRect(0, 0, 100,100, true); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void pause() { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawArcTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,74 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawArcTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + g.drawArc(0, 0, 100, 100, 100, 100); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void pause() { | |
| 62 | + // TODO Auto-generated method stub | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void destroy() { | |
| 67 | + form.removeComponent(labelImg); | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setForm(Form form) { | |
| 71 | + this.form = form; | |
| 72 | + } | |
| 73 | + | |
| 74 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawBytesTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,75 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Font; | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.lwuit.Graphics; | |
| 11 | +import com.sun.dtv.lwuit.Image; | |
| 12 | +import com.sun.dtv.lwuit.Label; | |
| 13 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 14 | + | |
| 15 | +public class DrawBytesTest implements DTVTest { | |
| 16 | + | |
| 17 | + private DTVTestLog dtvTestLog; | |
| 18 | + private Form form; | |
| 19 | + private Graphics g; | |
| 20 | + | |
| 21 | + private Dimension dimImg; | |
| 22 | + private Dimension dimLabel; | |
| 23 | + | |
| 24 | + private Label labelImg; | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + // TODO Auto-generated method stub | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + | |
| 37 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 38 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 39 | + | |
| 40 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 41 | + | |
| 42 | + g = img.getGraphics(); | |
| 43 | + g.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, 50)); | |
| 44 | + g.setColor(Color.BLACK); | |
| 45 | + | |
| 46 | + byte bytepoints[] = {100, 114, 97, 119, 66, 121, 116, 101, 115}; | |
| 47 | + g.drawBytes(bytepoints, 0, bytepoints.length, 10, 10); | |
| 48 | + | |
| 49 | + labelImg = new Label(); | |
| 50 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 51 | + labelImg.setSize(dimLabel); | |
| 52 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 53 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 54 | + | |
| 55 | + labelImg.setIcon(img); | |
| 56 | + form.addComponent(labelImg); | |
| 57 | + | |
| 58 | + form.repaint(); | |
| 59 | + dtvTestLog.visualAppFinished(); | |
| 60 | + | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void pause() { | |
| 64 | + // TODO Auto-generated method stub | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void destroy() { | |
| 68 | + form.removeComponent(labelImg); | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setForm(Form form) { | |
| 72 | + this.form = form; | |
| 73 | + } | |
| 74 | + | |
| 75 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawCharTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Font; | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.lwuit.Graphics; | |
| 11 | +import com.sun.dtv.lwuit.Image; | |
| 12 | +import com.sun.dtv.lwuit.Label; | |
| 13 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 14 | + | |
| 15 | +public class DrawCharTest implements DTVTest { | |
| 16 | + | |
| 17 | + private DTVTestLog dtvTestLog; | |
| 18 | + private Form form; | |
| 19 | + private Graphics g; | |
| 20 | + | |
| 21 | + private Dimension dimImg; | |
| 22 | + private Dimension dimLabel; | |
| 23 | + | |
| 24 | + private Label labelImg; | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + // TODO Auto-generated method stub | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, 50)); | |
| 43 | + g.setColor(Color.BLACK); | |
| 44 | + g.drawChar((char) 65, 0, 0); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawCharsTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,78 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Font; | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.lwuit.Graphics; | |
| 11 | +import com.sun.dtv.lwuit.Image; | |
| 12 | +import com.sun.dtv.lwuit.Label; | |
| 13 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 14 | + | |
| 15 | +public class DrawCharsTest implements DTVTest { | |
| 16 | + | |
| 17 | + private DTVTestLog dtvTestLog; | |
| 18 | + private Form form; | |
| 19 | + private Graphics g; | |
| 20 | + | |
| 21 | + private Dimension dimImg; | |
| 22 | + private Dimension dimLabel; | |
| 23 | + | |
| 24 | + private Label labelImg; | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + // TODO Auto-generated method stub | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + | |
| 37 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 38 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 39 | + | |
| 40 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 41 | + | |
| 42 | + g = img.getGraphics(); | |
| 43 | + | |
| 44 | + g.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, 50)); | |
| 45 | + g.setColor(Color.BLACK); | |
| 46 | + | |
| 47 | + char charpoints[] = {100, 114, 97, 119, 67, 104, 97, 114, 115}; | |
| 48 | + g.drawChars(charpoints, 0, charpoints.length, 0, 0); | |
| 49 | + | |
| 50 | + labelImg = new Label(); | |
| 51 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 52 | + labelImg.setSize(dimLabel); | |
| 53 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 54 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 55 | + | |
| 56 | + labelImg.setIcon(img); | |
| 57 | + form.addComponent(labelImg); | |
| 58 | + | |
| 59 | + form.repaint(); | |
| 60 | + dtvTestLog.visualAppFinished(); | |
| 61 | + | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void pause() { | |
| 66 | + // TODO Auto-generated method stub | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void destroy() { | |
| 71 | + form.removeComponent(labelImg); | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setForm(Form form) { | |
| 75 | + this.form = form; | |
| 76 | + } | |
| 77 | + | |
| 78 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawImageTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,77 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | +import java.io.IOException; | |
| 5 | + | |
| 6 | +import plaver.dtvtest.DTVTest; | |
| 7 | +import plaver.dtvtest.DTVTestLog; | |
| 8 | + | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.lwuit.Graphics; | |
| 11 | +import com.sun.dtv.lwuit.Image; | |
| 12 | +import com.sun.dtv.lwuit.Label; | |
| 13 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 14 | + | |
| 15 | +public class DrawImageTest implements DTVTest { | |
| 16 | + | |
| 17 | + private DTVTestLog dtvTestLog; | |
| 18 | + private Form form; | |
| 19 | + private Graphics g; | |
| 20 | + | |
| 21 | + private Dimension dimImg; | |
| 22 | + private Dimension dimLabel; | |
| 23 | + | |
| 24 | + private Label labelImg; | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + // TODO Auto-generated method stub | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + try { | |
| 45 | + g.drawImage(Image.createImage(new String("plaver/imagens/logo.png")), 0, 0); | |
| 46 | + } catch (IOException e1) { | |
| 47 | + e1.printStackTrace(); | |
| 48 | + } | |
| 49 | + | |
| 50 | + labelImg = new Label(); | |
| 51 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 52 | + labelImg.setSize(dimLabel); | |
| 53 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 54 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 55 | + | |
| 56 | + labelImg.setIcon(img); | |
| 57 | + form.addComponent(labelImg); | |
| 58 | + | |
| 59 | + form.repaint(); | |
| 60 | + dtvTestLog.visualAppFinished(); | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void pause() { | |
| 65 | + // TODO Auto-generated method stub | |
| 66 | + | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void destroy() { | |
| 70 | + form.removeComponent(labelImg); | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setForm(Form form) { | |
| 74 | + this.form = form; | |
| 75 | + } | |
| 76 | + | |
| 77 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawLineTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawLineTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + g.drawLine(0, 0, 100, 100); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawOvalTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawOvalTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + g.drawOval(0, 0, 100, 100); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawPolygonTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,78 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawPolygonTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + int xpoints[] = { 25, 145, 25, 145, 25 }; | |
| 44 | + int ypoints[] = { 25, 25, 145, 145, 25 }; | |
| 45 | + int npoints = 5; | |
| 46 | + | |
| 47 | + g.drawPolygon(xpoints, ypoints, npoints); | |
| 48 | + | |
| 49 | + labelImg = new Label(); | |
| 50 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 51 | + labelImg.setSize(dimLabel); | |
| 52 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 53 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 54 | + | |
| 55 | + labelImg.setIcon(img); | |
| 56 | + form.addComponent(labelImg); | |
| 57 | + | |
| 58 | + form.repaint(); | |
| 59 | + dtvTestLog.visualAppFinished(); | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void pause() { | |
| 66 | + // TODO Auto-generated method stub | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void destroy() { | |
| 71 | + form.removeComponent(labelImg); | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setForm(Form form) { | |
| 75 | + this.form = form; | |
| 76 | + } | |
| 77 | + | |
| 78 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawPolylineTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,78 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawPolylineTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + int xpoints[] = { 25, 145, 25, 145, 25 }; | |
| 45 | + int ypoints[] = { 25, 25, 145, 145, 25 }; | |
| 46 | + int npoints = 5; | |
| 47 | + | |
| 48 | + g.drawPolygon(xpoints, ypoints, npoints); | |
| 49 | + | |
| 50 | + labelImg = new Label(); | |
| 51 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 52 | + labelImg.setSize(dimLabel); | |
| 53 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 54 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 55 | + | |
| 56 | + labelImg.setIcon(img); | |
| 57 | + form.addComponent(labelImg); | |
| 58 | + | |
| 59 | + form.repaint(); | |
| 60 | + dtvTestLog.visualAppFinished(); | |
| 61 | + | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void pause() { | |
| 66 | + // TODO Auto-generated method stub | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void destroy() { | |
| 71 | + form.removeComponent(labelImg); | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setForm(Form form) { | |
| 75 | + this.form = form; | |
| 76 | + } | |
| 77 | + | |
| 78 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawRectTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawRectTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg;; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + g.drawRect(10, 10, 100, 100); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawRoundRectTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,75 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class DrawRoundRectTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg;; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setColor(Color.BLACK); | |
| 43 | + | |
| 44 | + g.drawRoundRect(10, 10, 100, 100, 50, 50); | |
| 45 | + | |
| 46 | + labelImg = new Label(); | |
| 47 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 48 | + labelImg.setSize(dimLabel); | |
| 49 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 50 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 51 | + | |
| 52 | + labelImg.setIcon(img); | |
| 53 | + form.addComponent(labelImg); | |
| 54 | + | |
| 55 | + form.repaint(); | |
| 56 | + dtvTestLog.visualAppFinished(); | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void pause() { | |
| 63 | + // TODO Auto-generated method stub | |
| 64 | + | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void destroy() { | |
| 68 | + form.removeComponent(labelImg); | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setForm(Form form) { | |
| 72 | + this.form = form; | |
| 73 | + } | |
| 74 | + | |
| 75 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/DrawStringTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Font; | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.lwuit.Graphics; | |
| 11 | +import com.sun.dtv.lwuit.Image; | |
| 12 | +import com.sun.dtv.lwuit.Label; | |
| 13 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 14 | + | |
| 15 | +public class DrawStringTest implements DTVTest { | |
| 16 | + | |
| 17 | + private DTVTestLog dtvTestLog; | |
| 18 | + private Form form; | |
| 19 | + private Graphics g; | |
| 20 | + | |
| 21 | + private Dimension dimImg; | |
| 22 | + private Dimension dimLabel; | |
| 23 | + | |
| 24 | + private Label labelImg; | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + // TODO Auto-generated method stub | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 37 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 38 | + | |
| 39 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 40 | + | |
| 41 | + g = img.getGraphics(); | |
| 42 | + g.setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, 50)); | |
| 43 | + g.setColor(Color.BLACK); | |
| 44 | + | |
| 45 | + g.drawString("drawString", 10, 10); | |
| 46 | + | |
| 47 | + labelImg = new Label(); | |
| 48 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 49 | + labelImg.setSize(dimLabel); | |
| 50 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 51 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 52 | + | |
| 53 | + labelImg.setIcon(img); | |
| 54 | + form.addComponent(labelImg); | |
| 55 | + | |
| 56 | + form.repaint(); | |
| 57 | + dtvTestLog.visualAppFinished(); | |
| 58 | + | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void pause() { | |
| 62 | + // TODO Auto-generated method stub | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/Fill3DRectTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class Fill3DRectTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fill3DRect(0, 0, 100, 100, true); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void pause() { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/Fill3DRectTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class Fill3DRectTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fill3DRect(0, 0, 100, 100, true, (byte) 80); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillArcTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillArcTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillArc(0, 0, 100, 100, 100, 100); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void pause() { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillArcTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillArcTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillArc(0, 0, 100, 100, 100, 100, (byte) 80); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void pause() { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillLinearGradientTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,71 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillLinearGradientTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillLinearGradient(Color.GREEN, Color.PINK, 10, 10, 100, 100, true); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void pause() { | |
| 59 | + // TODO Auto-generated method stub | |
| 60 | + | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void destroy() { | |
| 64 | + form.removeComponent(labelImg); | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void setForm(Form form) { | |
| 68 | + this.form = form; | |
| 69 | + } | |
| 70 | + | |
| 71 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillOvalTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,74 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillOvalTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillOval(10, 10, 100, 100); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void pause() { | |
| 62 | + // TODO Auto-generated method stub | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void destroy() { | |
| 67 | + form.removeComponent(labelImg); | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setForm(Form form) { | |
| 71 | + this.form = form; | |
| 72 | + } | |
| 73 | + | |
| 74 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillOvalTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillOvalTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillOval(10, 10, 100, 100, (byte) 00100110); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillPolygonTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,76 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillPolygonTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + int xpoints[] = { 25, 145, 25, 145, 25 }; | |
| 44 | + int ypoints[] = { 25, 25, 145, 145, 25 }; | |
| 45 | + int npoints = 5; | |
| 46 | + | |
| 47 | + g.fillPolygon(xpoints, ypoints, npoints); | |
| 48 | + | |
| 49 | + labelImg = new Label(); | |
| 50 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 51 | + labelImg.setSize(dimLabel); | |
| 52 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 53 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 54 | + | |
| 55 | + labelImg.setIcon(img); | |
| 56 | + form.addComponent(labelImg); | |
| 57 | + | |
| 58 | + form.repaint(); | |
| 59 | + dtvTestLog.visualAppFinished(); | |
| 60 | + | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void pause() { | |
| 64 | + // TODO Auto-generated method stub | |
| 65 | + | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void destroy() { | |
| 69 | + form.removeComponent(labelImg); | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void setForm(Form form) { | |
| 73 | + this.form = form; | |
| 74 | + } | |
| 75 | + | |
| 76 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillPolygonTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,77 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillPolygonTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + int xpoints[] = { 25, 145, 25, 145, 25 }; | |
| 44 | + int ypoints[] = { 25, 25, 145, 145, 25 }; | |
| 45 | + int npoints = 5; | |
| 46 | + | |
| 47 | + g.fillPolygon(xpoints, ypoints, npoints, (byte) 40); | |
| 48 | + | |
| 49 | + labelImg = new Label(); | |
| 50 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 51 | + labelImg.setSize(dimLabel); | |
| 52 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 53 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 54 | + | |
| 55 | + labelImg.setIcon(img); | |
| 56 | + form.addComponent(labelImg); | |
| 57 | + | |
| 58 | + form.repaint(); | |
| 59 | + dtvTestLog.visualAppFinished(); | |
| 60 | + | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void pause() { | |
| 65 | + // TODO Auto-generated method stub | |
| 66 | + | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void destroy() { | |
| 70 | + form.removeComponent(labelImg); | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setForm(Form form) { | |
| 74 | + this.form = form; | |
| 75 | + } | |
| 76 | + | |
| 77 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillRadialGradientTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillRadialGradientTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillRadialGradient(Color.GREEN, Color.PINK, 10, 10, 100, 100); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void pause() { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillRectTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillRectTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillRect(0, 0, 100, 100); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillRectTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillRectTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillRect(0, 0, 100, 100, (byte) 80); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillRoundRectTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillRoundRectTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillRoundRect(10, 10, 100, 100, 50, 50); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void pause() { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void destroy() { | |
| 65 | + form.removeComponent(labelImg); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + this.form = form; | |
| 70 | + } | |
| 71 | + | |
| 72 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillRoundRectTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillRoundRectTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillRoundRect(10, 10, 100, 100, 50, 50, (byte) 40); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillTriangleTest_1.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillTriangleTest_1 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillTriangle(10, 10, 10, 100, 100, 100); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/lwuit/Graphics/FillTriangleTest_2.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.lwuit.Graphics; | |
| 2 | + | |
| 3 | +import java.awt.Color; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.lwuit.Graphics; | |
| 10 | +import com.sun.dtv.lwuit.Image; | |
| 11 | +import com.sun.dtv.lwuit.Label; | |
| 12 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 13 | + | |
| 14 | +public class FillTriangleTest_2 implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Form form; | |
| 18 | + private Graphics g; | |
| 19 | + | |
| 20 | + private Dimension dimImg; | |
| 21 | + private Dimension dimLabel; | |
| 22 | + | |
| 23 | + private Label labelImg; | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + dimImg = new Dimension(form.getWidth()/100 * 30,form.getHeight()/100 * 30); | |
| 36 | + dimLabel = new Dimension((int)(dimImg.getWidth()*1.3),(int)(dimImg.getHeight()*1.3)); | |
| 37 | + | |
| 38 | + Image img = Image.createImage(dimImg.getWidth(),dimImg.getHeight()); | |
| 39 | + | |
| 40 | + g = img.getGraphics(); | |
| 41 | + g.setColor(Color.BLACK); | |
| 42 | + | |
| 43 | + g.fillTriangle(10, 10, 10, 100, 100, 100, (byte) 40); | |
| 44 | + | |
| 45 | + labelImg = new Label(); | |
| 46 | + labelImg.getStyle().setBgColor(Color.WHITE); | |
| 47 | + labelImg.setSize(dimLabel); | |
| 48 | + labelImg.setX((int)((form.getWidth() - dimImg.getWidth())/1.8)); | |
| 49 | + labelImg.setY((int)((form.getHeight() - dimImg.getHeight())/1.2)); | |
| 50 | + | |
| 51 | + labelImg.setIcon(img); | |
| 52 | + form.addComponent(labelImg); | |
| 53 | + | |
| 54 | + form.repaint(); | |
| 55 | + dtvTestLog.visualAppFinished(); | |
| 56 | + | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void pause() { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void destroy() { | |
| 66 | + form.removeComponent(labelImg); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setForm(Form form) { | |
| 70 | + this.form = form; | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteAddResourceTypeListener_Released.java
0 → 100644
| ... | ... | @@ -0,0 +1,106 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.tuner.Tuner; | |
| 12 | + | |
| 13 | +public class TesteAddResourceTypeListener_Released implements ResourceTypeListener ,ScarceResourceListener,DTVTest { | |
| 14 | + | |
| 15 | + private DTVTestLog log; | |
| 16 | + private Tuner mainTuner; | |
| 17 | + | |
| 18 | + public void destroy() { | |
| 19 | + if( ! mainTuner.isAvailable()) | |
| 20 | + mainTuner.release(); | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void init() { | |
| 24 | + // TODO Auto-generated method stub | |
| 25 | + | |
| 26 | + Tuner[] tuner; | |
| 27 | + | |
| 28 | + tuner = Tuner.getInstances(); | |
| 29 | + | |
| 30 | + if (tuner.length > 0) { | |
| 31 | + | |
| 32 | + mainTuner = tuner[0]; | |
| 33 | + | |
| 34 | + try { | |
| 35 | + mainTuner.reserve(false, 100, this); | |
| 36 | + } catch (IllegalArgumentException e) { | |
| 37 | + // TODO Auto-generated catch block | |
| 38 | + System.out.println("EXE"); | |
| 39 | + e.printStackTrace(); | |
| 40 | + } catch (SecurityException e) { | |
| 41 | + // TODO Auto-generated catch block | |
| 42 | + System.out.println("EXE"); | |
| 43 | + e.printStackTrace(); | |
| 44 | + } catch (TimeoutException e) { | |
| 45 | + // TODO Auto-generated catch block | |
| 46 | + System.out.println("EXE"); | |
| 47 | + e.printStackTrace(); | |
| 48 | + } | |
| 49 | + | |
| 50 | + mainTuner.release(); | |
| 51 | + } | |
| 52 | + | |
| 53 | + } | |
| 54 | + | |
| 55 | + public void pause() { | |
| 56 | + // TODO Auto-generated method stub | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setLog(DTVTestLog log) { | |
| 61 | + // TODO Auto-generated method stub | |
| 62 | + this.log = log; | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void start() { | |
| 67 | + // TODO Auto-generated method stub | |
| 68 | + | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void released(int arg0) { | |
| 72 | + // TODO Auto-generated method stub | |
| 73 | + System.out.println("Released :" + arg0); | |
| 74 | + | |
| 75 | + log.success(); | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void reserved(int arg0) { | |
| 79 | + // TODO Auto-generated method stub | |
| 80 | + System.out.println("Reserved :" + arg0); | |
| 81 | + } | |
| 82 | + | |
| 83 | + | |
| 84 | + public void releaseForced(ScarceResource arg0) { | |
| 85 | + // TODO Auto-generated method stub | |
| 86 | + | |
| 87 | + } | |
| 88 | + | |
| 89 | + | |
| 90 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 91 | + // TODO Auto-generated method stub | |
| 92 | + return false; | |
| 93 | + } | |
| 94 | + | |
| 95 | + | |
| 96 | + public void released(ScarceResource arg0) { | |
| 97 | + // TODO Auto-generated method stub | |
| 98 | + | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setForm(Form form) { | |
| 102 | + // TODO Auto-generated method stub | |
| 103 | + | |
| 104 | + } | |
| 105 | + | |
| 106 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteAddResourceTypeListener_Reserved.java
0 → 100644
| ... | ... | @@ -0,0 +1,105 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.tuner.Tuner; | |
| 12 | + | |
| 13 | +public class TesteAddResourceTypeListener_Reserved implements DTVTest, | |
| 14 | + ResourceTypeListener, ScarceResourceListener { | |
| 15 | + | |
| 16 | + private DTVTestLog log; | |
| 17 | + private Tuner mainTuner; | |
| 18 | + | |
| 19 | + public void destroy() { | |
| 20 | + if( ! mainTuner.isAvailable()) | |
| 21 | + mainTuner.release(); | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void init() { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + | |
| 27 | + Tuner[] tuner; | |
| 28 | + | |
| 29 | + tuner = Tuner.getInstances(); | |
| 30 | + | |
| 31 | + if (tuner.length > 0) { | |
| 32 | + | |
| 33 | + mainTuner = tuner[0]; | |
| 34 | + | |
| 35 | + try { | |
| 36 | + mainTuner.reserve(false, 100, this); | |
| 37 | + } catch (IllegalArgumentException e) { | |
| 38 | + // TODO Auto-generated catch block | |
| 39 | + System.out.println("EXE"); | |
| 40 | + e.printStackTrace(); | |
| 41 | + } catch (SecurityException e) { | |
| 42 | + // TODO Auto-generated catch block | |
| 43 | + System.out.println("EXE"); | |
| 44 | + e.printStackTrace(); | |
| 45 | + } catch (TimeoutException e) { | |
| 46 | + // TODO Auto-generated catch block | |
| 47 | + System.out.println("EXE"); | |
| 48 | + e.printStackTrace(); | |
| 49 | + } | |
| 50 | + } | |
| 51 | + | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void pause() { | |
| 55 | + // TODO Auto-generated method stub | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void setLog(DTVTestLog log) { | |
| 60 | + // TODO Auto-generated method stub | |
| 61 | + this.log = log; | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void start() { | |
| 66 | + // TODO Auto-generated method stub | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void released(int arg0) { | |
| 71 | + // TODO Auto-generated method stub | |
| 72 | + System.out.println("Released :" + arg0); | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void reserved(int arg0) { | |
| 76 | + // TODO Auto-generated method stub | |
| 77 | + System.out.println("Reserved :" + arg0); | |
| 78 | + | |
| 79 | + log.success(); | |
| 80 | + } | |
| 81 | + | |
| 82 | + | |
| 83 | + public void releaseForced(ScarceResource arg0) { | |
| 84 | + // TODO Auto-generated method stub | |
| 85 | + | |
| 86 | + } | |
| 87 | + | |
| 88 | + | |
| 89 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 90 | + // TODO Auto-generated method stub | |
| 91 | + return false; | |
| 92 | + } | |
| 93 | + | |
| 94 | + | |
| 95 | + public void released(ScarceResource arg0) { | |
| 96 | + // TODO Auto-generated method stub | |
| 97 | + | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setForm(Form form) { | |
| 101 | + // TODO Auto-generated method stub | |
| 102 | + | |
| 103 | + } | |
| 104 | + | |
| 105 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteAddTunerListener_Tune.java
0 → 100644
| ... | ... | @@ -0,0 +1,131 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTestLog; | |
| 6 | + | |
| 7 | +import com.sun.dtv.lwuit.Form; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.transport.TransportStream; | |
| 12 | +import com.sun.dtv.tuner.Tuner; | |
| 13 | +import com.sun.dtv.tuner.TunerListener; | |
| 14 | +import com.sun.dtv.tuner.TuningCompletedEvent; | |
| 15 | +import com.sun.dtv.tuner.TuningEvent; | |
| 16 | + | |
| 17 | +public class TesteAddTunerListener_Tune implements TunerListener, DTVTest, ScarceResourceListener { | |
| 18 | + | |
| 19 | + private DTVTestLog log; | |
| 20 | + private Tuner mainTuner; | |
| 21 | + | |
| 22 | + | |
| 23 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 24 | + // TODO Auto-generated method stub | |
| 25 | + | |
| 26 | + if(arg0 instanceof TuningCompletedEvent ){ | |
| 27 | + | |
| 28 | + log.success(); | |
| 29 | + | |
| 30 | + }else{ | |
| 31 | + | |
| 32 | + } | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + | |
| 37 | + public void destroy() { | |
| 38 | + if( ! mainTuner.isAvailable()) | |
| 39 | + mainTuner.release(); | |
| 40 | + } | |
| 41 | + | |
| 42 | + | |
| 43 | + public void init() { | |
| 44 | + // TODO Auto-generated method stub | |
| 45 | + Tuner[] tuner; | |
| 46 | + | |
| 47 | + tuner = Tuner.getInstances(); | |
| 48 | + | |
| 49 | + if (tuner.length > 0) { | |
| 50 | + | |
| 51 | + mainTuner = tuner[0]; | |
| 52 | + | |
| 53 | + try { | |
| 54 | + mainTuner.reserve(false, 100, this); | |
| 55 | + } catch (IllegalArgumentException e) { | |
| 56 | + // TODO Auto-generated catch block | |
| 57 | + System.out.println("EXE"); | |
| 58 | + e.printStackTrace(); | |
| 59 | + } catch (SecurityException e) { | |
| 60 | + // TODO Auto-generated catch block | |
| 61 | + System.out.println("EXE"); | |
| 62 | + e.printStackTrace(); | |
| 63 | + } catch (TimeoutException e) { | |
| 64 | + // TODO Auto-generated catch block | |
| 65 | + System.out.println("EXE"); | |
| 66 | + e.printStackTrace(); | |
| 67 | + } | |
| 68 | + | |
| 69 | + TransportStream ts = mainTuner.getCurrentTransportStream(); | |
| 70 | + | |
| 71 | + if(ts.getId() == 1850){ | |
| 72 | + | |
| 73 | + log.success(); | |
| 74 | + | |
| 75 | + }else{ | |
| 76 | + | |
| 77 | + log.failure(); | |
| 78 | + | |
| 79 | + } | |
| 80 | + | |
| 81 | + | |
| 82 | + } | |
| 83 | + | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void pause() { | |
| 87 | + // TODO Auto-generated method stub | |
| 88 | + | |
| 89 | + } | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + public void setLog(DTVTestLog log) { | |
| 94 | + // TODO Auto-generated method stub | |
| 95 | + this.log = log; | |
| 96 | + } | |
| 97 | + | |
| 98 | + | |
| 99 | + public void start() { | |
| 100 | + // TODO Auto-generated method stub | |
| 101 | + | |
| 102 | + } | |
| 103 | + | |
| 104 | + | |
| 105 | + public void releaseForced(ScarceResource arg0) { | |
| 106 | + // TODO Auto-generated method stub | |
| 107 | + | |
| 108 | + } | |
| 109 | + | |
| 110 | + | |
| 111 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 112 | + // TODO Auto-generated method stub | |
| 113 | + return false; | |
| 114 | + } | |
| 115 | + | |
| 116 | + | |
| 117 | + public void released(ScarceResource arg0) { | |
| 118 | + // TODO Auto-generated method stub | |
| 119 | + | |
| 120 | + } | |
| 121 | + | |
| 122 | + | |
| 123 | + public void setForm(Form form) { | |
| 124 | + // TODO Auto-generated method stub | |
| 125 | + | |
| 126 | + } | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteGetAvaliableTrasportStreams.java
0 → 100644
| ... | ... | @@ -0,0 +1,100 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.transport.TransportStream; | |
| 11 | +import com.sun.dtv.tuner.Tuner; | |
| 12 | + | |
| 13 | +public class TesteGetAvaliableTrasportStreams implements ScarceResourceListener, DTVTest{ | |
| 14 | + | |
| 15 | + private DTVTestLog log; | |
| 16 | + | |
| 17 | + public void destroy() { | |
| 18 | + // TODO Auto-generated method stub | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void init() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + Tuner[] tuner; | |
| 24 | + | |
| 25 | + tuner = Tuner.getInstances(); | |
| 26 | + | |
| 27 | + if (tuner.length > 0) { | |
| 28 | + | |
| 29 | + Tuner mainTuner = tuner[0]; | |
| 30 | + | |
| 31 | + try { | |
| 32 | + mainTuner.reserve(false, 100, this); | |
| 33 | + } catch (IllegalArgumentException e) { | |
| 34 | + // TODO Auto-generated catch block | |
| 35 | + System.out.println("EXE"); | |
| 36 | + e.printStackTrace(); | |
| 37 | + } catch (SecurityException e) { | |
| 38 | + // TODO Auto-generated catch block | |
| 39 | + System.out.println("EXE"); | |
| 40 | + e.printStackTrace(); | |
| 41 | + } catch (TimeoutException e) { | |
| 42 | + // TODO Auto-generated catch block | |
| 43 | + System.out.println("EXE"); | |
| 44 | + e.printStackTrace(); | |
| 45 | + } | |
| 46 | + | |
| 47 | + TransportStream[] ts = mainTuner.getAvailableTransportStreams(); | |
| 48 | + | |
| 49 | + if(ts.length >= 1){ | |
| 50 | + | |
| 51 | + log.success(); | |
| 52 | + | |
| 53 | + }else{ | |
| 54 | + | |
| 55 | + | |
| 56 | + log.failure(); | |
| 57 | + | |
| 58 | + } | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + } | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void pause() { | |
| 66 | + // TODO Auto-generated method stub | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setLog(DTVTestLog log) { | |
| 71 | + // TODO Auto-generated method stub | |
| 72 | + this.log = log; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void start() { | |
| 76 | + // TODO Auto-generated method stub | |
| 77 | + | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void releaseForced(ScarceResource arg0) { | |
| 81 | + // TODO Auto-generated method stub | |
| 82 | + | |
| 83 | + } | |
| 84 | + | |
| 85 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + return false; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void released(ScarceResource arg0) { | |
| 91 | + // TODO Auto-generated method stub | |
| 92 | + | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setForm(Form form) { | |
| 96 | + // TODO Auto-generated method stub | |
| 97 | + | |
| 98 | + } | |
| 99 | + | |
| 100 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteGetCurrentTransporteStream.java
0 → 100644
| ... | ... | @@ -0,0 +1,100 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.transport.TransportStream; | |
| 11 | +import com.sun.dtv.tuner.Tuner; | |
| 12 | + | |
| 13 | +public class TesteGetCurrentTransporteStream implements DTVTest, | |
| 14 | + ScarceResourceListener { | |
| 15 | + | |
| 16 | + private DTVTestLog log; | |
| 17 | + private Tuner mainTuner ; | |
| 18 | + | |
| 19 | + public void destroy() { | |
| 20 | + if( ! mainTuner.isAvailable()) | |
| 21 | + mainTuner.release(); | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void init() { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + Tuner[] tuner; | |
| 27 | + | |
| 28 | + tuner = Tuner.getInstances(); | |
| 29 | + | |
| 30 | + if (tuner.length > 0) { | |
| 31 | + | |
| 32 | + mainTuner = tuner[0]; | |
| 33 | + | |
| 34 | + try { | |
| 35 | + mainTuner.reserve(false, 100, this); | |
| 36 | + } catch (IllegalArgumentException e) { | |
| 37 | + // TODO Auto-generated catch block | |
| 38 | + System.out.println("EXE"); | |
| 39 | + e.printStackTrace(); | |
| 40 | + } catch (SecurityException e) { | |
| 41 | + // TODO Auto-generated catch block | |
| 42 | + System.out.println("EXE"); | |
| 43 | + e.printStackTrace(); | |
| 44 | + } catch (TimeoutException e) { | |
| 45 | + // TODO Auto-generated catch block | |
| 46 | + System.out.println("EXE"); | |
| 47 | + e.printStackTrace(); | |
| 48 | + } | |
| 49 | + | |
| 50 | + TransportStream ts = mainTuner.getCurrentTransportStream(); | |
| 51 | + | |
| 52 | + if(ts.getId() == 1850){ | |
| 53 | + | |
| 54 | + log.success(); | |
| 55 | + | |
| 56 | + }else{ | |
| 57 | + | |
| 58 | + log.failure(); | |
| 59 | + | |
| 60 | + } | |
| 61 | + | |
| 62 | + } | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void pause() { | |
| 66 | + // TODO Auto-generated method stub | |
| 67 | + | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setLog(DTVTestLog log) { | |
| 71 | + // TODO Auto-generated method stub | |
| 72 | + this.log = log; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void start() { | |
| 76 | + // TODO Auto-generated method stub | |
| 77 | + | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void releaseForced(ScarceResource arg0) { | |
| 81 | + // TODO Auto-generated method stub | |
| 82 | + | |
| 83 | + } | |
| 84 | + | |
| 85 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + return false; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void released(ScarceResource arg0) { | |
| 91 | + // TODO Auto-generated method stub | |
| 92 | + | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setForm(Form form) { | |
| 96 | + // TODO Auto-generated method stub | |
| 97 | + | |
| 98 | + } | |
| 99 | + | |
| 100 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteGetDeliverySystemType.java
0 → 100644
| ... | ... | @@ -0,0 +1,62 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import javax.tv.service.navigation.DeliverySystemType; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +import com.sun.dtv.lwuit.Form; | |
| 9 | +import com.sun.dtv.tuner.Tuner; | |
| 10 | +import com.sun.dtv.tuner.TunerListener; | |
| 11 | +import com.sun.dtv.tuner.TuningEvent; | |
| 12 | + | |
| 13 | +public class TesteGetDeliverySystemType implements TunerListener, DTVTest{ | |
| 14 | + | |
| 15 | + private DTVTestLog log; | |
| 16 | + private Tuner mainTuner; | |
| 17 | + | |
| 18 | + public void destroy() { | |
| 19 | + // TODO Auto-generated method stub | |
| 20 | + } | |
| 21 | + | |
| 22 | + | |
| 23 | + public void init() { | |
| 24 | + // TODO Auto-generated method stub | |
| 25 | + | |
| 26 | + DeliverySystemType delivery; | |
| 27 | + | |
| 28 | + mainTuner = new Tuner(); | |
| 29 | + delivery = mainTuner.getDeliverySystemType(); | |
| 30 | + | |
| 31 | + if( delivery == DeliverySystemType.TERRESTRIAL){ | |
| 32 | + log.success(); | |
| 33 | + }else{ | |
| 34 | + log.failure(); | |
| 35 | + } | |
| 36 | + | |
| 37 | + } | |
| 38 | + | |
| 39 | + public void pause() { | |
| 40 | + // TODO Auto-generated method stub | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setLog(DTVTestLog log) { | |
| 44 | + // TODO Auto-generated method stub | |
| 45 | + this.log = log; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void start() { | |
| 49 | + // TODO Auto-generated method stub | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 53 | + // TODO Auto-generated method stub | |
| 54 | + | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setForm(Form form) { | |
| 58 | + // TODO Auto-generated method stub | |
| 59 | + | |
| 60 | + } | |
| 61 | + | |
| 62 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteGetInstances.java
0 → 100644
| ... | ... | @@ -0,0 +1,73 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.tuner.Tuner; | |
| 8 | +import com.sun.dtv.tuner.TunerListener; | |
| 9 | +import com.sun.dtv.tuner.TuningEvent; | |
| 10 | + | |
| 11 | +public class TesteGetInstances implements TunerListener, DTVTest { | |
| 12 | + | |
| 13 | + | |
| 14 | + private DTVTestLog log; | |
| 15 | + | |
| 16 | + | |
| 17 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 18 | + // TODO Auto-generated method stub | |
| 19 | + } | |
| 20 | + | |
| 21 | + | |
| 22 | + public void destroy() { | |
| 23 | + // TODO Auto-generated method stub | |
| 24 | + | |
| 25 | + } | |
| 26 | + | |
| 27 | + | |
| 28 | + public void init() { | |
| 29 | + // TODO Auto-generated method stub | |
| 30 | + | |
| 31 | + Tuner[] tuner; | |
| 32 | + | |
| 33 | + tuner = Tuner.getInstances(); | |
| 34 | + | |
| 35 | + if(tuner.length > 0){ | |
| 36 | + | |
| 37 | + System.out.println("Existe tuner"); | |
| 38 | + | |
| 39 | + log.success(); | |
| 40 | + | |
| 41 | + }else{ | |
| 42 | + | |
| 43 | + System.out.println("Nao existe tuner"); | |
| 44 | + | |
| 45 | + log.failure(); | |
| 46 | + } | |
| 47 | + } | |
| 48 | + | |
| 49 | + | |
| 50 | + public void pause() { | |
| 51 | + // TODO Auto-generated method stub | |
| 52 | + | |
| 53 | + } | |
| 54 | + | |
| 55 | + | |
| 56 | + public void setLog(DTVTestLog log) { | |
| 57 | + // TODO Auto-generated method stub | |
| 58 | + this.log =log; | |
| 59 | + } | |
| 60 | + | |
| 61 | + | |
| 62 | + public void start() { | |
| 63 | + // TODO Auto-generated method stub | |
| 64 | + | |
| 65 | + } | |
| 66 | + | |
| 67 | + | |
| 68 | + public void setForm(Form form) { | |
| 69 | + // TODO Auto-generated method stub | |
| 70 | + | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteIsAvaliable.java
0 → 100644
| ... | ... | @@ -0,0 +1,83 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.tuner.Tuner; | |
| 9 | +import com.sun.dtv.tuner.TunerListener; | |
| 10 | +import com.sun.dtv.tuner.TuningEvent; | |
| 11 | + | |
| 12 | +public class TesteIsAvaliable implements TunerListener,DTVTest { | |
| 13 | + | |
| 14 | + private DTVTestLog log; | |
| 15 | + | |
| 16 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void destroy() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void init() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + Tuner[] tuner; | |
| 30 | + | |
| 31 | + tuner = Tuner.getInstances(); | |
| 32 | + | |
| 33 | + if (tuner.length > 0) { | |
| 34 | + Tuner mainTuner = tuner[0]; | |
| 35 | + | |
| 36 | + if (mainTuner.isAvailable() == true) { | |
| 37 | + System.out.println("Nao esta sendo usado " | |
| 38 | + + mainTuner.isAvailable()); | |
| 39 | + | |
| 40 | + log.success(); | |
| 41 | + | |
| 42 | + } else { | |
| 43 | + System.out.println("Nao esta sendo usado " | |
| 44 | + + mainTuner.isAvailable()); | |
| 45 | + | |
| 46 | + log.failure(); | |
| 47 | + | |
| 48 | + } | |
| 49 | + | |
| 50 | + } | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void pause() { | |
| 54 | + // TODO Auto-generated method stub | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setLog(DTVTestLog log) { | |
| 58 | + // TODO Auto-generated method stub | |
| 59 | + this.log = log; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void start() { | |
| 63 | + // TODO Auto-generated method stub | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void releaseForced(ScarceResource arg0) { | |
| 67 | + // TODO Auto-generated method stub | |
| 68 | + } | |
| 69 | + | |
| 70 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 71 | + // TODO Auto-generated method stub | |
| 72 | + return false; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void released(ScarceResource arg0) { | |
| 76 | + // TODO Auto-generated method stub | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setForm(Form form) { | |
| 80 | + // TODO Auto-generated method stub | |
| 81 | + } | |
| 82 | + | |
| 83 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteRelease.java
0 → 100644
| ... | ... | @@ -0,0 +1,110 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.tuner.Tuner; | |
| 11 | +import com.sun.dtv.tuner.TunerListener; | |
| 12 | +import com.sun.dtv.tuner.TuningEvent; | |
| 13 | + | |
| 14 | +public class TesteRelease implements TunerListener,ScarceResourceListener,DTVTest{ | |
| 15 | + | |
| 16 | + private DTVTestLog log; | |
| 17 | + | |
| 18 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 19 | + // TODO Auto-generated method stub | |
| 20 | + | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void destroy() { | |
| 24 | + // TODO Auto-generated method stub | |
| 25 | + | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void init() { | |
| 29 | + // TODO Auto-generated method stub | |
| 30 | + | |
| 31 | + Tuner[] tuner; | |
| 32 | + | |
| 33 | + tuner = Tuner.getInstances(); | |
| 34 | + | |
| 35 | + if (tuner.length > 0) { | |
| 36 | + | |
| 37 | + Tuner mainTuner = tuner[0]; | |
| 38 | + | |
| 39 | + try { | |
| 40 | + mainTuner.reserve(true, 100, this); | |
| 41 | + } catch (IllegalArgumentException e) { | |
| 42 | + // TODO Auto-generated catch block | |
| 43 | + System.out.println("EXE"); | |
| 44 | + e.printStackTrace(); | |
| 45 | + } catch (SecurityException e) { | |
| 46 | + // TODO Auto-generated catch block | |
| 47 | + System.out.println("EXE"); | |
| 48 | + e.printStackTrace(); | |
| 49 | + } catch (TimeoutException e) { | |
| 50 | + // TODO Auto-generated catch block | |
| 51 | + System.out.println("EXE"); | |
| 52 | + e.printStackTrace(); | |
| 53 | + } | |
| 54 | + | |
| 55 | + mainTuner.release(); | |
| 56 | + | |
| 57 | + if (mainTuner.isAvailable() == true) { | |
| 58 | + | |
| 59 | + System.out.println("Nao esta sendo usado " | |
| 60 | + + mainTuner.isAvailable()); | |
| 61 | + | |
| 62 | + log.success(); | |
| 63 | + | |
| 64 | + } else { | |
| 65 | + | |
| 66 | + System.out.println("Nao esta sendo usado " | |
| 67 | + + mainTuner.isAvailable()); | |
| 68 | + | |
| 69 | + log.failure(); | |
| 70 | + | |
| 71 | + } | |
| 72 | + | |
| 73 | + } | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void pause() { | |
| 77 | + // TODO Auto-generated method stub | |
| 78 | + | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setLog(DTVTestLog log) { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + this.log = log; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void start() { | |
| 87 | + // TODO Auto-generated method stub | |
| 88 | + | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void releaseForced(ScarceResource arg0) { | |
| 92 | + // TODO Auto-generated method stub | |
| 93 | + | |
| 94 | + } | |
| 95 | + | |
| 96 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 97 | + // TODO Auto-generated method stub | |
| 98 | + return false; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void released(ScarceResource arg0) { | |
| 102 | + // TODO Auto-generated method stub | |
| 103 | + | |
| 104 | + } | |
| 105 | + | |
| 106 | + public void setForm(Form form) { | |
| 107 | + // TODO Auto-generated method stub | |
| 108 | + | |
| 109 | + } | |
| 110 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteReserve.java
0 → 100644
| ... | ... | @@ -0,0 +1,109 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.tuner.Tuner; | |
| 11 | +import com.sun.dtv.tuner.TunerListener; | |
| 12 | +import com.sun.dtv.tuner.TuningEvent; | |
| 13 | + | |
| 14 | +public class TesteReserve implements TunerListener, ScarceResourceListener ,DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog log; | |
| 17 | + private Tuner mainTuner; | |
| 18 | + | |
| 19 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 20 | + // TODO Auto-generated method stub | |
| 21 | + | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void destroy() { | |
| 25 | + if( ! mainTuner.isAvailable()) | |
| 26 | + mainTuner.release(); | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + // TODO Auto-generated method stub | |
| 31 | + | |
| 32 | + Tuner[] tuner; | |
| 33 | + | |
| 34 | + tuner = Tuner.getInstances(); | |
| 35 | + | |
| 36 | + if (tuner.length > 0) { | |
| 37 | + | |
| 38 | + mainTuner = tuner[0]; | |
| 39 | + | |
| 40 | + try { | |
| 41 | + mainTuner.reserve(true, 1000, this); | |
| 42 | + } catch (IllegalArgumentException e) { | |
| 43 | + // TODO Auto-generated catch block | |
| 44 | + System.out.println("EXE"); | |
| 45 | + e.printStackTrace(); | |
| 46 | + } catch (SecurityException e) { | |
| 47 | + // TODO Auto-generated catch block | |
| 48 | + System.out.println("EXE"); | |
| 49 | + e.printStackTrace(); | |
| 50 | + } catch (TimeoutException e) { | |
| 51 | + // TODO Auto-generated catch block | |
| 52 | + System.out.println("EXE"); | |
| 53 | + e.printStackTrace(); | |
| 54 | + } | |
| 55 | + | |
| 56 | + if (mainTuner.isAvailable() == false) { | |
| 57 | + | |
| 58 | + System.out | |
| 59 | + .println("Nao esta sendo usado " + mainTuner.isAvailable()); | |
| 60 | + | |
| 61 | + log.success(); | |
| 62 | + | |
| 63 | + } else { | |
| 64 | + | |
| 65 | + System.out.println("Nao esta sendo usado " + mainTuner.isAvailable()); | |
| 66 | + | |
| 67 | + log.failure(); | |
| 68 | + | |
| 69 | + } | |
| 70 | + | |
| 71 | + } | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void pause() { | |
| 75 | + // TODO Auto-generated method stub | |
| 76 | + | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setLog(DTVTestLog log) { | |
| 80 | + // TODO Auto-generated method stub | |
| 81 | + this.log =log; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void start() { | |
| 85 | + // TODO Auto-generated method stub | |
| 86 | + | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void releaseForced(ScarceResource arg0) { | |
| 90 | + // TODO Auto-generated method stub | |
| 91 | + | |
| 92 | + } | |
| 93 | + | |
| 94 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 95 | + // TODO Auto-generated method stub | |
| 96 | + return false; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void released(ScarceResource arg0) { | |
| 100 | + // TODO Auto-generated method stub | |
| 101 | + | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setForm(Form form) { | |
| 105 | + // TODO Auto-generated method stub | |
| 106 | + | |
| 107 | + } | |
| 108 | + | |
| 109 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/tuner/TesteReserveOne.java
0 → 100644
| ... | ... | @@ -0,0 +1,101 @@ |
| 1 | +package plaver.com.sun.dtv.tuner; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.tuner.Tuner; | |
| 11 | +import com.sun.dtv.tuner.TunerListener; | |
| 12 | +import com.sun.dtv.tuner.TuningEvent; | |
| 13 | + | |
| 14 | +public class TesteReserveOne implements TunerListener, ScarceResourceListener, DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog log; | |
| 17 | + private Tuner mainTuner; | |
| 18 | + | |
| 19 | + | |
| 20 | + public void receiveTuningEvent(TuningEvent arg0) { | |
| 21 | + // TODO Auto-generated method stub | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void releaseForced(ScarceResource arg0) { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + } | |
| 27 | + | |
| 28 | + public boolean releaseRequested(ScarceResource arg0) { | |
| 29 | + // TODO Auto-generated method stub | |
| 30 | + return false; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void released(ScarceResource arg0) { | |
| 34 | + // TODO Auto-generated method stub | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void destroy() { | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | + | |
| 42 | + public void init() { | |
| 43 | + // TODO Auto-generated method stub | |
| 44 | + | |
| 45 | + mainTuner = new Tuner(); | |
| 46 | + | |
| 47 | + try { | |
| 48 | + mainTuner = Tuner.reserveOne(true, 1000, this); | |
| 49 | + } catch (SecurityException e) { | |
| 50 | + // TODO Auto-generated catch block | |
| 51 | + e.printStackTrace(); | |
| 52 | + } catch (IllegalArgumentException e) { | |
| 53 | + // TODO Auto-generated catch block | |
| 54 | + e.printStackTrace(); | |
| 55 | + } catch (TimeoutException e) { | |
| 56 | + // TODO Auto-generated catch block | |
| 57 | + e.printStackTrace(); | |
| 58 | + } | |
| 59 | + | |
| 60 | + if(mainTuner.isAvailable() == false ){ | |
| 61 | + | |
| 62 | + System.out.println("Nao esta sendo usado " | |
| 63 | + + mainTuner.isAvailable()); | |
| 64 | + | |
| 65 | + log.success(); | |
| 66 | + | |
| 67 | + }else{ | |
| 68 | + | |
| 69 | + System.out.println("Nao esta sendo usado " + mainTuner.isAvailable()); | |
| 70 | + | |
| 71 | + log.failure(); | |
| 72 | + | |
| 73 | + } | |
| 74 | + } | |
| 75 | + | |
| 76 | + | |
| 77 | + public void pause() { | |
| 78 | + // TODO Auto-generated method stub | |
| 79 | + | |
| 80 | + } | |
| 81 | + | |
| 82 | + | |
| 83 | + public void setLog(DTVTestLog log) { | |
| 84 | + // TODO Auto-generated method stub | |
| 85 | + this.log = log; | |
| 86 | + | |
| 87 | + } | |
| 88 | + | |
| 89 | + | |
| 90 | + public void start() { | |
| 91 | + // TODO Auto-generated method stub | |
| 92 | + | |
| 93 | + } | |
| 94 | + | |
| 95 | + | |
| 96 | + public void setForm(Form form) { | |
| 97 | + // TODO Auto-generated method stub | |
| 98 | + | |
| 99 | + } | |
| 100 | + | |
| 101 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/DownloadableFont/InstallFontTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,81 @@ |
| 1 | +package plaver.com.sun.dtv.ui.DownloadableFont; | |
| 2 | + | |
| 3 | +import java.io.File; | |
| 4 | +import java.io.IOException; | |
| 5 | + | |
| 6 | +import plaver.dtvtest.DTVTest; | |
| 7 | +import plaver.dtvtest.DTVTestLog; | |
| 8 | + | |
| 9 | + | |
| 10 | +import com.sun.dtv.lwuit.Form; | |
| 11 | +import com.sun.dtv.ui.DownloadableFont; | |
| 12 | +import com.sun.dtv.ui.FontFileException; | |
| 13 | + | |
| 14 | +public class InstallFontTest implements DTVTest { | |
| 15 | + private DTVTestLog log; | |
| 16 | + | |
| 17 | + | |
| 18 | + public void destroy() { | |
| 19 | + // TODO Auto-generated method stub | |
| 20 | + } | |
| 21 | + | |
| 22 | + public void init() { | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setLog(DTVTestLog log) { | |
| 31 | + this.log =log; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + if(criaDownloadableFonts() == 0) | |
| 37 | + log.failure(); | |
| 38 | + else | |
| 39 | + log.success(); | |
| 40 | + | |
| 41 | + } | |
| 42 | + | |
| 43 | + | |
| 44 | + public static final int criaDownloadableFonts() | |
| 45 | + { | |
| 46 | + String pathfont = "plaver/com/sun/dtv/ui/DownloadableFont/fonts/Tiresias_803.ttf"; | |
| 47 | + File font = new File(pathfont); | |
| 48 | + try | |
| 49 | + { | |
| 50 | + DownloadableFont.installFont(font.toURI().toURL()); | |
| 51 | + | |
| 52 | + } | |
| 53 | + catch(IllegalArgumentException e) | |
| 54 | + { | |
| 55 | + e.printStackTrace(); | |
| 56 | + return 0; | |
| 57 | + } | |
| 58 | + catch(SecurityException e) | |
| 59 | + { | |
| 60 | + e.printStackTrace(); | |
| 61 | + return 0; | |
| 62 | + } | |
| 63 | + catch(IOException e) | |
| 64 | + { | |
| 65 | + e.printStackTrace(); | |
| 66 | + return 0; | |
| 67 | + } | |
| 68 | + catch(FontFileException e) | |
| 69 | + { | |
| 70 | + e.printStackTrace(); | |
| 71 | + return 0; | |
| 72 | + } | |
| 73 | + | |
| 74 | + return 1; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setForm(Form form) { | |
| 78 | + // TODO Auto-generated method stub | |
| 79 | + } | |
| 80 | + | |
| 81 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/DownloadableFont/InstallFontTimeOutTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,90 @@ |
| 1 | +package plaver.com.sun.dtv.ui.DownloadableFont; | |
| 2 | + | |
| 3 | +import java.io.File; | |
| 4 | +import java.io.IOException; | |
| 5 | + | |
| 6 | +import plaver.dtvtest.DTVTest; | |
| 7 | +import plaver.dtvtest.DTVTestLog; | |
| 8 | + | |
| 9 | + | |
| 10 | +import com.sun.dtv.lwuit.Form; | |
| 11 | +import com.sun.dtv.ui.DownloadableFont; | |
| 12 | +import com.sun.dtv.ui.FontFileException; | |
| 13 | + | |
| 14 | +public class InstallFontTimeOutTest implements DTVTest{ | |
| 15 | + | |
| 16 | + private DTVTestLog log; | |
| 17 | + | |
| 18 | + public void destroy() { | |
| 19 | + // TODO Auto-generated method stub | |
| 20 | + } | |
| 21 | + | |
| 22 | + public void init() { | |
| 23 | + // TODO Auto-generated method stub | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setLog(DTVTestLog log) { | |
| 31 | + this.log =log; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + | |
| 36 | + if(criaDownloadableFonts() == 0) | |
| 37 | + log.failure(); | |
| 38 | + else | |
| 39 | + log.success(); | |
| 40 | + | |
| 41 | + } | |
| 42 | + | |
| 43 | + public static final int criaDownloadableFonts () | |
| 44 | + { | |
| 45 | + String pathfont = "plaver/com/sun/dtv/ui/DownloadableFont/fonts/Tiresias_803.ttf";//Airmole_Shaded.ttf; | |
| 46 | + File file = new File(pathfont); | |
| 47 | + | |
| 48 | + try | |
| 49 | + { | |
| 50 | + DownloadableFont.installFont(file.toURI().toURL(),4000); | |
| 51 | + | |
| 52 | + } | |
| 53 | + catch(IllegalArgumentException e) | |
| 54 | + { | |
| 55 | + e.printStackTrace(); | |
| 56 | + return 0; | |
| 57 | + } | |
| 58 | + catch(SecurityException e) | |
| 59 | + { | |
| 60 | + e.printStackTrace(); | |
| 61 | + return 0; | |
| 62 | + } | |
| 63 | + catch(IOException e) | |
| 64 | + { | |
| 65 | + e.printStackTrace(); | |
| 66 | + return 0; | |
| 67 | + } | |
| 68 | + catch(FontFileException e) | |
| 69 | + { | |
| 70 | + e.printStackTrace(); | |
| 71 | + return 0; | |
| 72 | + } | |
| 73 | + return 1; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public String nameClass() { | |
| 77 | + // TODO Auto-generated method stub | |
| 78 | + return " DownloadableFont"; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public String nameMetodo() { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + return "installFont(URL url, int timeout)"; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void setForm(Form form) { | |
| 87 | + // TODO Auto-generated method stub | |
| 88 | + } | |
| 89 | + | |
| 90 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/DownloadableFont/fonts/Tiresias_803.ttf
0 → 100644
No preview for this file type
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/DownloadableFont/fonts/tiresias.res
0 → 100644
No preview for this file type
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/AddResourceTypeListenerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,113 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.ui.Device; | |
| 12 | +import com.sun.dtv.ui.Screen; | |
| 13 | + | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * @author Leandro Henrique | |
| 17 | + */ | |
| 18 | + | |
| 19 | +public class AddResourceTypeListenerTest implements DTVTest, ResourceTypeListener, ScarceResourceListener{ | |
| 20 | + | |
| 21 | + private DTVTestLog dtvTestLog; | |
| 22 | + | |
| 23 | + private boolean eventoRecedido; | |
| 24 | + private Screen currentScreen; | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + Device device = Device.getInstance(); | |
| 32 | + currentScreen = device.getDefaultScreen(); | |
| 33 | + } | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * Será gerado um evento de release. Caso o listener adicionado seja notificado, o teste foi realizado com sucesso. | |
| 37 | + * Caso contrário, a instância irá gerar timeout. | |
| 38 | + */ | |
| 39 | + public void start() { | |
| 40 | + | |
| 41 | + Screen.addResourceTypeListener(this); | |
| 42 | + | |
| 43 | + if( ! currentScreen.isAvailable()) | |
| 44 | + currentScreen.release(); | |
| 45 | + | |
| 46 | + try { | |
| 47 | + currentScreen.reserve(true, -1, this); | |
| 48 | + } catch (IllegalArgumentException e2) { | |
| 49 | + e2.printStackTrace(); | |
| 50 | + } catch (TimeoutException e2) { | |
| 51 | + e2.printStackTrace(); | |
| 52 | + } | |
| 53 | + | |
| 54 | + /* Espera o evento ser recebido */ | |
| 55 | + while( ! eventoRecedido) { | |
| 56 | + | |
| 57 | + try { | |
| 58 | + Thread.sleep(300); | |
| 59 | + } catch (InterruptedException e) { | |
| 60 | + e.printStackTrace(); | |
| 61 | + break; | |
| 62 | + } | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + if(eventoRecedido) | |
| 67 | + dtvTestLog.success(); | |
| 68 | + else | |
| 69 | + dtvTestLog.failure(); | |
| 70 | + | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void reserved(int availableCount) { | |
| 74 | + /* Evento foi recebido corretamente */ | |
| 75 | + eventoRecedido = true; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void released(int availableCount) { | |
| 79 | + // TODO Auto-generated method stub | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void pause() { | |
| 83 | + // TODO Auto-generated method stub | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void destroy() { | |
| 87 | + Screen.removeResourceTypeListener(this); | |
| 88 | + | |
| 89 | + if( ! currentScreen.isAvailable()) | |
| 90 | + currentScreen.release(); | |
| 91 | + } | |
| 92 | + | |
| 93 | + | |
| 94 | + public boolean releaseRequested(ScarceResource resource) { | |
| 95 | + // TODO Auto-generated method stub | |
| 96 | + return false; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void releaseForced(ScarceResource resource) { | |
| 100 | + // TODO Auto-generated method stub | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void released(ScarceResource resource) { | |
| 104 | + // TODO Auto-generated method stub | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setForm(Form form) { | |
| 108 | + // TODO Auto-generated method stub | |
| 109 | + | |
| 110 | + } | |
| 111 | + | |
| 112 | +} | |
| 113 | + | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/AddScarceResourceListenerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,87 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.ui.Device; | |
| 11 | +import com.sun.dtv.ui.Screen; | |
| 12 | + | |
| 13 | + | |
| 14 | +public class AddScarceResourceListenerTest implements DTVTest, ScarceResourceListener { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + private Screen currentScreen; | |
| 18 | + | |
| 19 | + private boolean eventoRecebido_1; | |
| 20 | + private boolean eventoRecebido_2; | |
| 21 | + private boolean eventoRecebido_3; | |
| 22 | + | |
| 23 | + | |
| 24 | + public void setLog(DTVTestLog log) { | |
| 25 | + this.dtvTestLog = log; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void init() { | |
| 29 | + Device device = Device.getInstance(); | |
| 30 | + currentScreen = device.getDefaultScreen(); | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void start() { | |
| 34 | + | |
| 35 | + currentScreen.addScarceResourceListener(this); | |
| 36 | + | |
| 37 | + if( ! currentScreen.isAvailable()) | |
| 38 | + currentScreen.release(); | |
| 39 | + | |
| 40 | + try { | |
| 41 | + currentScreen.reserve(false, -1, this); | |
| 42 | + currentScreen.reserve(true , -1, this); | |
| 43 | + } catch (IllegalArgumentException e) { | |
| 44 | + e.printStackTrace(); | |
| 45 | + } catch (TimeoutException e) { | |
| 46 | + e.printStackTrace(); | |
| 47 | + } | |
| 48 | + | |
| 49 | + currentScreen.release(); | |
| 50 | + | |
| 51 | + if(eventoRecebido_1 == eventoRecebido_2 == eventoRecebido_3 == true) | |
| 52 | + dtvTestLog.success(); | |
| 53 | + else | |
| 54 | + dtvTestLog.failure(); | |
| 55 | + | |
| 56 | + } | |
| 57 | + | |
| 58 | + public boolean releaseRequested(ScarceResource resource) { | |
| 59 | + eventoRecebido_1 = true; | |
| 60 | + return false; /* Recurso não liberado */ | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void releaseForced(ScarceResource resource) { | |
| 64 | + eventoRecebido_2 = true; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void released(ScarceResource resource) { | |
| 68 | + eventoRecebido_3 = true; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void pause() { | |
| 72 | + // TODO Auto-generated method stub | |
| 73 | + | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void destroy() { | |
| 77 | + // TODO Auto-generated method stub | |
| 78 | + | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setForm(Form form) { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + | |
| 84 | + } | |
| 85 | + | |
| 86 | + | |
| 87 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/CallSeriallyAndWaitTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,38 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class CallSeriallyAndWaitTest implements DTVTest{ | |
| 9 | + | |
| 10 | +private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + } | |
| 19 | + | |
| 20 | + public void start() { | |
| 21 | + // TODO Auto-generated method stub | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void pause() { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void destroy() { | |
| 29 | + // TODO Auto-generated method stub | |
| 30 | + | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setForm(Form form) { | |
| 34 | + // TODO Auto-generated method stub | |
| 35 | + | |
| 36 | + } | |
| 37 | + | |
| 38 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/CallSeriallyTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class CallSeriallyTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/GetAllPlanesTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class GetAllPlanesTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/GetAvailableScreensTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class GetAvailableScreensTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/GetBestSetupTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class GetBestSetupTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/GetCoherentPlaneSetupsTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class GetCoherentPlaneSetupsTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/GetCurrentScreenTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class GetCurrentScreenTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/Screen/GetDefaultScreenTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package plaver.com.sun.dtv.ui.Screen; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | +public class GetDefaultScreenTest implements DTVTest { | |
| 9 | + | |
| 10 | + private DTVTestLog dtvTestLog; | |
| 11 | + | |
| 12 | + public void setLog(DTVTestLog log) { | |
| 13 | + this.dtvTestLog = log; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void init() { | |
| 17 | + // TODO Auto-generated method stub | |
| 18 | + | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void start() { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void pause() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void destroy() { | |
| 32 | + // TODO Auto-generated method stub | |
| 33 | + | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setForm(Form form) { | |
| 37 | + // TODO Auto-generated method stub | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/AddResourceTypeListenerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,121 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * @author Leandro Henrique | |
| 15 | + */ | |
| 16 | + | |
| 17 | +public class AddResourceTypeListenerTest implements DTVTest, ResourceTypeListener, ScarceResourceListener{ | |
| 18 | + | |
| 19 | + private DTVTestLog dtvTestLog; | |
| 20 | + | |
| 21 | + private KeyEvent recursoKE; | |
| 22 | + private boolean eventoRecedido; | |
| 23 | + | |
| 24 | + public void setForm(Form form) { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void setLog(DTVTestLog log) { | |
| 29 | + this.dtvTestLog = log; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void init() { | |
| 33 | + // TODO Auto-generated method stub | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * Será gerado um evento de release. Caso o listener adicionado seja notificado, o teste foi realizado com sucesso. | |
| 38 | + * Caso contrário, a instância irá gerar timeout. | |
| 39 | + */ | |
| 40 | + public void start() { | |
| 41 | + | |
| 42 | + determinaEventoKE(); | |
| 43 | + KeyEvent.addResourceTypeListener(this); | |
| 44 | + | |
| 45 | + determinaEventoKE(); | |
| 46 | + if( ! recursoKE.isAvailable()) | |
| 47 | + recursoKE.release(); | |
| 48 | + | |
| 49 | + try { | |
| 50 | + recursoKE.reserve(true, -1, this); | |
| 51 | + } catch (IllegalArgumentException e1) { | |
| 52 | + e1.printStackTrace(); | |
| 53 | + } catch (TimeoutException e1) { | |
| 54 | + e1.printStackTrace(); | |
| 55 | + } | |
| 56 | + | |
| 57 | + /* Espera o evento ser recebido */ | |
| 58 | + while( ! eventoRecedido) { | |
| 59 | + | |
| 60 | + try { | |
| 61 | + Thread.sleep(300); | |
| 62 | + } catch (InterruptedException e) { | |
| 63 | + e.printStackTrace(); | |
| 64 | + break; | |
| 65 | + } | |
| 66 | + | |
| 67 | + } | |
| 68 | + | |
| 69 | + if(eventoRecedido) | |
| 70 | + dtvTestLog.success(); | |
| 71 | + else | |
| 72 | + dtvTestLog.failure(); | |
| 73 | + | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void reserved(int availableCount) { | |
| 77 | + /* Evento foi recebido corretamente */ | |
| 78 | + eventoRecedido = true; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void released(int availableCount) { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + } | |
| 84 | + | |
| 85 | + private void determinaEventoKE() { | |
| 86 | + recursoKE = new KeyEvent(null, //Componente que originou o evento | |
| 87 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 88 | + 0, //Tempo que o evento ocorreu | |
| 89 | + 0, //Modificadores | |
| 90 | + KeyEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 91 | + KeyEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 92 | + ); | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void pause() { | |
| 96 | + // TODO Auto-generated method stub | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void destroy() { | |
| 100 | + KeyEvent.removeResourceTypeListener(this); | |
| 101 | + | |
| 102 | + if( ! recursoKE.isAvailable()) | |
| 103 | + recursoKE.release(); | |
| 104 | + } | |
| 105 | + | |
| 106 | + | |
| 107 | + public boolean releaseRequested(ScarceResource resource) { | |
| 108 | + // TODO Auto-generated method stub | |
| 109 | + return false; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void releaseForced(ScarceResource resource) { | |
| 113 | + // TODO Auto-generated method stub | |
| 114 | + | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void released(ScarceResource resource) { | |
| 118 | + // TODO Auto-generated method stub | |
| 119 | + } | |
| 120 | + | |
| 121 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/GetInstancesTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,49 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * @author Leandro Henrique | |
| 11 | + */ | |
| 12 | + | |
| 13 | +public class GetInstancesTest implements DTVTest { | |
| 14 | + | |
| 15 | + private DTVTestLog dtvTestLog; | |
| 16 | + | |
| 17 | + public void setForm(Form form) { | |
| 18 | + // TODO Auto-generated method stub | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void setLog(DTVTestLog log) { | |
| 22 | + this.dtvTestLog = log; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void init() { | |
| 26 | + // TODO Auto-generated method stub | |
| 27 | + } | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * Verifica se {@link KeyEvent#getInstances()} retorna um vetor de KeyEvent | |
| 31 | + */ | |
| 32 | + public void start() { | |
| 33 | + | |
| 34 | + if(KeyEvent.getInstances() instanceof KeyEvent[] ) | |
| 35 | + dtvTestLog.success(); | |
| 36 | + else | |
| 37 | + dtvTestLog.failure(); | |
| 38 | + | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void pause() { | |
| 42 | + // TODO Auto-generated method stub | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void destroy() { | |
| 46 | + // TODO Auto-generated method stub | |
| 47 | + } | |
| 48 | + | |
| 49 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/IsAvailableTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,98 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * @author Leandro Henrique | |
| 14 | + */ | |
| 15 | + | |
| 16 | +public class IsAvailableTest implements DTVTest, ScarceResourceListener { | |
| 17 | + | |
| 18 | + private DTVTestLog dtvTestLog; | |
| 19 | + private KeyEvent recursoKE; | |
| 20 | + | |
| 21 | + public void setForm(Form form) { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + determinaEventoKE(); | |
| 31 | + } | |
| 32 | + | |
| 33 | + | |
| 34 | + public void start() { | |
| 35 | + boolean isAvailable_1 = false; | |
| 36 | + boolean isAvailable_2 = false; | |
| 37 | + | |
| 38 | + try { | |
| 39 | + recursoKE.reserve(true, -1, this); | |
| 40 | + } catch (IllegalArgumentException e) { | |
| 41 | + e.printStackTrace(); | |
| 42 | + } catch (TimeoutException e) { | |
| 43 | + e.printStackTrace(); | |
| 44 | + } | |
| 45 | + | |
| 46 | + if(recursoKE.isAvailable() == false) | |
| 47 | + isAvailable_1 = true; | |
| 48 | + | |
| 49 | + recursoKE.release(); | |
| 50 | + | |
| 51 | + if(recursoKE.isAvailable() == true) | |
| 52 | + isAvailable_2 = true; | |
| 53 | + | |
| 54 | + | |
| 55 | + if(isAvailable_1 == isAvailable_2 == true) | |
| 56 | + dtvTestLog.success(); | |
| 57 | + else | |
| 58 | + dtvTestLog.failure(); | |
| 59 | + } | |
| 60 | + | |
| 61 | + /** | |
| 62 | + * Verifica o método isAvailable antes e depois do recurso ser reservado | |
| 63 | + */ | |
| 64 | + private void determinaEventoKE() { | |
| 65 | + recursoKE = new KeyEvent(null, //Componente que originou o evento | |
| 66 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 67 | + 0, //Tempo que o evento ocorreu | |
| 68 | + 0, //Modificadores | |
| 69 | + KeyEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 70 | + KeyEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 71 | + ); | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void pause() { | |
| 75 | + // TODO Auto-generated method stub | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void destroy() { | |
| 79 | + | |
| 80 | + if( ! recursoKE.isAvailable()) | |
| 81 | + recursoKE.release(); | |
| 82 | + | |
| 83 | + } | |
| 84 | + | |
| 85 | + public boolean releaseRequested(ScarceResource resource) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + return false; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void releaseForced(ScarceResource resource) { | |
| 91 | + // TODO Auto-generated method stub | |
| 92 | + } | |
| 93 | + | |
| 94 | + public void released(ScarceResource resource) { | |
| 95 | + // TODO Auto-generated method stub | |
| 96 | + } | |
| 97 | + | |
| 98 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/ReleaseTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,90 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * @author Leandro Henrique | |
| 14 | + */ | |
| 15 | + | |
| 16 | +public class ReleaseTest implements DTVTest, ScarceResourceListener { | |
| 17 | + | |
| 18 | + private DTVTestLog dtvTestLog; | |
| 19 | + private KeyEvent recursoKE; | |
| 20 | + | |
| 21 | + public void setForm(Form form) { | |
| 22 | + // TODO Auto-generated method stub | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setLog(DTVTestLog log) { | |
| 26 | + this.dtvTestLog = log; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void init() { | |
| 30 | + determinaEventoKE(); | |
| 31 | + | |
| 32 | + try { | |
| 33 | + recursoKE.reserve(true, -1, this); | |
| 34 | + } catch (IllegalArgumentException e) { | |
| 35 | + e.printStackTrace(); | |
| 36 | + } catch (TimeoutException e) { | |
| 37 | + e.printStackTrace(); | |
| 38 | + } | |
| 39 | + | |
| 40 | + } | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * Um recurso anteriormente reservado será liberado através do método {@link KeyEvent#release()}. O método obterá sucesso se | |
| 44 | + * a recurso estiver disponível posteriormente. | |
| 45 | + */ | |
| 46 | + public void start() { | |
| 47 | + | |
| 48 | + recursoKE.release(); | |
| 49 | + | |
| 50 | + if(recursoKE.isAvailable()) | |
| 51 | + dtvTestLog.success(); | |
| 52 | + else | |
| 53 | + dtvTestLog.failure(); | |
| 54 | + | |
| 55 | + } | |
| 56 | + | |
| 57 | + | |
| 58 | + private void determinaEventoKE() { | |
| 59 | + recursoKE = new KeyEvent(null, //Componente que originou o evento | |
| 60 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 61 | + 0, //Tempo que o evento ocorreu | |
| 62 | + 0, //Modificadores | |
| 63 | + KeyEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 64 | + KeyEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 65 | + ); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void pause() { | |
| 69 | + // TODO Auto-generated method stub | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void destroy() { | |
| 73 | + // TODO Auto-generated method stub | |
| 74 | + } | |
| 75 | + | |
| 76 | + public boolean releaseRequested(ScarceResource resource) { | |
| 77 | + // TODO Auto-generated method stub | |
| 78 | + return false; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void releaseForced(ScarceResource resource) { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void released(ScarceResource resource) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + } | |
| 88 | + | |
| 89 | + | |
| 90 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/RemoveResourceTypeListenerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,113 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * @author Leandro Henrique | |
| 15 | + */ | |
| 16 | + | |
| 17 | +public class RemoveResourceTypeListenerTest implements DTVTest, ResourceTypeListener, ScarceResourceListener { | |
| 18 | + | |
| 19 | + private DTVTestLog dtvTestLog; | |
| 20 | + | |
| 21 | + private KeyEvent recursoKE; | |
| 22 | + private boolean eventoRecedido; | |
| 23 | + | |
| 24 | + public void setForm(Form form) { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void setLog(DTVTestLog log) { | |
| 29 | + this.dtvTestLog = log; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void init() { | |
| 33 | + // TODO Auto-generated method stub | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * Será reservado um recurso. Caso o listener removido não seja notificado, o teste foi realizado com sucesso. | |
| 38 | + */ | |
| 39 | + public void start() { | |
| 40 | + KeyEvent.addResourceTypeListener(this); | |
| 41 | + KeyEvent.removeResourceTypeListener(this); | |
| 42 | + | |
| 43 | + determinaEventoKE(); | |
| 44 | + if( ! recursoKE.isAvailable()) | |
| 45 | + recursoKE.release(); | |
| 46 | + | |
| 47 | + try { | |
| 48 | + recursoKE.reserve(true, -1, this); | |
| 49 | + } catch (IllegalArgumentException e1) { | |
| 50 | + e1.printStackTrace(); | |
| 51 | + } catch (TimeoutException e1) { | |
| 52 | + e1.printStackTrace(); | |
| 53 | + } | |
| 54 | + | |
| 55 | + try { | |
| 56 | + /* Espera o evento ser recebido */ | |
| 57 | + Thread.sleep(1000); | |
| 58 | + } catch (InterruptedException e) { | |
| 59 | + e.printStackTrace(); | |
| 60 | + } | |
| 61 | + | |
| 62 | + if(eventoRecedido) | |
| 63 | + dtvTestLog.failure(); | |
| 64 | + else | |
| 65 | + dtvTestLog.success(); | |
| 66 | + | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void reserved(int availableCount) { | |
| 70 | + eventoRecedido = true; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void released(int availableCount) { | |
| 74 | + // TODO Auto-generated method stub | |
| 75 | + } | |
| 76 | + | |
| 77 | + | |
| 78 | + private void determinaEventoKE() { | |
| 79 | + recursoKE = new KeyEvent(null, //Componente que originou o evento | |
| 80 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 81 | + 0, //Tempo que o evento ocorreu | |
| 82 | + 0, //Modificadores | |
| 83 | + KeyEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 84 | + KeyEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 85 | + ); | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void pause() { | |
| 89 | + // TODO Auto-generated method stub | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void destroy() { | |
| 93 | + if( ! recursoKE.isAvailable()) | |
| 94 | + recursoKE.release(); | |
| 95 | + } | |
| 96 | + | |
| 97 | + public boolean releaseRequested(ScarceResource resource) { | |
| 98 | + // TODO Auto-generated method stub | |
| 99 | + return false; | |
| 100 | + } | |
| 101 | + | |
| 102 | + public void releaseForced(ScarceResource resource) { | |
| 103 | + // TODO Auto-generated method stub | |
| 104 | + | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void released(ScarceResource resource) { | |
| 108 | + // TODO Auto-generated method stub | |
| 109 | + | |
| 110 | + } | |
| 111 | + | |
| 112 | + | |
| 113 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/ReserveOneTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,94 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * @author Leandro Henrique | |
| 14 | + */ | |
| 15 | + | |
| 16 | +public class ReserveOneTest implements DTVTest, ScarceResourceListener { | |
| 17 | + | |
| 18 | + private DTVTestLog dtvTestLog; | |
| 19 | + | |
| 20 | + private KeyEvent recursoKE; | |
| 21 | + private int keyCode; | |
| 22 | + | |
| 23 | + public void setForm(Form form) { | |
| 24 | + // TODO Auto-generated method stub | |
| 25 | + } | |
| 26 | + | |
| 27 | + public void setLog(DTVTestLog log) { | |
| 28 | + this.dtvTestLog = log; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void init() { | |
| 32 | + keyCode = KeyEvent.VK_UNDEFINED; | |
| 33 | + determinaEventoKE(); | |
| 34 | + } | |
| 35 | + | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * Um recurso com um keyCode específico será liberado através do método {@ KeyEvent#release()} | |
| 39 | + * Posteriormente este método tentará reservar um recurso com o mesmo keyCode. Caso este recurso seja reservado, | |
| 40 | + * o método obterá êxito. | |
| 41 | + */ | |
| 42 | + public void start() { | |
| 43 | + | |
| 44 | + if( ! recursoKE.isAvailable()) | |
| 45 | + recursoKE.release(); | |
| 46 | + | |
| 47 | + try { | |
| 48 | + recursoKE = KeyEvent.reserveOne(KeyEvent.VK_UNDEFINED, true, -1, this); | |
| 49 | + } catch (IllegalArgumentException e) { | |
| 50 | + e.printStackTrace(); | |
| 51 | + } catch (TimeoutException e) { | |
| 52 | + e.printStackTrace(); | |
| 53 | + } | |
| 54 | + | |
| 55 | + if( ! recursoKE.isAvailable() && recursoKE.getKeyCode() == keyCode) | |
| 56 | + dtvTestLog.success(); | |
| 57 | + else | |
| 58 | + dtvTestLog.failure(); | |
| 59 | + | |
| 60 | + } | |
| 61 | + | |
| 62 | + private void determinaEventoKE() { | |
| 63 | + recursoKE = new KeyEvent(null, //Componente que originou o evento | |
| 64 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 65 | + 0, //Tempo que o evento ocorreu | |
| 66 | + 0, //Modificadores | |
| 67 | + keyCode, //Recurso utilizado pelo evento | |
| 68 | + KeyEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 69 | + ); | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void pause() { | |
| 73 | + // TODO Auto-generated method stub | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void destroy() { | |
| 77 | + recursoKE.release(); | |
| 78 | + } | |
| 79 | + | |
| 80 | + public boolean releaseRequested(ScarceResource resource) { | |
| 81 | + // TODO Auto-generated method stub | |
| 82 | + return false; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void releaseForced(ScarceResource resource) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void released(ScarceResource resource) { | |
| 90 | + // TODO Auto-generated method stub | |
| 91 | + } | |
| 92 | + | |
| 93 | + | |
| 94 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/KeyEvent/ReserveTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,89 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.KeyEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 11 | + | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * @author Leandro Henrique | |
| 15 | + */ | |
| 16 | + | |
| 17 | +public class ReserveTest implements DTVTest, ScarceResourceListener { | |
| 18 | + | |
| 19 | + private DTVTestLog dtvTestLog; | |
| 20 | + private KeyEvent recursoKE; | |
| 21 | + | |
| 22 | + public void setForm(Form form) { | |
| 23 | + // TODO Auto-generated method stub | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + determinaEventoKE(); | |
| 32 | + } | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * Um recurso anteriormente liberado será reservado através do método {@link KeyEvent#reserve(boolean, long, ScarceResourceListener). | |
| 36 | + * O método obterá sucesso se o recurso não estiver disponível posteriormente e se não ocorrer erros. | |
| 37 | + */ | |
| 38 | + public void start() { | |
| 39 | + | |
| 40 | + if( ! recursoKE.isAvailable()) | |
| 41 | + recursoKE.release(); | |
| 42 | + | |
| 43 | + try { | |
| 44 | + recursoKE.reserve(true, -1, this); | |
| 45 | + } catch (IllegalArgumentException e) { | |
| 46 | + dtvTestLog.failure(); | |
| 47 | + } catch (TimeoutException e) { | |
| 48 | + dtvTestLog.failure(); | |
| 49 | + } | |
| 50 | + | |
| 51 | + if(recursoKE.isAvailable() == false) | |
| 52 | + dtvTestLog.success(); | |
| 53 | + else | |
| 54 | + dtvTestLog.failure(); | |
| 55 | + | |
| 56 | + } | |
| 57 | + | |
| 58 | + private void determinaEventoKE() { | |
| 59 | + recursoKE = new KeyEvent(null, //Componente que originou o evento | |
| 60 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 61 | + 0, //Tempo que o evento ocorreu | |
| 62 | + 0, //Modificadores | |
| 63 | + KeyEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 64 | + KeyEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 65 | + ); | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void pause() { | |
| 69 | + // TODO Auto-generated method stub | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void destroy() { | |
| 73 | + recursoKE.release(); | |
| 74 | + } | |
| 75 | + | |
| 76 | + public boolean releaseRequested(ScarceResource resource) { | |
| 77 | + // TODO Auto-generated method stub | |
| 78 | + return false; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void releaseForced(ScarceResource resource) { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void released(ScarceResource resource) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + } | |
| 88 | + | |
| 89 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/RemoteControlEvent/AddResourceTypeListenerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,114 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.RemoteControlEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * @author Leandro Henrique | |
| 15 | + */ | |
| 16 | + | |
| 17 | +public class AddResourceTypeListenerTest implements DTVTest, ResourceTypeListener, ScarceResourceListener { | |
| 18 | + | |
| 19 | + private DTVTestLog dtvTestLog; | |
| 20 | + | |
| 21 | + private RemoteControlEvent recursoRCE; | |
| 22 | + private boolean eventoRecedido; | |
| 23 | + | |
| 24 | + public void setForm(Form form) { | |
| 25 | + // TODO Auto-generated method stub | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void setLog(DTVTestLog log) { | |
| 29 | + this.dtvTestLog = log; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void init() { | |
| 33 | + determinaEventoRCE(); | |
| 34 | + } | |
| 35 | + | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * Será gerado um evento de release. Caso o listener adicionado seja notificado, o teste foi realizado com sucesso. | |
| 39 | + */ | |
| 40 | + public void start() { | |
| 41 | + RemoteControlEvent.addResourceTypeListener(this); | |
| 42 | + | |
| 43 | + if( ! recursoRCE.isAvailable()) | |
| 44 | + recursoRCE.release(); | |
| 45 | + | |
| 46 | + try { | |
| 47 | + recursoRCE.reserve(true, -1, this); | |
| 48 | + } catch (IllegalArgumentException e) { | |
| 49 | + e.printStackTrace(); | |
| 50 | + } catch (TimeoutException e) { | |
| 51 | + e.printStackTrace(); | |
| 52 | + } | |
| 53 | + | |
| 54 | + /* Espera o evento ser recebido */ | |
| 55 | + while( ! eventoRecedido) { | |
| 56 | + | |
| 57 | + try { | |
| 58 | + Thread.sleep(300); | |
| 59 | + } catch (InterruptedException e) { | |
| 60 | + e.printStackTrace(); | |
| 61 | + break; | |
| 62 | + } | |
| 63 | + | |
| 64 | + } | |
| 65 | + | |
| 66 | + if(eventoRecedido) | |
| 67 | + dtvTestLog.success(); | |
| 68 | + else | |
| 69 | + dtvTestLog.failure(); | |
| 70 | + | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void reserved(int availableCount) { | |
| 74 | + /* Evento foi recebido corretamente */ | |
| 75 | + eventoRecedido = true; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void released(int availableCount) { | |
| 79 | + // TODO Auto-generated method stub | |
| 80 | + } | |
| 81 | + | |
| 82 | + private void determinaEventoRCE() { | |
| 83 | + recursoRCE = new RemoteControlEvent(null, //Componente que originou o evento | |
| 84 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 85 | + 0, //Tempo que o evento ocorreu | |
| 86 | + 0, //Modificadores | |
| 87 | + RemoteControlEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 88 | + RemoteControlEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 89 | + ); | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void pause() { | |
| 93 | + // TODO Auto-generated method stub | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void destroy() { | |
| 97 | + recursoRCE.release(); | |
| 98 | + RemoteControlEvent.removeResourceTypeListener(this); | |
| 99 | + } | |
| 100 | + | |
| 101 | + public boolean releaseRequested(ScarceResource resource) { | |
| 102 | + // TODO Auto-generated method stub | |
| 103 | + return false; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public void releaseForced(ScarceResource resource) { | |
| 107 | + // TODO Auto-generated method stub | |
| 108 | + } | |
| 109 | + | |
| 110 | + public void released(ScarceResource resource) { | |
| 111 | + // TODO Auto-generated method stub | |
| 112 | + } | |
| 113 | + | |
| 114 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/RemoteControlEvent/GetInstancesTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,53 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.RemoteControlEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 8 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * @author Leandro Henrique | |
| 12 | + */ | |
| 13 | + | |
| 14 | +public class GetInstancesTest implements DTVTest { | |
| 15 | + | |
| 16 | + private DTVTestLog dtvTestLog; | |
| 17 | + | |
| 18 | + public void setForm(Form form) { | |
| 19 | + // TODO Auto-generated method stub | |
| 20 | + } | |
| 21 | + | |
| 22 | + public void setLog(DTVTestLog log) { | |
| 23 | + this.dtvTestLog = log; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void init() { | |
| 27 | + // TODO Auto-generated method stub | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void start() { | |
| 31 | + testaMetodo(); | |
| 32 | + } | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * Verifica se {@link RemoteControlEvent#getInstances()} retorna um vetor de KeyEvent | |
| 36 | + */ | |
| 37 | + private void testaMetodo() { | |
| 38 | + | |
| 39 | + if(KeyEvent.getInstances() instanceof KeyEvent[] ) | |
| 40 | + dtvTestLog.success(); | |
| 41 | + else | |
| 42 | + dtvTestLog.failure(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void pause() { | |
| 46 | + // TODO Auto-generated method stub | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void destroy() { | |
| 50 | + // TODO Auto-generated method stub | |
| 51 | + } | |
| 52 | + | |
| 53 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/RemoteControlEvent/RemoveResourceTypeListenerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,107 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.RemoteControlEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ResourceTypeListener; | |
| 8 | +import com.sun.dtv.resources.ScarceResource; | |
| 9 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 10 | +import com.sun.dtv.resources.TimeoutException; | |
| 11 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * @author Leandro Henrique | |
| 15 | + */ | |
| 16 | + | |
| 17 | +public class RemoveResourceTypeListenerTest implements DTVTest, ResourceTypeListener, ScarceResourceListener { | |
| 18 | + | |
| 19 | + private DTVTestLog dtvTestLog; | |
| 20 | + | |
| 21 | + private RemoteControlEvent recursoRCE; | |
| 22 | + private boolean eventoRecedido; | |
| 23 | + | |
| 24 | + public void setLog(DTVTestLog log) { | |
| 25 | + this.dtvTestLog = log; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void init() { | |
| 29 | + // TODO Auto-generated method stub | |
| 30 | + } | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * Será gerado um evento de release. Caso o listener adicionado seja notificado, o teste foi realizado com sucesso. | |
| 34 | + */ | |
| 35 | + public void start() { | |
| 36 | + | |
| 37 | + RemoteControlEvent.addResourceTypeListener(this); | |
| 38 | + RemoteControlEvent.removeResourceTypeListener(this); | |
| 39 | + | |
| 40 | + determinaEventoRCE(); | |
| 41 | + if( ! recursoRCE.isAvailable()) | |
| 42 | + recursoRCE.release(); | |
| 43 | + | |
| 44 | + try { | |
| 45 | + recursoRCE.reserve(true, -1, this); | |
| 46 | + } catch (IllegalArgumentException e1) { | |
| 47 | + e1.printStackTrace(); | |
| 48 | + } catch (TimeoutException e1) { | |
| 49 | + e1.printStackTrace(); | |
| 50 | + } | |
| 51 | + | |
| 52 | + try { | |
| 53 | + Thread.sleep(1000); | |
| 54 | + } catch (InterruptedException e) { | |
| 55 | + e.printStackTrace(); | |
| 56 | + } | |
| 57 | + | |
| 58 | + if(eventoRecedido) | |
| 59 | + dtvTestLog.failure(); | |
| 60 | + else | |
| 61 | + dtvTestLog.success(); | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void released(int availableCount) { | |
| 65 | + eventoRecedido = true; | |
| 66 | + } | |
| 67 | + | |
| 68 | + private void determinaEventoRCE() { | |
| 69 | + recursoRCE = new RemoteControlEvent(null, //Componente que originou o evento | |
| 70 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 71 | + 0, //Tempo que o evento ocorreu | |
| 72 | + 0, //Modificadores | |
| 73 | + RemoteControlEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 74 | + RemoteControlEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 75 | + ); | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void reserved(int availableCount) { | |
| 79 | + eventoRecedido = true; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void released(ScarceResource resource) { | |
| 83 | + // TODO Auto-generated method stub | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void pause() { | |
| 87 | + // TODO Auto-generated method stub | |
| 88 | + } | |
| 89 | + | |
| 90 | + public boolean releaseRequested(ScarceResource resource) { | |
| 91 | + // TODO Auto-generated method stub | |
| 92 | + return false; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void releaseForced(ScarceResource resource) { | |
| 96 | + // TODO Auto-generated method stub | |
| 97 | + } | |
| 98 | + | |
| 99 | + public void destroy() { | |
| 100 | + recursoRCE.release(); | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setForm(Form form) { | |
| 104 | + // TODO Auto-generated method stub | |
| 105 | + } | |
| 106 | + | |
| 107 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/RemoteControlEvent/ReserveOneTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,92 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.RemoteControlEvent; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.resources.TimeoutException; | |
| 10 | +import com.sun.dtv.ui.event.KeyEvent; | |
| 11 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 12 | + | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * @author Leandro Henrique | |
| 16 | + */ | |
| 17 | + | |
| 18 | +public class ReserveOneTest implements DTVTest, ScarceResourceListener { | |
| 19 | + | |
| 20 | + private DTVTestLog dtvTestLog; | |
| 21 | + | |
| 22 | + private KeyEvent recursoRCE; | |
| 23 | + private int keyCode; | |
| 24 | + | |
| 25 | + public void setForm(Form form) { | |
| 26 | + // TODO Auto-generated method stub | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setLog(DTVTestLog log) { | |
| 30 | + this.dtvTestLog = log; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void init() { | |
| 34 | + keyCode = RemoteControlEvent.VK_UNDEFINED; | |
| 35 | + determinaEventoRCE(); | |
| 36 | + } | |
| 37 | + | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * Um recurso com um keyCode específico será liberado através do método {@ RemoteControlEvent#release()} | |
| 41 | + * Posteriormente este método tentará reservar um recurso com o mesmo keyCode. Caso este recurso seja reservado, | |
| 42 | + * o método obterá êxito. | |
| 43 | + */ | |
| 44 | + public void start() { | |
| 45 | + | |
| 46 | + try { | |
| 47 | + recursoRCE = KeyEvent.reserveOne(RemoteControlEvent.VK_UNDEFINED, true, -1, this); | |
| 48 | + } catch (IllegalArgumentException e) { | |
| 49 | + e.printStackTrace(); | |
| 50 | + } catch (TimeoutException e) { | |
| 51 | + e.printStackTrace(); | |
| 52 | + } | |
| 53 | + | |
| 54 | + if( ! recursoRCE.isAvailable() && recursoRCE.getKeyCode() == keyCode) | |
| 55 | + dtvTestLog.success(); | |
| 56 | + else | |
| 57 | + dtvTestLog.failure(); | |
| 58 | + } | |
| 59 | + | |
| 60 | + private void determinaEventoRCE() { | |
| 61 | + recursoRCE = new RemoteControlEvent(null, //Componente que originou o evento | |
| 62 | + java.awt.event.KeyEvent.KEY_RELEASED, //Tipo de evento | |
| 63 | + 0, //Tempo que o evento ocorreu | |
| 64 | + 0, //Modificadores | |
| 65 | + RemoteControlEvent.VK_UNDEFINED, //Recurso utilizado pelo evento | |
| 66 | + RemoteControlEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 67 | + ); | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void pause() { | |
| 71 | + // TODO Auto-generated method stub | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void destroy() { | |
| 75 | + recursoRCE.release(); | |
| 76 | + } | |
| 77 | + | |
| 78 | + public boolean releaseRequested(ScarceResource resource) { | |
| 79 | + // TODO Auto-generated method stub | |
| 80 | + return false; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void releaseForced(ScarceResource resource) { | |
| 84 | + // TODO Auto-generated method stub | |
| 85 | + } | |
| 86 | + | |
| 87 | + public void released(ScarceResource resource) { | |
| 88 | + // TODO Auto-generated method stub | |
| 89 | + } | |
| 90 | + | |
| 91 | + | |
| 92 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/UserInputEventManager/AddUserInputEventManagerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,152 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.UserInputEventManager; | |
| 2 | + | |
| 3 | +import javax.microedition.xlet.XletStateChangeException; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | + | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.resources.ScarceResource; | |
| 11 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 12 | +import com.sun.dtv.resources.TimeoutException; | |
| 13 | +import com.sun.dtv.ui.Device; | |
| 14 | +import com.sun.dtv.ui.Screen; | |
| 15 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 16 | +import com.sun.dtv.ui.event.UserInputEvent; | |
| 17 | +import com.sun.dtv.ui.event.UserInputEventListener; | |
| 18 | +import com.sun.dtv.ui.event.UserInputEventManager; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * Testa métodos que precisam da interação do usuário. A partir desta classe | |
| 22 | + * serão avaliados os seguintes métodos da classe UserInputEventManager: | |
| 23 | + * | |
| 24 | + *<ol> | |
| 25 | + *<li>{@link UserInputEventManager#addUserInputEventListener(com.sun.dtv.ui.event.UserInputEventListener, UserInputEvent)}</li> | |
| 26 | + *<li>{@link UserInputEventManager#removeUserInputEventListener(com.sun.dtv.ui.event.UserInputEventListener)}</li> | |
| 27 | + *</ol> | |
| 28 | + * | |
| 29 | + *<p>Também será verificado todas as teclas de interatividade de um controle remoto de TV Digital</p> | |
| 30 | + * | |
| 31 | + * @author Ezequiel da Silva | |
| 32 | + * @author Leandro Henrique | |
| 33 | + * @author Wennio Oliveira | |
| 34 | + * | |
| 35 | + * @see UserInputEventManager | |
| 36 | + */ | |
| 37 | +public class AddUserInputEventManagerTest implements DTVTest, UserInputEventListener, ScarceResourceListener, Runnable { | |
| 38 | + | |
| 39 | + private DTVTestLog dtvTestLog; | |
| 40 | + | |
| 41 | + private UserInputEventManager eventManager; | |
| 42 | + private RemoteControlEvent eventoRCE; | |
| 43 | + private Device device; | |
| 44 | + private Screen currentScreen; | |
| 45 | + | |
| 46 | + | |
| 47 | + public void setLog(DTVTestLog log) { | |
| 48 | + this.dtvTestLog = log; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public void init() { | |
| 52 | + device = Device.getInstance(); | |
| 53 | + currentScreen = device.getDefaultScreen(); | |
| 54 | + eventManager = UserInputEventManager.getUserInputEventManager(currentScreen); | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void start() { | |
| 58 | + /* Determina evento da classe RemoteControlEvent */ | |
| 59 | + try { | |
| 60 | + determinaEventoRCE(); | |
| 61 | + testaInteracao(); | |
| 62 | + } catch(Exception e) { | |
| 63 | + e.printStackTrace(); | |
| 64 | + } | |
| 65 | + | |
| 66 | + //Aqui começa os testes | |
| 67 | + } | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * Testa todos os métodos da classe {@link UserInputEventManager} através | |
| 71 | + * da interação do usuário com a aplicação. | |
| 72 | + */ | |
| 73 | + private void testaInteracao() { | |
| 74 | + | |
| 75 | + /* Verifica se a aplicação está respondendo a interação do usuário */ | |
| 76 | + eventManager.addUserInputEventListener(this, eventoRCE); | |
| 77 | + | |
| 78 | + try { | |
| 79 | + eventoRCE.reserve(true, -1, this); | |
| 80 | + } catch (IllegalArgumentException e) { | |
| 81 | + e.printStackTrace(); | |
| 82 | + } catch (TimeoutException e) { | |
| 83 | + e.printStackTrace(); | |
| 84 | + } | |
| 85 | + | |
| 86 | + } | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * Instancia um evento de usuário através da classe {@link RemoteControlEvent RemoteControlEvent} e faz | |
| 90 | + * a sua reserva, definindo o tempo em que o evento poderá ser tratado e sua respectiva classe tratadora. | |
| 91 | + */ | |
| 92 | + private void determinaEventoRCE() { | |
| 93 | + eventoRCE = new RemoteControlEvent(null, //Componente que originou o evento | |
| 94 | + RemoteControlEvent.KEY_RELEASED, //Tipo de evento | |
| 95 | + 0, //Tempo que o evento ocorreu | |
| 96 | + 0, //Modificadores | |
| 97 | + RemoteControlEvent.VK_COLORED_KEY_0, //Recurso utilizado pelo evento (VK_UNDEFINED não está implementado) | |
| 98 | + RemoteControlEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 99 | + ); | |
| 100 | + } | |
| 101 | + | |
| 102 | + public synchronized void userInputEventReceived(UserInputEvent inputEvent) { | |
| 103 | + dtvTestLog.success(); | |
| 104 | + | |
| 105 | + com.sun.dtv.ui.event.KeyEvent e = (com.sun.dtv.ui.event.KeyEvent) inputEvent; | |
| 106 | + | |
| 107 | + /* Os eventos de release (soltar o botão) não serão tratados */ | |
| 108 | +// if(e.getID() == KeyEvent.KEY_RELEASED) | |
| 109 | + | |
| 110 | + } | |
| 111 | + | |
| 112 | + | |
| 113 | + public void pause() { | |
| 114 | + // TODO Auto-generated method stub | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void destroy() { | |
| 118 | + | |
| 119 | + } | |
| 120 | + | |
| 121 | + public void pauseXlet() { | |
| 122 | + // TODO Auto-generated method stub | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void destroyXlet(boolean unconditional) | |
| 126 | + throws XletStateChangeException { | |
| 127 | + // TODO Auto-generated method stub | |
| 128 | + } | |
| 129 | + | |
| 130 | + public boolean releaseRequested(ScarceResource resource) { | |
| 131 | + // TODO Auto-generated method stub | |
| 132 | + return false; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public void releaseForced(ScarceResource resource) { | |
| 136 | + // TODO Auto-generated method stub | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void released(ScarceResource resource) { | |
| 140 | + // TODO Auto-generated method stub | |
| 141 | + } | |
| 142 | + | |
| 143 | + public void run() { | |
| 144 | + // TODO Auto-generated method stub | |
| 145 | + } | |
| 146 | + | |
| 147 | + public void setForm(Form form) { | |
| 148 | + // TODO Auto-generated method stub | |
| 149 | + | |
| 150 | + } | |
| 151 | + | |
| 152 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/UserInputEventManager/GetUserInputEventManagerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,98 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.UserInputEventManager; | |
| 2 | + | |
| 3 | +import plaver.dtvtest.DTVTest; | |
| 4 | +import plaver.dtvtest.DTVTestLog; | |
| 5 | + | |
| 6 | +import com.sun.dtv.lwuit.Form; | |
| 7 | +import com.sun.dtv.resources.ScarceResource; | |
| 8 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 9 | +import com.sun.dtv.ui.Device; | |
| 10 | +import com.sun.dtv.ui.Screen; | |
| 11 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 12 | +import com.sun.dtv.ui.event.UserInputEvent; | |
| 13 | +import com.sun.dtv.ui.event.UserInputEventListener; | |
| 14 | +import com.sun.dtv.ui.event.UserInputEventManager; | |
| 15 | + | |
| 16 | +public class GetUserInputEventManagerTest implements DTVTest, UserInputEventListener, ScarceResourceListener { | |
| 17 | + | |
| 18 | + private DTVTestLog dtvTestLog; | |
| 19 | + | |
| 20 | + private UserInputEventManager eventManager; | |
| 21 | + private RemoteControlEvent eventoRCE; | |
| 22 | + private Device device; | |
| 23 | + private Screen currentScreen; | |
| 24 | + | |
| 25 | + | |
| 26 | + public void setLog(DTVTestLog log) { | |
| 27 | + this.dtvTestLog = log; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void init() { | |
| 31 | + device = Device.getInstance(); | |
| 32 | + currentScreen = device.getDefaultScreen(); | |
| 33 | + eventManager = UserInputEventManager.getUserInputEventManager(currentScreen); | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * Após adicionar um novo listener, será verificado, a partir do método {@link UserInputEventManager#getUserInputEventManager(Screen)}, | |
| 38 | + * se o listener retornado é o mesmo previamente adicionado. | |
| 39 | + */ | |
| 40 | + public void start() { | |
| 41 | + | |
| 42 | + determinaEventoRCE(); | |
| 43 | + | |
| 44 | + eventManager.addUserInputEventListener(this, eventoRCE); | |
| 45 | + UserInputEventManager managerReceived = UserInputEventManager.getUserInputEventManager(currentScreen); | |
| 46 | + | |
| 47 | + if(managerReceived == eventManager) | |
| 48 | + dtvTestLog.success(); | |
| 49 | + else | |
| 50 | + dtvTestLog.failure(); | |
| 51 | + | |
| 52 | + } | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * Instancia um evento de usuário através da classe {@link RemoteControlEvent RemoteControlEvent} | |
| 56 | + */ | |
| 57 | + private void determinaEventoRCE() { | |
| 58 | + eventoRCE = new RemoteControlEvent(null, //Componente que originou o evento | |
| 59 | + RemoteControlEvent.KEY_RELEASED, //Tipo de evento | |
| 60 | + 0, //Tempo que o evento ocorreu | |
| 61 | + 0, //Modificadores | |
| 62 | + RemoteControlEvent.VK_COLORED_KEY_0, //Recurso utilizado pelo evento (VK_UNDEFINED não está implementado) | |
| 63 | + RemoteControlEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 64 | + ); | |
| 65 | + } | |
| 66 | + | |
| 67 | + public void pause() { | |
| 68 | + // TODO Auto-generated method stub | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void destroy() { | |
| 72 | + eventManager.removeUserInputEventListener(this); | |
| 73 | + eventoRCE.release(); | |
| 74 | + } | |
| 75 | + | |
| 76 | + public boolean releaseRequested(ScarceResource resource) { | |
| 77 | + // TODO Auto-generated method stub | |
| 78 | + return false; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void releaseForced(ScarceResource resource) { | |
| 82 | + // TODO Auto-generated method stub | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void released(ScarceResource resource) { | |
| 86 | + // TODO Auto-generated method stub | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void userInputEventReceived(UserInputEvent event) { | |
| 90 | + // TODO Auto-generated method stub | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setForm(Form form) { | |
| 94 | + // TODO Auto-generated method stub | |
| 95 | + | |
| 96 | + } | |
| 97 | + | |
| 98 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/com/sun/dtv/ui/event/UserInputEventManager/RemoveUserInputEventManagerTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,154 @@ |
| 1 | +package plaver.com.sun.dtv.ui.event.UserInputEventManager; | |
| 2 | + | |
| 3 | +import javax.microedition.xlet.XletStateChangeException; | |
| 4 | + | |
| 5 | +import plaver.dtvtest.DTVTest; | |
| 6 | +import plaver.dtvtest.DTVTestLog; | |
| 7 | + | |
| 8 | + | |
| 9 | +import com.sun.dtv.lwuit.Form; | |
| 10 | +import com.sun.dtv.resources.ScarceResource; | |
| 11 | +import com.sun.dtv.resources.ScarceResourceListener; | |
| 12 | +import com.sun.dtv.resources.TimeoutException; | |
| 13 | +import com.sun.dtv.ui.Device; | |
| 14 | +import com.sun.dtv.ui.Screen; | |
| 15 | +import com.sun.dtv.ui.event.RemoteControlEvent; | |
| 16 | +import com.sun.dtv.ui.event.UserInputEvent; | |
| 17 | +import com.sun.dtv.ui.event.UserInputEventListener; | |
| 18 | +import com.sun.dtv.ui.event.UserInputEventManager; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * Testa métodos que precisam da interação do usuário. A partir desta classe | |
| 22 | + * serão avaliados os seguintes métodos da classe UserInputEventManager: | |
| 23 | + * | |
| 24 | + *<ol> | |
| 25 | + *<li>{@link UserInputEventManager#addUserInputEventListener(com.sun.dtv.ui.event.UserInputEventListener, UserInputEvent)}</li> | |
| 26 | + *<li>{@link UserInputEventManager#removeUserInputEventListener(com.sun.dtv.ui.event.UserInputEventListener)}</li> | |
| 27 | + *</ol> | |
| 28 | + * | |
| 29 | + *<p>Também será verificado todas as teclas de interatividade de um controle remoto de TV Digital</p> | |
| 30 | + * | |
| 31 | + * @author Ezequiel da Silva | |
| 32 | + * @author Leandro Henrique | |
| 33 | + * @author Wennio Oliveira | |
| 34 | + * | |
| 35 | + * @see UserInputEventManager | |
| 36 | + */ | |
| 37 | +public class RemoveUserInputEventManagerTest implements DTVTest, UserInputEventListener, ScarceResourceListener, Runnable { | |
| 38 | + | |
| 39 | + private DTVTestLog dtvTestLog; | |
| 40 | + | |
| 41 | + private UserInputEventManager eventManager; | |
| 42 | + private RemoteControlEvent eventoRCE; | |
| 43 | + private Device device; | |
| 44 | + private Screen currentScreen; | |
| 45 | + | |
| 46 | + | |
| 47 | + public void setLog(DTVTestLog log) { | |
| 48 | + this.dtvTestLog = log; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public void init() { | |
| 52 | + device = Device.getInstance(); | |
| 53 | + currentScreen = device.getDefaultScreen(); | |
| 54 | + eventManager = UserInputEventManager.getUserInputEventManager(currentScreen); | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void start() { | |
| 58 | + /* Determina evento da classe RemoteControlEvent */ | |
| 59 | + try { | |
| 60 | + determinaEventoRCE(); | |
| 61 | + testaInteracao(); | |
| 62 | + } catch(Exception e) { | |
| 63 | + e.printStackTrace(); | |
| 64 | + } | |
| 65 | + | |
| 66 | + //Aqui começa os testes | |
| 67 | + } | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * Testa todos os métodos da classe {@link UserInputEventManager} através | |
| 71 | + * da interação do usuário com a aplicação. | |
| 72 | + */ | |
| 73 | + private void testaInteracao() { | |
| 74 | + | |
| 75 | + /* Verifica se a aplicação está respondendo a interação do usuário */ | |
| 76 | + eventManager.addUserInputEventListener(this, eventoRCE); | |
| 77 | + eventManager.removeUserInputEventListener(this); | |
| 78 | + | |
| 79 | + try { | |
| 80 | + eventoRCE.reserve(true, -1, this); | |
| 81 | + } catch (IllegalArgumentException e) { | |
| 82 | + e.printStackTrace(); | |
| 83 | + } catch (TimeoutException e) { | |
| 84 | + e.printStackTrace(); | |
| 85 | + } | |
| 86 | + | |
| 87 | + } | |
| 88 | + | |
| 89 | + /** | |
| 90 | + * Instancia um evento de usuário através da classe {@link RemoteControlEvent RemoteControlEvent} e faz | |
| 91 | + * a sua reserva, definindo o tempo em que o evento poderá ser tratado e sua respectiva classe tratadora. | |
| 92 | + */ | |
| 93 | + private void determinaEventoRCE() { | |
| 94 | + eventoRCE = new RemoteControlEvent(null, //Componente que originou o evento | |
| 95 | + RemoteControlEvent.KEY_RELEASED, //Tipo de evento | |
| 96 | + 0, //Tempo que o evento ocorreu | |
| 97 | + 0, //Modificadores | |
| 98 | + RemoteControlEvent.VK_COLORED_KEY_0, //Recurso utilizado pelo evento (VK_UNDEFINED não está implementado) | |
| 99 | + RemoteControlEvent.CHAR_UNDEFINED //Caracter unicode que gerou o evento | |
| 100 | + ); | |
| 101 | + } | |
| 102 | + | |
| 103 | + public synchronized void userInputEventReceived(UserInputEvent inputEvent) { | |
| 104 | + dtvTestLog.success(); | |
| 105 | + | |
| 106 | + com.sun.dtv.ui.event.KeyEvent e = (com.sun.dtv.ui.event.KeyEvent) inputEvent; | |
| 107 | + | |
| 108 | + /* Os eventos de release (soltar o botão) não serão tratados */ | |
| 109 | +// if(e.getID() == KeyEvent.KEY_RELEASED) | |
| 110 | + | |
| 111 | + } | |
| 112 | + | |
| 113 | + | |
| 114 | + public void pause() { | |
| 115 | + // TODO Auto-generated method stub | |
| 116 | + } | |
| 117 | + | |
| 118 | + public void destroy() { | |
| 119 | + | |
| 120 | + } | |
| 121 | + | |
| 122 | + public void pauseXlet() { | |
| 123 | + // TODO Auto-generated method stub | |
| 124 | + | |
| 125 | + } | |
| 126 | + | |
| 127 | + public void destroyXlet(boolean unconditional) | |
| 128 | + throws XletStateChangeException { | |
| 129 | + // TODO Auto-generated method stub | |
| 130 | + } | |
| 131 | + | |
| 132 | + public boolean releaseRequested(ScarceResource resource) { | |
| 133 | + // TODO Auto-generated method stub | |
| 134 | + return false; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public void releaseForced(ScarceResource resource) { | |
| 138 | + // TODO Auto-generated method stub | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void released(ScarceResource resource) { | |
| 142 | + // TODO Auto-generated method stub | |
| 143 | + } | |
| 144 | + | |
| 145 | + public void run() { | |
| 146 | + // TODO Auto-generated method stub | |
| 147 | + } | |
| 148 | + | |
| 149 | + public void setForm(Form form) { | |
| 150 | + // TODO Auto-generated method stub | |
| 151 | + | |
| 152 | + } | |
| 153 | + | |
| 154 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/debuger/Debuger.java
0 → 100644
| ... | ... | @@ -0,0 +1,64 @@ |
| 1 | +package plaver.debuger; | |
| 2 | + | |
| 3 | +import com.sun.dtv.lwuit.Form; | |
| 4 | +import com.sun.dtv.lwuit.Label; | |
| 5 | +import com.sun.dtv.lwuit.geom.Dimension; | |
| 6 | + | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Classe que axilia a depuração do programa através de mensagens na tela em tempo de execução. | |
| 10 | + * | |
| 11 | + * Exemplo: | |
| 12 | + * | |
| 13 | + * Debuger debuger = new Debuger(meuForm); | |
| 14 | + * ... Código ... | |
| 15 | + * debuger.showBreakPoint("Mensagem a ser exibida na tela por um tempo determinado"); | |
| 16 | + * ... Código ... | |
| 17 | + * | |
| 18 | + * @author Leandro | |
| 19 | + */ | |
| 20 | +public class Debuger { | |
| 21 | + | |
| 22 | + private Form form; | |
| 23 | + | |
| 24 | + private Label labMessage; | |
| 25 | +// private Label labFaker; //Gambiarra para o labMessage ficar mais abaixo | |
| 26 | + | |
| 27 | + private long time = 5000; | |
| 28 | + private int contador; // Número de vezes que showBreakPoint(String msg) foi executado | |
| 29 | + | |
| 30 | + public Debuger(Form form) { | |
| 31 | + this.form = form; | |
| 32 | + | |
| 33 | + labMessage = new Label(); | |
| 34 | + | |
| 35 | + /* New */ | |
| 36 | +// labFaker = new Label(); | |
| 37 | +// labFaker.setSize(new Dimension(120,120)); | |
| 38 | + | |
| 39 | +// form.addComponent(labFaker); | |
| 40 | + form.addComponent(labMessage); | |
| 41 | + | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void showBreakPoint(String msg) { | |
| 45 | + | |
| 46 | + String strContador = String.valueOf(++contador); | |
| 47 | + String aux = strContador.concat(" - ").concat(msg); | |
| 48 | + | |
| 49 | + labMessage.setText(aux); | |
| 50 | + labMessage.setX(30); | |
| 51 | + labMessage.setY(60); | |
| 52 | + | |
| 53 | + form.show(); | |
| 54 | + form.repaint(); | |
| 55 | + | |
| 56 | + try { | |
| 57 | + Thread.sleep(time); | |
| 58 | + } catch (InterruptedException e) { | |
| 59 | + e.printStackTrace(); | |
| 60 | + } | |
| 61 | + } | |
| 62 | + | |
| 63 | +} | |
| 64 | + | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/dtvtest/DTVTest.java
0 → 100644
| ... | ... | @@ -0,0 +1,55 @@ |
| 1 | +/* | |
| 2 | + * To change this template, choose Tools | Templates | |
| 3 | + * and open the template in the editor. | |
| 4 | + */ | |
| 5 | +package plaver.dtvtest; | |
| 6 | + | |
| 7 | +import com.sun.dtv.lwuit.Form; | |
| 8 | + | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * @author GILBERTO FARIAS | |
| 12 | + * @author Bruno Pessoa | |
| 13 | + */ | |
| 14 | +public interface DTVTest { | |
| 15 | + | |
| 16 | + int AUTO = 1; | |
| 17 | + int INTERACTIVE = 2; | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * Adiciona o <code>form</code> principal da aplicação. | |
| 21 | + * | |
| 22 | + * O <code>form</code> deve ser usado apenas em aplicações que requerem a exibição de componentes gráficos | |
| 23 | + * na tela. | |
| 24 | + * | |
| 25 | + * @param form objeto compartilhado entre todas as aplicações de teste | |
| 26 | + */ | |
| 27 | + public void setForm(Form form); | |
| 28 | + | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * @param log objeto responsável pela sinalização do resultado do teste | |
| 32 | + */ | |
| 33 | + public void setLog(DTVTestLog log); | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * Aloca e reserva os recursos para o teste | |
| 37 | + */ | |
| 38 | + public void init(); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * Método responsável pela execução do teste | |
| 42 | + */ | |
| 43 | + public void start(); | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * Pausa a execução do teste | |
| 47 | + */ | |
| 48 | + public void pause(); | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * Libera listeners e recursos alocados. | |
| 52 | + */ | |
| 53 | + public void destroy(); | |
| 54 | + | |
| 55 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/dtvtest/DTVTestController.java
0 → 100644
| ... | ... | @@ -0,0 +1,278 @@ |
| 1 | +package plaver.dtvtest; | |
| 2 | + | |
| 3 | +import java.util.ArrayList; | |
| 4 | +import java.util.Iterator; | |
| 5 | +import java.util.List; | |
| 6 | +import java.util.StringTokenizer; | |
| 7 | + | |
| 8 | +import java.io.BufferedReader; | |
| 9 | +import java.io.FileReader; | |
| 10 | +import java.io.IOException; | |
| 11 | + | |
| 12 | +import javax.microedition.xlet.XletContext; | |
| 13 | + | |
| 14 | +import com.sun.dtv.lwuit.Form; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * Classe responsvel por controlar a execuo dos testes. Tem como objetivo | |
| 18 | + * reduzir o acoplamento entre os testes e o Xlet no qual eles estao anexados. | |
| 19 | + * | |
| 20 | + * @author GILBERTO FARIAS | |
| 21 | + * @author Bruno Pessoa | |
| 22 | + * | |
| 23 | + */ | |
| 24 | +public class DTVTestController implements DTVTestListener { | |
| 25 | + | |
| 26 | + private Thread ctrlThread; | |
| 27 | + private DTVTestLog dtvTestLog; | |
| 28 | + private DTVTest test; | |
| 29 | + private List listeners; | |
| 30 | + | |
| 31 | + private int appID; | |
| 32 | + private int executionModeID; | |
| 33 | + private long timeOut; | |
| 34 | + | |
| 35 | + private static Form form; | |
| 36 | + private static List controllerList; | |
| 37 | + public static XletContext contextXlet; | |
| 38 | + | |
| 39 | + private DTVTestController(DTVTest app, int appID, int executionModeID, long timeOut) { | |
| 40 | + this.test = app; | |
| 41 | + this.appID = appID; | |
| 42 | + this.executionModeID = executionModeID; | |
| 43 | + this.dtvTestLog = new DTVTestLog(timeOut, executionModeID); | |
| 44 | + | |
| 45 | + listeners = new ArrayList(); | |
| 46 | + } | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * | |
| 50 | + * Cria uma lista de aplicações a serem testadas a patir de um arquivo de texto | |
| 51 | + * | |
| 52 | + * @param filePath - Diretório com a lista de aplicações | |
| 53 | + * @return lista de aplicação que implementam {@link DTVTest} a serem testadas | |
| 54 | + */ | |
| 55 | + public static List createTestSuit(String filePath, Form form, XletContext contextXlet) { | |
| 56 | + | |
| 57 | + DTVTestController.contextXlet = contextXlet; | |
| 58 | + DTVTestController.form = form; | |
| 59 | + | |
| 60 | + DTVTestController controller = null; | |
| 61 | + BufferedReader reader = null; | |
| 62 | + | |
| 63 | + int appID = 0; | |
| 64 | + long timeOut = 0; | |
| 65 | + | |
| 66 | + String executionMode; | |
| 67 | + int executionModeID = 0; | |
| 68 | + DTVTest app = null; | |
| 69 | + | |
| 70 | + try { | |
| 71 | + reader = new BufferedReader(new FileReader(filePath)); | |
| 72 | + controllerList = new ArrayList(); | |
| 73 | + | |
| 74 | + StringTokenizer st; | |
| 75 | + String timeoutDefault; | |
| 76 | + String line; | |
| 77 | + | |
| 78 | + reader.readLine(); //Read [timeout_default] | |
| 79 | + reader.readLine(); //Read [classname] [id] [auto/interactive] [timeout] | |
| 80 | + | |
| 81 | + timeoutDefault = reader.readLine(); | |
| 82 | + st = new StringTokenizer(timeoutDefault); | |
| 83 | + | |
| 84 | + long defaultTimeOut = Long.parseLong(st.nextToken()); | |
| 85 | + | |
| 86 | + while ((line = reader.readLine()) != null ) { | |
| 87 | + st = new StringTokenizer(line); | |
| 88 | + | |
| 89 | + while (st.hasMoreTokens()) { | |
| 90 | + | |
| 91 | + Class dtClass = Class.forName(st.nextToken()); | |
| 92 | + | |
| 93 | + app = (DTVTest) dtClass.newInstance(); | |
| 94 | + | |
| 95 | + // Instancia o controller e o insere na lista | |
| 96 | + appID = Integer.parseInt(st.nextToken()); | |
| 97 | + | |
| 98 | + executionMode = st.nextToken(); | |
| 99 | + | |
| 100 | + if(executionMode.equals("auto")) { | |
| 101 | + executionModeID = DTVTest.AUTO; | |
| 102 | + } else if(executionMode.equals("interactive")) { | |
| 103 | + executionModeID = DTVTest.INTERACTIVE; | |
| 104 | + } else { | |
| 105 | + throw new Exception("Erro: Enter auto or interactive execution mode"); | |
| 106 | + } | |
| 107 | + | |
| 108 | + if(st.hasMoreElements()) | |
| 109 | + timeOut = Long.parseLong(st.nextToken()); | |
| 110 | + else | |
| 111 | + timeOut = defaultTimeOut; | |
| 112 | + | |
| 113 | + controller = new DTVTestController(app, appID, executionModeID, timeOut); | |
| 114 | + controllerList.add(controller); | |
| 115 | + | |
| 116 | + } | |
| 117 | + | |
| 118 | + } | |
| 119 | + | |
| 120 | + } catch (Exception e) { | |
| 121 | + e.printStackTrace(); | |
| 122 | + } finally { | |
| 123 | + | |
| 124 | + try { | |
| 125 | + reader.close(); | |
| 126 | + } catch (IOException e) { | |
| 127 | + e.printStackTrace(); | |
| 128 | + } | |
| 129 | + | |
| 130 | + } | |
| 131 | + | |
| 132 | + return controllerList; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public void addDTVTestEventListener(DTVTestListener listener) { | |
| 136 | + listeners.add(listener); | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void removeDTVTestEventListener(DTVTestListener listener) { | |
| 140 | + listeners.remove(listener); | |
| 141 | + } | |
| 142 | + | |
| 143 | + | |
| 144 | + private void notifyEventReceived(final DTVTestEvent e) { | |
| 145 | + | |
| 146 | + Iterator it = listeners.iterator(); | |
| 147 | + | |
| 148 | + while (it.hasNext()) { | |
| 149 | + final DTVTestListener l = (DTVTestListener) it.next(); | |
| 150 | + | |
| 151 | + new Thread() { | |
| 152 | + public void run() { | |
| 153 | + l.testLogEventReceived(e); | |
| 154 | + } | |
| 155 | + }.start(); | |
| 156 | + | |
| 157 | + } | |
| 158 | + } | |
| 159 | + | |
| 160 | + /** | |
| 161 | + * Inicia a execução do teste em uma diferente linha de execução | |
| 162 | + */ | |
| 163 | + public void start() { | |
| 164 | + | |
| 165 | + dtvTestLog.addDTVTestEventListener(this); | |
| 166 | + | |
| 167 | + test.setForm(form); | |
| 168 | + test.setLog(dtvTestLog); | |
| 169 | + | |
| 170 | + ctrlThread = new Thread() { | |
| 171 | + public void run() { | |
| 172 | + | |
| 173 | + /* Visual application must not have timeout */ | |
| 174 | + if(executionModeID == DTVTest.AUTO) | |
| 175 | + dtvTestLog.start(); | |
| 176 | + | |
| 177 | + try { | |
| 178 | + | |
| 179 | + test.init(); | |
| 180 | + test.start(); | |
| 181 | + | |
| 182 | + } catch(Exception e) { | |
| 183 | + | |
| 184 | + if(dtvTestLog.getStatus() != DTVTestEvent.TEST_VISUAL_APP) | |
| 185 | + dtvTestLog.failure(); | |
| 186 | + } | |
| 187 | + | |
| 188 | + } | |
| 189 | + }; | |
| 190 | + | |
| 191 | + ctrlThread.start(); | |
| 192 | + | |
| 193 | + } | |
| 194 | + | |
| 195 | + public void testLogEventReceived(DTVTestEvent e) { | |
| 196 | + | |
| 197 | + //<await !ctrlThread.isAlive()> | |
| 198 | + while (ctrlThread.isAlive()) { | |
| 199 | + try { | |
| 200 | + | |
| 201 | + /* Se algum evento for gerado, tentará interromper threads em espera */ | |
| 202 | + if(dtvTestLog.getStatus() != 0) { | |
| 203 | + ctrlThread.interrupt(); | |
| 204 | + } | |
| 205 | + | |
| 206 | + Thread.sleep(300); | |
| 207 | + | |
| 208 | + } catch (InterruptedException e1) { | |
| 209 | + System.exit(1); | |
| 210 | + } | |
| 211 | + } | |
| 212 | + | |
| 213 | + System.out.print(test.getClass().getName()); | |
| 214 | + | |
| 215 | + if(dtvTestLog.getStatus() == DTVTestEvent.TEST_SUCCESS) | |
| 216 | + System.out.println(": SUCESSO"); | |
| 217 | + else if(dtvTestLog.getStatus() == DTVTestEvent.TEST_FAILURE) | |
| 218 | + System.out.println(": FALHA"); | |
| 219 | + else if(dtvTestLog.getStatus() == DTVTestEvent.TEST_TIMEOUT) | |
| 220 | + System.out.println(": TIMEOUT"); | |
| 221 | + else | |
| 222 | + System.out.println(": APP_VISUAL"); | |
| 223 | + | |
| 224 | + test.destroy(); | |
| 225 | + dtvTestLog.destroy(); | |
| 226 | + | |
| 227 | + try { | |
| 228 | + Thread.sleep(500); | |
| 229 | + } catch (InterruptedException a) { | |
| 230 | + a.printStackTrace(); | |
| 231 | + } | |
| 232 | + | |
| 233 | + notifyEventReceived(e); | |
| 234 | + } | |
| 235 | + | |
| 236 | + public int getAppID() { | |
| 237 | + return appID; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public int getExecutionModeID() { | |
| 241 | + return executionModeID; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public long getTimeOut() { | |
| 245 | + return timeOut; | |
| 246 | + } | |
| 247 | + | |
| 248 | + public static int getQtdAutoApps() { | |
| 249 | + List controllerList = DTVTestController.controllerList; | |
| 250 | + int cont = 0; | |
| 251 | + | |
| 252 | + if(DTVTestController.controllerList == null) | |
| 253 | + return 0; | |
| 254 | + for(int i = 0; i < controllerList.size(); i++) { | |
| 255 | + if( ((DTVTestController) controllerList.get(i)).getExecutionModeID() == DTVTest.AUTO) | |
| 256 | + cont++; | |
| 257 | + } | |
| 258 | + | |
| 259 | + return cont; | |
| 260 | + | |
| 261 | + } | |
| 262 | + | |
| 263 | + public static int getQtdInteractiveApps() { | |
| 264 | + List controllerList = DTVTestController.controllerList; | |
| 265 | + int cont = 0; | |
| 266 | + | |
| 267 | + if(DTVTestController.controllerList == null) | |
| 268 | + return 0; | |
| 269 | + | |
| 270 | + for(int i = 0; i < controllerList.size(); i++) { | |
| 271 | + if( ((DTVTestController) controllerList.get(i)).getExecutionModeID() == DTVTest.INTERACTIVE) | |
| 272 | + cont++; | |
| 273 | + } | |
| 274 | + | |
| 275 | + return cont; | |
| 276 | + } | |
| 277 | + | |
| 278 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/dtvtest/DTVTestEvent.java
0 → 100644
| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | +package plaver.dtvtest; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * Representa os eventos de resultado dos testes. | |
| 5 | + * | |
| 6 | + * @author GILBERTO FARIAS | |
| 7 | + * @author Bruno Pessoa | |
| 8 | + */ | |
| 9 | +public class DTVTestEvent { | |
| 10 | + private int status; | |
| 11 | + | |
| 12 | + public DTVTestEvent(int s){ | |
| 13 | + this.status = s; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public int getStatus(){ | |
| 17 | + return this.status; | |
| 18 | + } | |
| 19 | + | |
| 20 | + public static final int TEST_FAILURE = 1; | |
| 21 | + public static final int TEST_SUCCESS = 2; | |
| 22 | + public static final int TEST_TIMEOUT = 3; | |
| 23 | + public static final int TEST_VISUAL_APP = 4; | |
| 24 | +} | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/dtvtest/DTVTestListener.java
0 → 100644
| ... | ... | @@ -0,0 +1,17 @@ |
| 1 | +/* | |
| 2 | + * To change this template, choose Tools | Templates | |
| 3 | + * and open the template in the editor. | |
| 4 | + */ | |
| 5 | +package plaver.dtvtest; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * Listener para a recepção de eventos que informarão sobre | |
| 9 | + * o resultado da execução de cada teste. | |
| 10 | + * | |
| 11 | + * @author GILBERTO FARIAS | |
| 12 | + * @author Bruno Pessoa | |
| 13 | + */ | |
| 14 | +public interface DTVTestListener { | |
| 15 | + public void testLogEventReceived(DTVTestEvent e); | |
| 16 | +} | |
| 17 | + | ... | ... |
Projeto PPB-Ginga/Plaver Framework/plaver/dtvtest/DTVTestLog.java
0 → 100644
| ... | ... | @@ -0,0 +1,156 @@ |
| 1 | +package plaver.dtvtest; | |
| 2 | + | |
| 3 | +import java.util.ArrayList; | |
| 4 | +import java.util.Iterator; | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Classe auxiliar para o desenvolvimento de aplicaes de teste para avaliao | |
| 10 | + * de implementaes do Ginga. Ela define o comportamento que ser apresentado | |
| 11 | + * pelas aplicaes em caso dos testes serem bem sucedidos ou no. Os Xlets de | |
| 12 | + * teste devem manter relacionamento com esta classe, a fim de se adequarem ao | |
| 13 | + * comportamento padro esperado nos casos mencionados. | |
| 14 | + * | |
| 15 | + * @author Bruno Pessoa | |
| 16 | + * @author Gilberto Farias | |
| 17 | + * @author Danilo Formiga | |
| 18 | + * | |
| 19 | + */ | |
| 20 | +public class DTVTestLog extends Thread { | |
| 21 | + | |
| 22 | + public static final long TIMEOUT = 15000; | |
| 23 | + | |
| 24 | + // Utilizado para encerrar a aplicao, caso seu tempo limite seja alcanado. | |
| 25 | + private long millis; | |
| 26 | + | |
| 27 | + private boolean flagLog = false; | |
| 28 | + private List listeners; | |
| 29 | + | |
| 30 | + private int status; | |
| 31 | + | |
| 32 | + public DTVTestLog(long timeout, int executionModeID) { | |
| 33 | + status = executionModeID; | |
| 34 | + listeners = new ArrayList(); | |
| 35 | + millis = timeout; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void run() { | |
| 39 | + try { | |
| 40 | + Thread.sleep(millis); | |
| 41 | + } catch (InterruptedException e) { | |
| 42 | + return; | |
| 43 | + } | |
| 44 | + | |
| 45 | + timeout(); | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void addDTVTestEventListener(DTVTestListener l) { | |
| 49 | + listeners.add(l); | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void removeDTVTestEventListener(DTVTestListener l) { | |
| 53 | + listeners.remove(l); | |
| 54 | + } | |
| 55 | + | |
| 56 | + private void notifyEventReceived(final DTVTestEvent e) { | |
| 57 | + | |
| 58 | + Iterator it = listeners.iterator(); | |
| 59 | + while (it.hasNext()) { | |
| 60 | + final DTVTestListener l = (DTVTestListener) it.next(); | |
| 61 | + new Thread() { | |
| 62 | + | |
| 63 | + public void run() { | |
| 64 | + l.testLogEventReceived(e); | |
| 65 | + } | |
| 66 | + }.start(); | |
| 67 | + } | |
| 68 | + } | |
| 69 | + | |
| 70 | + /** | |
| 71 | + * Define o comportamento das aplicaes diante do sucesso na execuo dos | |
| 72 | + * testes realizados. | |
| 73 | + * @throws Exception | |
| 74 | + */ | |
| 75 | + public void success() { | |
| 76 | + | |
| 77 | + if (flagLog == true) { | |
| 78 | + return; | |
| 79 | + } | |
| 80 | + | |
| 81 | + flagLog = true; | |
| 82 | + status = DTVTestEvent.TEST_SUCCESS; | |
| 83 | + notifyEventReceived(new DTVTestEvent(status)); | |
| 84 | + | |
| 85 | + } | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * Define o comportamento das aplicaes em caso dos testes no serem bem | |
| 89 | + * sucedidos. | |
| 90 | + */ | |
| 91 | + public void failure() { | |
| 92 | + | |
| 93 | + if (flagLog == true) { | |
| 94 | + return; | |
| 95 | + } | |
| 96 | + | |
| 97 | + flagLog = true; | |
| 98 | + | |
| 99 | + status = DTVTestEvent.TEST_FAILURE; | |
| 100 | + notifyEventReceived(new DTVTestEvent(status)); | |
| 101 | + } | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * Determina o comportamento a ser apresentado pelas aplicaes de teste, | |
| 105 | + * quando o tempo limite para sua execuo for alcanado. | |
| 106 | + */ | |
| 107 | + private void timeout() { | |
| 108 | + | |
| 109 | + if (flagLog == true) { | |
| 110 | + return; | |
| 111 | + } | |
| 112 | + | |
| 113 | + flagLog = true; | |
| 114 | + | |
| 115 | + status = DTVTestEvent.TEST_TIMEOUT; | |
| 116 | + notifyEventReceived(new DTVTestEvent(status)); | |
| 117 | + } | |
| 118 | + | |
| 119 | + public void visualAppFinished() { | |
| 120 | + if (flagLog == true) { | |
| 121 | + return; | |
| 122 | + } | |
| 123 | + | |
| 124 | + try { | |
| 125 | + Thread.sleep(3000); | |
| 126 | + } catch (InterruptedException e) { | |
| 127 | + e.printStackTrace(); | |
| 128 | + } | |
| 129 | + | |
| 130 | + flagLog = true; | |
| 131 | + | |
| 132 | + status = DTVTestEvent.TEST_VISUAL_APP; | |
| 133 | + notifyEventReceived(new DTVTestEvent(status)); | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setTimeOut(int ms) { | |
| 137 | + this.millis = ms; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void destroy() { | |
| 141 | + | |
| 142 | + } | |
| 143 | + | |
| 144 | + public boolean getFlagLog() { | |
| 145 | + return flagLog; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public int getStatus() { | |
| 149 | + return status; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public long getTimeout() { | |
| 153 | + return millis; | |
| 154 | + } | |
| 155 | + | |
| 156 | +} | ... | ... |
34.4 KB
75.8 KB