本文整理汇总了Java中javax.sound.sampled.LineEvent.Type.START属性的典型用法代码示例。如果您正苦于以下问题:Java Type.START属性的具体用法?Java Type.START怎么用?Java Type.START使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.sound.sampled.LineEvent.Type
的用法示例。
在下文中一共展示了Type.START属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VentanaInternaGrabador
public VentanaInternaGrabador(final File f) {
initComponents();
recorder = new SMSoundPlayerRecorder(f);
this.setTitle(f.getName());
LineListener lineListener = new LineListener() {
@Override
public void update(LineEvent event) {
if (event.getType() == Type.START) {
recorderButton.setEnabled(false);
stopButton.setEnabled(true);
}
if (event.getType() == Type.STOP) {
recorderButton.setEnabled(true);
stopButton.setEnabled(false);
VentanaInternaReproductor vir = new VentanaInternaReproductor(f);
VentanaPrincipal.getEscritorio().add(vir);
vir.setVisible(true);
}
}
};
((SMSoundPlayerRecorder) recorder).setLineListener(lineListener);
this.pack();
}
示例2: VentanaInternaReproductor
public VentanaInternaReproductor(File f) {
initComponents();
player = new SMSoundPlayerRecorder(f);
this.setTitle(f.getName());
LineListener lineListener = new LineListener() {
@Override
public void update(LineEvent event) {
if (event.getType() == Type.START) {
play.setEnabled(false);
stop.setEnabled(true);
}
if (event.getType() == Type.STOP) {
play.setEnabled(true);
play.setSelected(false);
stop.setEnabled(false);
}
}
};
((SMSoundPlayerRecorder)player).setLineListener(lineListener);
this.pack();
}
示例3: VentanaInternaGrabador
public VentanaInternaGrabador() {
initComponents();
exist=true;
recorder = new SMSoundPlayerRecorder(new File("nuevo"));
LineListener lineListener = new LineListener() {
@Override
public void update(LineEvent event) {
if (event.getType() == Type.START) {
recorderButton.setEnabled(false);
stopButton.setEnabled(true);
}
if (event.getType() == Type.STOP) {
recorderButton.setEnabled(true);
stopButton.setEnabled(false);
}
}
};
((SMSoundPlayerRecorder) recorder).setLineListener(lineListener);
this.pack();
}
示例4: VentanaInternaReproductor
public VentanaInternaReproductor(File f) {
initComponents();
if (f != null) {
player = new SMSoundPlayer(f);
this.setTitle(f.getName());
LineListener lineListener = new LineListener() {
@Override
public void update(LineEvent event) {
if (event.getType() == Type.START) {
play.setEnabled(false);
stop.setEnabled(true);
}
if (event.getType() == Type.STOP) {
play.setEnabled(true);
play.setSelected(false);
stop.setEnabled(false);
}
}
};
((SMSoundPlayer) player).setLineListener(lineListener);
this.pack();
}
}