
org.appdapter.gui.swing.PlayStopController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.appdapter.lib.gui Show documentation
Show all versions of org.appdapter.lib.gui Show documentation
Appdapter Maven project including Java and Scala, produces jar, not bundle. Excludes concrete SLF4J binding.
The newest version!
package org.appdapter.gui.swing;
/**
* This class controls a play and stop button
* so that they act consistently. The PlayStopController
* has four possible states:
*
* - play = play button on, stop button off
* - stop = play button off, stop button on
* - willPlay = play button blink, stop button on
* - willStop = play button on, stop button blink
*
* @see PlayButton
* @see StopButton
*
* @author Henrik
* @version 1.0
*/
public class PlayStopController {
PlayButton play;
StopButton stop;
public PlayStopController(PlayButton play, StopButton stop) {
this.play = play;
this.stop = stop;
setStop();
}
public void setPlay() {
play.setOn();
stop.setOff();
}
public void setStop() {
stop.setOn();
play.setOff();
}
public void setWillPlay() {
play.setBlink();
stop.setOn();
}
public void setWillStop() {
stop.setBlink();
play.setOn();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy