Methods Summary |
---|
public void | addRecentUrls(java.lang.String strUrlType, java.lang.String strUrl)
Object objValue;
Vector vectorUrls = null;
Hashtable hashRecentUrls;
objValue = hashProperties.get ( KEY_RECENT_URL );
if ( objValue != null && objValue instanceof Hashtable ) {
hashRecentUrls = (Hashtable) objValue;
}
else {
hashRecentUrls = new Hashtable ();
hashProperties.put ( KEY_RECENT_URL, hashRecentUrls );
}
objValue = hashRecentUrls.get ( strUrlType );
if ( objValue != null && objValue instanceof Vector ) {
vectorUrls =(Vector)objValue;
}
else {
vectorUrls = new Vector ();
hashRecentUrls.put ( strUrlType, vectorUrls );
}
if ( vectorUrls.contains(strUrl) )
vectorUrls.removeElement ( strUrl );
else if ( vectorUrls.size() >= 16 )
vectorUrls.removeElementAt ( 15 );
vectorUrls.insertElementAt ( strUrl, 0 );
|
public jmapps.util.JMAppsCfg$CaptureDeviceData | createCaptureDeviceDataObject()
CaptureDeviceData dataCaptureDevice;
dataCaptureDevice = new CaptureDeviceData ();
return ( dataCaptureDevice );
|
public jmapps.util.JMAppsCfg$RtpData | createRtpDataObject()
RtpData dataRtp;
dataRtp = new RtpData ();
return ( dataRtp );
|
public jmapps.util.JMAppsCfg$TrackData | createTrackDataObject()
TrackData dataTrack;
dataTrack = new TrackData ();
return ( dataTrack );
|
public boolean | getAutoLoop()
Object objValue;
boolean boolValue = true;
objValue = hashProperties.get ( KEY_AUTO_LOOP );
if ( objValue != null && objValue instanceof Boolean )
boolValue = ((Boolean)objValue).booleanValue ();
return ( boolValue );
|
public boolean | getAutoPlay()
Object objValue;
boolean boolValue = true;
objValue = hashProperties.get ( KEY_AUTO_PLAY );
if ( objValue != null && objValue instanceof Boolean )
boolValue = ((Boolean)objValue).booleanValue ();
return ( boolValue );
|
public java.awt.Point | getJMStudioFrameLocation(int nFrameIndex)
int nCount;
int nIndex;
Object objValue;
Point pointValue = null;
Vector vectorValues = null;
objValue = hashProperties.get ( KEY_JMSTUDIO_FRAME_POS );
if ( objValue != null && objValue instanceof Vector ) {
vectorValues = (Vector) objValue;
nCount = vectorValues.size ();
if ( nFrameIndex < nCount )
nIndex = nFrameIndex;
else
nIndex = nCount - 1;
objValue = vectorValues.elementAt ( nIndex );
if ( objValue != null && objValue instanceof Point ) {
pointValue = new Point ( (Point)objValue );
pointValue.x += 20 * (nFrameIndex - nIndex);
pointValue.y += 20 * (nFrameIndex - nIndex);
}
}
if ( pointValue == null )
pointValue = new Point ( 20 * nFrameIndex, 20 * nFrameIndex );
return ( pointValue );
|
public boolean | getKeepAspectRatio()
Object objValue;
boolean boolValue = false;
objValue = hashProperties.get ( KEY_KEEP_ASPECT );
if ( objValue != null && objValue instanceof Boolean )
boolValue = ((Boolean)objValue).booleanValue ();
return ( boolValue );
|
public jmapps.util.JMAppsCfg$CaptureDeviceData | getLastCaptureAudioData()
Object objValue;
CaptureDeviceData dataCapture = null;
objValue = hashProperties.get ( KEY_CAPTURE_AUDIO );
if ( objValue != null && objValue instanceof CaptureDeviceData )
dataCapture =(CaptureDeviceData)objValue;
return ( dataCapture );
|
public jmapps.util.JMAppsCfg$CaptureDeviceData | getLastCaptureVideoData()
Object objValue;
CaptureDeviceData dataCapture = null;
objValue = hashProperties.get ( KEY_CAPTURE_VIDEO );
if ( objValue != null && objValue instanceof CaptureDeviceData )
dataCapture =(CaptureDeviceData)objValue;
return ( dataCapture );
|
public java.lang.String | getLastOpenFile()
Object objValue;
String strFile = null;
objValue = hashProperties.get ( KEY_OPEN_FILE );
if ( objValue != null )
strFile = objValue.toString ();
return ( strFile );
|
public jmapps.util.JMAppsCfg$RtpData | getLastOpenRtpData()
Object objValue;
RtpData dataRtp = null;
objValue = hashProperties.get ( KEY_OPEN_RTP );
if ( objValue != null && objValue instanceof RtpData )
dataRtp =(RtpData)objValue;
return ( dataRtp );
|
public java.lang.String | getLastOpenUrl()
Object objValue;
String strValue = null;
objValue = hashProperties.get ( KEY_OPEN_URL );
if ( objValue != null )
strValue = objValue.toString ();
return ( strValue );
|
public java.lang.String | getLastSaveFileContentType()
Object objValue;
String strValue = null;
objValue = hashProperties.get ( KEY_SAVE_FILE_CONTENT );
if ( objValue != null )
strValue = objValue.toString ();
return ( strValue );
|
public java.lang.String | getLastSaveFileDir()
Object objValue;
String strValue = null;
objValue = hashProperties.get ( KEY_SAVE_FILE_DIR );
if ( objValue != null )
strValue = objValue.toString ();
return ( strValue );
|
public jmapps.util.JMAppsCfg$TrackData | getLastSaveFileTrackData(java.lang.String strTrack)
Object objValue;
TrackData dataTrack = null;
Hashtable hashSaveFile;
objValue = hashProperties.get ( KEY_SAVE_FILE_TRACKS );
if ( objValue != null && objValue instanceof Hashtable ) {
hashSaveFile = (Hashtable) objValue;
}
else {
hashSaveFile = new Hashtable ();
hashProperties.put ( KEY_SAVE_FILE_TRACKS, hashSaveFile );
}
objValue = hashSaveFile.get ( strTrack );
if ( objValue != null && objValue instanceof TrackData )
dataTrack =(TrackData)objValue;
return ( dataTrack );
|
public jmapps.util.JMAppsCfg$RtpData | getLastTransmitRtpData(java.lang.String strTrack)
Object objValue;
RtpData dataRtp = null;
Hashtable hashTransmitRtp;
objValue = hashProperties.get ( KEY_TRANSMIT_RTP );
if ( objValue != null && objValue instanceof Hashtable ) {
hashTransmitRtp = (Hashtable) objValue;
}
else {
hashTransmitRtp = new Hashtable ();
hashProperties.put ( KEY_TRANSMIT_RTP, hashTransmitRtp );
}
objValue = hashTransmitRtp.get ( strTrack );
if ( objValue != null && objValue instanceof RtpData )
dataRtp =(RtpData)objValue;
return ( dataRtp );
|
public java.lang.String | getLastTransmitRtpSource()
Object objValue;
String strValue = null;
objValue = hashProperties.get ( KEY_TRANSMIT_SOURCE );
if ( objValue != null )
strValue = objValue.toString ();
return ( strValue );
|
public java.util.Enumeration | getRecentUrlTypes()
Enumeration enumTypes = null;
Object objValue;
Hashtable hashRecentUrls;
objValue = hashProperties.get ( KEY_RECENT_URL );
if ( objValue != null && objValue instanceof Hashtable ) {
hashRecentUrls = (Hashtable) objValue;
enumTypes = hashRecentUrls.keys ();
}
return ( enumTypes );
|
public java.util.Vector | getRecentUrls(java.lang.String strUrlType)
Object objValue;
Vector vectorUrls = null;
Hashtable hashRecentUrls;
objValue = hashProperties.get ( KEY_RECENT_URL );
if ( objValue != null && objValue instanceof Hashtable ) {
hashRecentUrls = (Hashtable) objValue;
}
else {
hashRecentUrls = new Hashtable ();
hashProperties.put ( KEY_RECENT_URL, hashRecentUrls );
}
objValue = hashRecentUrls.get ( strUrlType );
if ( objValue != null && objValue instanceof Vector )
vectorUrls =(Vector)objValue;
return ( vectorUrls );
|
protected void | init()
readFile ();
|
private void | readFile()
FileInputStream streamFile = null;
ObjectInputStream streamObject = null;
String strSignatue;
String strVersion;
Object objValue;
String strPath;
try {
strPath = System.getProperty ( "user.home" );
if ( strPath != null )
nameFileCfg = strPath + File.separator + nameFileCfg;
streamFile = new FileInputStream ( nameFileCfg );
}
catch ( Exception exception ) {
// so we will start from scratch
return;
}
try {
streamObject = new ObjectInputStream ( streamFile );
strSignatue = streamObject.readUTF ();
strVersion = streamObject.readUTF ();
objValue = streamObject.readObject ();
if ( objValue.toString().equals(signatureHashtable) )
hashProperties = readHashtable ( streamObject );
}
catch ( Exception exception ) {
MessageDialog.createErrorDialog ( null,
JMFI18N.getResource("jmstudio.error.cfgfile.read"),
exception );
}
try {
if ( streamObject != null )
streamObject.close ();
if ( streamFile != null )
streamFile.close ();
}
catch ( Exception exception ) {
MessageDialog.createErrorDialog ( null,
JMFI18N.getResource("jmstudio.error.cfgfile.close"),
exception );
}
|
private java.util.Hashtable | readHashtable(java.io.ObjectInputStream streamObject)
int i;
int nSize;
String strKey;
Object objValue;
Hashtable hashRead;
hashRead = new Hashtable ();
nSize = streamObject.readInt ();
for ( i = 0; i < nSize; i++ ) {
strKey = streamObject.readUTF ();
objValue = streamObject.readObject ();
if ( objValue != null && objValue.toString().equals(signatureHashtable) ) {
objValue = readHashtable ( streamObject );
}
hashRead.put ( strKey, objValue );
}
return ( hashRead );
|
public void | save()
saveFile ();
|
private void | saveFile()
FileOutputStream streamFile = null;
ObjectOutputStream streamObject = null;
String strVersion;
int nSize;
Enumeration enumKeys;
String strKey;
Object objValue;
try {
streamFile = new FileOutputStream ( nameFileCfg );
streamObject = new ObjectOutputStream ( streamFile );
}
catch ( Exception exception ) {
// MessageDialog.createErrorDialog ( null,
// JMFI18N.getResource("jmstudio.error.cfgfile.create"),
// exception );
System.out.println ( JMFI18N.getResource("jmstudio.error.cfgfile.create")
+ " " + exception.getMessage() );
return;
}
try {
streamObject.writeUTF ( signatureFileCfg );
strVersion = Manager.getVersion ();
streamObject.writeUTF ( strVersion );
writeHashtable ( streamObject, hashProperties );
}
catch ( Exception exception ) {
MessageDialog.createErrorDialog ( null,
JMFI18N.getResource("jmstudio.error.cfgfile.write"),
exception );
}
try {
if ( streamObject != null )
streamObject.close ();
if ( streamFile != null )
streamFile.close ();
}
catch ( Exception exception ) {
MessageDialog.createErrorDialog ( null,
JMFI18N.getResource("jmstudio.error.cfgfile.close"),
exception );
}
|
public void | setAutoLoop(boolean boolValue)
Boolean objValue;
objValue = new Boolean ( boolValue );
hashProperties.put ( KEY_AUTO_LOOP, objValue );
|
public void | setAutoPlay(boolean boolValue)
Boolean objValue;
objValue = new Boolean ( boolValue );
hashProperties.put ( KEY_AUTO_PLAY, objValue );
|
public void | setJMStudioFrameLocation(java.awt.Point pointValue, int nFrameIndex)
int nCount;
Object objValue;
Vector vectorValues = null;
objValue = hashProperties.get ( KEY_JMSTUDIO_FRAME_POS );
if ( objValue != null && objValue instanceof Vector ) {
vectorValues = (Vector) objValue;
}
else {
vectorValues = new Vector ();
hashProperties.put ( KEY_JMSTUDIO_FRAME_POS, vectorValues );
}
nCount = vectorValues.size ();
if ( nFrameIndex < nCount )
vectorValues.setElementAt ( pointValue, nFrameIndex );
else
vectorValues.addElement ( pointValue );
|
public void | setKeepAspectRatio(boolean boolValue)
Boolean objValue;
objValue = new Boolean ( boolValue );
hashProperties.put ( KEY_KEEP_ASPECT, objValue );
|
public void | setLastCaptureAudioData(jmapps.util.JMAppsCfg$CaptureDeviceData dataCapture)
hashProperties.put ( KEY_CAPTURE_AUDIO, dataCapture );
|
public void | setLastCaptureVideoData(jmapps.util.JMAppsCfg$CaptureDeviceData dataCapture)
hashProperties.put ( KEY_CAPTURE_VIDEO, dataCapture );
|
public void | setLastOpenFile(java.lang.String strFile)
hashProperties.put ( KEY_OPEN_FILE, strFile );
|
public void | setLastOpenRtpData(jmapps.util.JMAppsCfg$RtpData dataRtp)
hashProperties.put ( KEY_OPEN_RTP, dataRtp );
|
public void | setLastOpenUrl(java.lang.String strValue)
hashProperties.put ( KEY_OPEN_URL, strValue );
|
public void | setLastSaveFileContentType(java.lang.String strValue)
hashProperties.put ( KEY_SAVE_FILE_CONTENT, strValue );
|
public void | setLastSaveFileDir(java.lang.String strValue)
hashProperties.put ( KEY_SAVE_FILE_DIR, strValue );
|
public void | setLastSaveFileTrackData(jmapps.util.JMAppsCfg$TrackData dataTrack, java.lang.String strTrack)
Object objValue;
Hashtable hashSaveFile;
objValue = hashProperties.get ( KEY_SAVE_FILE_TRACKS );
if ( objValue != null && objValue instanceof Hashtable ) {
hashSaveFile = (Hashtable) objValue;
}
else {
hashSaveFile = new Hashtable ();
hashProperties.put ( KEY_SAVE_FILE_TRACKS, hashSaveFile );
}
hashSaveFile.put ( strTrack, dataTrack );
|
public void | setLastTransmitRtpData(jmapps.util.JMAppsCfg$RtpData dataRtp, java.lang.String strTrack)
Object objValue;
Hashtable hashTransmitRtp;
objValue = hashProperties.get ( KEY_TRANSMIT_RTP );
if ( objValue != null && objValue instanceof Hashtable ) {
hashTransmitRtp = (Hashtable) objValue;
}
else {
hashTransmitRtp = new Hashtable ();
hashProperties.put ( KEY_TRANSMIT_RTP, hashTransmitRtp );
}
hashTransmitRtp.put ( strTrack, dataRtp );
|
public void | setLastTransmitRtpSource(java.lang.String strValue)
hashProperties.put ( KEY_TRANSMIT_SOURCE, strValue );
|
private void | writeHashtable(java.io.ObjectOutputStream streamObject, java.util.Hashtable hashWrite)
int nSize;
Enumeration enumKeys;
String strKey;
Object objValue;
streamObject.writeObject ( signatureHashtable );
nSize = hashWrite.size ();
streamObject.writeInt ( nSize );
enumKeys = hashWrite.keys ();
while ( enumKeys.hasMoreElements() ) {
strKey = (String) enumKeys.nextElement();
objValue = hashWrite.get ( strKey );
//System.out.println ( "AAAAA Writing object: " + objValue.getClass().getName() );
if ( objValue instanceof Hashtable ) {
streamObject.writeUTF ( strKey );
writeHashtable ( streamObject, (Hashtable)objValue );
}
else if ( !(objValue instanceof Serializable) ) {
/*CHANGE*/
System.out.println ( "Error. Not Serializable object" );
}
else {
streamObject.writeUTF ( strKey );
streamObject.writeObject ( objValue );
}
streamObject.flush ();
}
|