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();
|
||||
ps.add(playSegButton);
|
||||
|
||||
/*
|
||||
JButton playButton = new JButton(messages.getString("Play"));
|
||||
JButton pauseButton = new JButton(messages.getString("Pause"));
|
||||
|
||||
playButton.addActionListener(new ThdlActionListener() {
|
||||
JButton playPauseButton = new JButton(messages.getString("PlayPause"));
|
||||
playPauseButton.addActionListener(new ThdlActionListener() {
|
||||
public void theRealActionPerformed(ActionEvent e) {
|
||||
if (player != null) {
|
||||
try {
|
||||
if (player.isPlaying())
|
||||
player.cmd_stop();
|
||||
else
|
||||
player.cmd_playOn();
|
||||
} catch (SmartMoviePanelException smpe) {
|
||||
smpe.printStackTrace();
|
||||
|
@ -520,24 +520,15 @@ class TimeCodeManager extends JPanel {
|
|||
}
|
||||
}
|
||||
});
|
||||
pauseButton.addActionListener(new ThdlActionListener() {
|
||||
public void theRealActionPerformed(ActionEvent e) {
|
||||
if (player != null) {
|
||||
try {
|
||||
player.cmd_stop();
|
||||
} catch (SmartMoviePanelException smpe) {
|
||||
smpe.printStackTrace();
|
||||
ThdlDebug.noteIffyCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
JPanel playPausePanel = new JPanel();
|
||||
playPausePanel.add(playPauseButton);
|
||||
|
||||
Box box = Box.createVerticalBox();
|
||||
box.add(inPanel);
|
||||
box.add(outPanel);
|
||||
box.add(ps);
|
||||
box.add(playPausePanel);
|
||||
|
||||
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
|
||||
time.*/
|
||||
|
||||
if (!(event instanceof RestartingEvent))
|
||||
if (!(event instanceof RestartingEvent)) {
|
||||
player.setMediaTime(pauseTime);
|
||||
player.prefetch();
|
||||
}
|
||||
|
||||
// player.setStopTime(Clock.RESET);
|
||||
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() {
|
||||
if (player == null)
|
||||
return -1;
|
||||
|
|
|
@ -17,6 +17,7 @@ public abstract class SmartMoviePanel extends Panel
|
|||
|
||||
//helper methods - media status
|
||||
public abstract boolean isInitialized();
|
||||
public abstract boolean isPlaying();
|
||||
public abstract int getCurrentTime();
|
||||
public abstract int getEndTime();
|
||||
|
||||
|
|
|
@ -199,6 +199,9 @@ public class SmartQT4JPlayer extends SmartMoviePanel
|
|||
{
|
||||
return true;
|
||||
}
|
||||
public boolean isPlaying() {
|
||||
return false; //FIXME
|
||||
}
|
||||
public int getCurrentTime()
|
||||
{
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue