abstractgaincontrol.java
来自「FMJ(freedom media for java)是java视频开发的新选择」· Java 代码 · 共 57 行
JAVA
57 行
package net.sf.fmj.ejmf.toolkit.gui.controls;import javax.media.Controller;import javax.media.GainControl;import javax.media.Player;/*** Abstract class from which AbstractListenerControls that depend* on a GainControl should extend. Upon construction it properly* set the operational state of the Control.* */public abstract class AbstractGainControl extends ActionListenerControl { private GainControl gc; /** * Create an AbstractGainControl and associate with * controller. * @param controller Controller with which this control is associated. */ protected AbstractGainControl(Skin skin, Controller controller) { super(skin, controller); } /** * Create an AbstractGainControl. Controller will be assigned * later. */ protected AbstractGainControl(Skin skin) { super(skin); } /** * Invoked when Controller is associated with Control. * Properly sets operational state and initializes * initializes private reference to GainControl if * Controller is a Player and it has a one. * @param controller Controller with which this control is associated. */ protected void setControllerHook(Controller controller) { if (controller instanceof Player) { gc = ((Player)controller).getGainControl(); setOperational(gc != null); } else { setOperational(false); } } /** * @return GainControl associated with this AbstractGainControl. */ protected GainControl getGainControl() { return gc; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?