Miscellaneous minor changes.
This commit is contained in:
parent
984a1841b1
commit
2e8608d13b
4 changed files with 33 additions and 29 deletions
|
@ -504,14 +504,14 @@ class TimeCodeManager extends JPanel {
|
||||||
JPanel ps = new JPanel();
|
JPanel ps = new JPanel();
|
||||||
ps.add(playSegButton);
|
ps.add(playSegButton);
|
||||||
|
|
||||||
/*
|
JButton playPauseButton = new JButton(messages.getString("PlayPause"));
|
||||||
JButton playButton = new JButton(messages.getString("Play"));
|
playPauseButton.addActionListener(new ThdlActionListener() {
|
||||||
JButton pauseButton = new JButton(messages.getString("Pause"));
|
|
||||||
|
|
||||||
playButton.addActionListener(new ThdlActionListener() {
|
|
||||||
public void theRealActionPerformed(ActionEvent e) {
|
public void theRealActionPerformed(ActionEvent e) {
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
try {
|
try {
|
||||||
|
if (player.isPlaying())
|
||||||
|
player.cmd_stop();
|
||||||
|
else
|
||||||
player.cmd_playOn();
|
player.cmd_playOn();
|
||||||
} catch (SmartMoviePanelException smpe) {
|
} catch (SmartMoviePanelException smpe) {
|
||||||
smpe.printStackTrace();
|
smpe.printStackTrace();
|
||||||
|
@ -520,24 +520,15 @@ class TimeCodeManager extends JPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
pauseButton.addActionListener(new ThdlActionListener() {
|
|
||||||
public void theRealActionPerformed(ActionEvent e) {
|
JPanel playPausePanel = new JPanel();
|
||||||
if (player != null) {
|
playPausePanel.add(playPauseButton);
|
||||||
try {
|
|
||||||
player.cmd_stop();
|
|
||||||
} catch (SmartMoviePanelException smpe) {
|
|
||||||
smpe.printStackTrace();
|
|
||||||
ThdlDebug.noteIffyCode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
Box box = Box.createVerticalBox();
|
Box box = Box.createVerticalBox();
|
||||||
box.add(inPanel);
|
box.add(inPanel);
|
||||||
box.add(outPanel);
|
box.add(outPanel);
|
||||||
box.add(ps);
|
box.add(ps);
|
||||||
|
box.add(playPausePanel);
|
||||||
|
|
||||||
add("North", box);
|
add("North", box);
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,8 +178,10 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene
|
||||||
weird results if you do player.start() without setting the media
|
weird results if you do player.start() without setting the media
|
||||||
time.*/
|
time.*/
|
||||||
|
|
||||||
if (!(event instanceof RestartingEvent))
|
if (!(event instanceof RestartingEvent)) {
|
||||||
player.setMediaTime(pauseTime);
|
player.setMediaTime(pauseTime);
|
||||||
|
player.prefetch();
|
||||||
|
}
|
||||||
|
|
||||||
// player.setStopTime(Clock.RESET);
|
// player.setStopTime(Clock.RESET);
|
||||||
stopTime = null;
|
stopTime = null;
|
||||||
|
@ -274,6 +276,13 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------*/
|
||||||
|
public boolean isPlaying() {
|
||||||
|
if (player == null)
|
||||||
|
return false;
|
||||||
|
if (player.getState() == Controller.Started)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
public int getCurrentTime() {
|
public int getCurrentTime() {
|
||||||
if (player == null)
|
if (player == null)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -17,6 +17,7 @@ public abstract class SmartMoviePanel extends Panel
|
||||||
|
|
||||||
//helper methods - media status
|
//helper methods - media status
|
||||||
public abstract boolean isInitialized();
|
public abstract boolean isInitialized();
|
||||||
|
public abstract boolean isPlaying();
|
||||||
public abstract int getCurrentTime();
|
public abstract int getCurrentTime();
|
||||||
public abstract int getEndTime();
|
public abstract int getEndTime();
|
||||||
|
|
||||||
|
|
|
@ -199,6 +199,9 @@ public class SmartQT4JPlayer extends SmartMoviePanel
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
public boolean isPlaying() {
|
||||||
|
return false; //FIXME
|
||||||
|
}
|
||||||
public int getCurrentTime()
|
public int getCurrentTime()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue