|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenpiano.settings.Settings
public class Settings
A class managing the user settings
| Constructor Summary | |
|---|---|
Settings(Controller controller)
Creates a settings object and reads settings from a file |
|
| Method Summary | |
|---|---|
int |
addMidiSettings(MidiSettings midiSettings)
Adds a new configuration for a MIDI file |
String |
getActualMidiOutputDevice()
Returns the name of the actual MIDI output device |
float |
getAngle()
Returns the angle of the piano |
File |
getFileDir()
Returns the directory of the MIDI files |
int |
getFirstKey()
Returns the first key of the shown piano |
int |
getLastKey()
Returns the last key of the shown piano |
MidiInput |
getMidiInput()
Returns the MIDI receiver |
String |
getMidiInputDevice()
Returns the name of the MIDI input device according to the configuration |
int |
getMidiKeyboardIndex()
Returns the index of the MIDI input device |
MidiOutput |
getMidiOutput()
Returns the MIDI transmitter |
String |
getMidiOutputDevice()
Returns the name of the MIDI output device according to the configuration |
int |
getMidiOutputIndex()
Returns the index of the MIDI output device |
MidiDevice.Info[] |
getMidiPorts(Boolean input)
Returns the available MIDI ports |
LinkedList<MidiSettings> |
getMidiSettings()
Returns the configurations for the MIDI files |
MidiSettings |
getMidiSettings(int index)
Returns the configuration for a MIDI file |
int |
getWindowHeight()
Returns the height of the application window |
int |
getWindowPosX()
Returns the x-position of the application window |
int |
getWindowPosY()
Returns the y-position of the application window |
int |
getWindowWidth()
Returns the width of the application window |
float |
getZoomFactor()
Returns the zoom factor of the piano |
void |
handleMidiInputChange(MidiDevice.Info midiDevice)
Handles the change of MIDI input devices |
void |
handleMidiInputChange(MidiDevice.Info midiDevice,
Boolean saveSettings)
Handles the change of MIDI input devices |
void |
handleMidiInputChange(MidiDevice.Info midiDevice,
Boolean saveSettings,
Boolean returnFromOptions)
Handles the change of MIDI input devices |
void |
handleMidiOutputChange(MidiDevice.Info midiDevice)
Handles the change of MIDI output devices |
void |
handleMidiOutputChange(MidiDevice.Info midiDevice,
Boolean saveSettings)
Handles the change of MIDI output devices |
Boolean |
isAudioOn(int track)
Returns the status of the audio function of a specified track of the current loaded configuration |
Boolean |
isAwaitNotesOn()
Returns the status of the await notes function of the current loaded configuration |
Boolean |
isMarkKeysOn()
Returns the status of the mark keys function of the current loaded configuration |
Boolean |
isVisualOn(int track)
Returns the status of the visual function of a specified track of the current loaded configuration |
int |
lookupForFile(String md5Hash)
Looks the configuration up for a previously saved hash |
void |
saveSettings()
Saves the settings to the configuration file |
void |
setActualMidiInputDevice(String midiInputDevice)
Sets the actual MIDI input device |
void |
setActualMidiOutputDevice(String midiOutputDevice)
Sets the actual MIDI output device |
void |
setAngle(float angle)
Sets the angle of the piano |
void |
setFileDir(File fileDir)
Sets the directory of the MIDI files |
void |
setFirstKey(int firstKey)
Sets the first key of the shown piano |
void |
setLastKey(int lastKey)
Sets the last key of the shown piano |
void |
setMidiOutputDevice(String midiOutputDevice)
Sets the MIDI output device |
void |
setWindowHeight(int windowHeight)
Sets the height of the application window |
void |
setWindowPosX(int windowPosX)
Sets the x-position of the application window |
void |
setWindowPosY(int windowPosY)
Sets the y-position of the application window |
void |
setWindowWidth(int windowWidth)
Sets the width of the application window |
void |
setZoomFactor(float zoomFactor)
Sets the zoom factor of the piano |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Settings(Controller controller)
controller - the main controller of the application| Method Detail |
|---|
public int lookupForFile(String md5Hash)
md5Hash - the MD5 hash to look for
public Boolean isMarkKeysOn()
public Boolean isAwaitNotesOn()
public Boolean isAudioOn(int track)
track - the relevant track
public Boolean isVisualOn(int track)
track - the relevant track
public int getFirstKey()
public int getLastKey()
public void setFirstKey(int firstKey)
firstKey - the first key of the shown pianopublic void setLastKey(int lastKey)
lastKey - the last key of the shown pianopublic int getMidiKeyboardIndex()
public int getMidiOutputIndex()
public File getFileDir()
public void setFileDir(File fileDir)
fileDir - the directory of the MIDI filespublic MidiDevice.Info[] getMidiPorts(Boolean input)
input - true if MIDI input ports should be returned, false for MIDI output ports
public int addMidiSettings(MidiSettings midiSettings)
midiSettings - the settings of a MIDI file to add
public void saveSettings()
public String getActualMidiOutputDevice()
public String getMidiInputDevice()
public String getMidiOutputDevice()
public void setActualMidiInputDevice(String midiInputDevice)
midiInputDevice - the actual MIDI input devicepublic void setActualMidiOutputDevice(String midiOutputDevice)
midiOutputDevice - the actual MIDI output devicepublic void setMidiOutputDevice(String midiOutputDevice)
midiOutputDevice - the MIDI output devicepublic MidiSettings getMidiSettings(int index)
index - the index of the configuration to return
public LinkedList<MidiSettings> getMidiSettings()
public MidiOutput getMidiOutput()
public void handleMidiOutputChange(MidiDevice.Info midiDevice,
Boolean saveSettings)
midiDevice - the new MIDI output devicesaveSettings - true if new device should be savedpublic void handleMidiOutputChange(MidiDevice.Info midiDevice)
midiDevice - the new MIDI output devicepublic MidiInput getMidiInput()
public void handleMidiInputChange(MidiDevice.Info midiDevice)
midiDevice - the new MIDI input device
public void handleMidiInputChange(MidiDevice.Info midiDevice,
Boolean saveSettings)
midiDevice - the new MIDI input devicesaveSettings - true if new device should be saved
public void handleMidiInputChange(MidiDevice.Info midiDevice,
Boolean saveSettings,
Boolean returnFromOptions)
midiDevice - the new MIDI input devicesaveSettings - true if new device should be savedreturnFromOptions - true if called from keyboard size settingspublic void setWindowHeight(int windowHeight)
windowHeight - the height of the application windowpublic void setWindowWidth(int windowWidth)
windowWidth - the widths of the application windowpublic int getWindowHeight()
public int getWindowWidth()
public void setWindowPosX(int windowPosX)
windowPosX - the x-position of the application windowpublic void setWindowPosY(int windowPosY)
windowPosY - the y-position of the application windowpublic int getWindowPosX()
public int getWindowPosY()
public void setAngle(float angle)
angle - the angle of the pianopublic float getAngle()
public void setZoomFactor(float zoomFactor)
zoomFactor - the zoom factor of the pianopublic float getZoomFactor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||