public class AudioConfigController extends FileConfigController
Controller for the audio config window.
| Modifier and Type | Field and Description |
|---|---|
private static AudioConfigController |
controller |
configClasses, configKeys, configWidgets, icon, sessionConfig, view| Modifier | Constructor and Description |
|---|---|
private |
AudioConfigController(AudioConfigView view,
ConfigIcon icon)
Creates a controller for the audio config window.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applyConfigById(java.lang.String id)
Copies the given config key’s value to the session config, if the value is correct.
|
protected void |
createDefaultView()
Creates a default view that is not intended to be used as a real window.
|
private boolean |
encodingMatchesSampleRate(java.lang.String encoding,
int sampleSize)
Checks if the given combination of encoding and sample rate make sense.
|
static javax.swing.DefaultComboBoxModel<NamedInteger> |
getComboboxModelChannels()
Returns the model for the channels combobox.
|
static javax.swing.DefaultComboBoxModel<java.lang.String> |
getComboboxModelEncoding()
Returns the model for the encoding combobox.
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
getDefaultConfig()
Returns the hard-coded default config.
|
static AudioConfigController |
getInstance(AudioConfigView view,
ConfigIcon icon)
Creates a singleton instance of the controller.
|
protected void |
initSessionConfigSpecific(boolean fromConfig)
Initializes the specific part of the session config.
|
actionPerformed, applyConfig, changedUpdate, focusGained, focusLost, getSessionConfig, handleDocumentChange, init, initSessionConfig, initWidgetConfig, insertUpdate, removeUpdate, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedprivate static AudioConfigController controller
private AudioConfigController(AudioConfigView view, ConfigIcon icon)
Creates a controller for the audio config window.
view - the window to be controlledicon - the icon that is used to open the config windowpublic static AudioConfigController getInstance(AudioConfigView view, ConfigIcon icon)
Creates a singleton instance of the controller.
view - the window to be controlledicon - the icon that is used to open the config windowprotected void createDefaultView()
FileConfigControllerCreates a default view that is not intended to be used as a real window. This is used to initialize data structures, if the user does not want to config window is.
createDefaultView in class FileConfigControllerprotected java.util.HashMap<java.lang.String,java.lang.String> getDefaultConfig()
FileConfigControllerReturns the hard-coded default config.
getDefaultConfig in class FileConfigControllerprotected void initSessionConfigSpecific(boolean fromConfig)
FileConfigControllerInitializes the specific part of the session config.
initSessionConfigSpecific in class FileConfigControllerfromConfig - true if the session config shall be copied from the Config class.protected boolean applyConfigById(java.lang.String id)
FileConfigControllerCopies the given config key’s value to the session config, if the value is correct.
Adjusts the widget according to the correctness (background of text fields etc.).
applyConfigById in class FileConfigControllerid - config IDprivate boolean encodingMatchesSampleRate(java.lang.String encoding,
int sampleSize)
Checks if the given combination of encoding and sample rate make sense.
encoding - audio encodingsampleSize - sample ratepublic static javax.swing.DefaultComboBoxModel<java.lang.String> getComboboxModelEncoding()
Returns the model for the encoding combobox.
public static javax.swing.DefaultComboBoxModel<NamedInteger> getComboboxModelChannels()
Returns the model for the channels combobox.