Package Spectrogram
Class SpectrogramDiplayProvider
java.lang.Object
Spectrogram.SpectrogramDiplayProvider
- All Implemented Interfaces:
UserDisplayProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
createSpectrogramDisplay
(UserDisplayControl userDisplayControl, SpectrogramParameters spectrogramParameters, String uniqueDisplayName) This can be used to recreate spectrogram displays from old configurations with their correct settings.getComponent
(UserDisplayControl userDisplayControl, String uniqueDisplayName) int
getName()
void
removeDisplay
(UserDisplayComponent component) Called when a display is removed from a user display.void
setReadyParameters
(SpectrogramParameters spectrogramParameters) Set parameters ready for the next constructed display.
-
Constructor Details
-
SpectrogramDiplayProvider
public SpectrogramDiplayProvider()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceUserDisplayProvider
- Returns:
- the name of the display to be shown in the user display menu
-
getComponent
public UserDisplayComponent getComponent(UserDisplayControl userDisplayControl, String uniqueDisplayName) - Specified by:
getComponent
in interfaceUserDisplayProvider
- Parameters:
userDisplayControl
- the user display that this component is being created within.uniqueDisplayName
- unique name for the display. This may need to be passed early to a display so that it can find settings based on this name.- Returns:
- The swing component to add into a frame within the user display.
-
createSpectrogramDisplay
public SpectrogramDisplayComponent createSpectrogramDisplay(UserDisplayControl userDisplayControl, SpectrogramParameters spectrogramParameters, String uniqueDisplayName) This can be used to recreate spectrogram displays from old configurations with their correct settings. From now on though, all spectrograms will be responsible for doing their own settings.- Parameters:
userDisplayControl
-spectrogramParameters
-uniqueDisplayName
-- Returns:
- display component.
-
getComponentClass
- Specified by:
getComponentClass
in interfaceUserDisplayProvider
- Returns:
- the class of the swing component.
-
getMaxDisplays
public int getMaxDisplays()- Specified by:
getMaxDisplays
in interfaceUserDisplayProvider
- Returns:
- the max mumber of displays that can be created. 0 indicates no limit.
-
canCreate
public boolean canCreate()- Specified by:
canCreate
in interfaceUserDisplayProvider
- Returns:
- true if another display can be created (i.e. number of displays is invalid input: '<' the max number or there is no max number.
-
removeDisplay
Description copied from interface:UserDisplayProvider
Called when a display is removed from a user display.- Specified by:
removeDisplay
in interfaceUserDisplayProvider
- Parameters:
component
- removed component.
-
setReadyParameters
Set parameters ready for the next constructed display. this is used as a bit of a fudge when converting old stle params storage- Parameters:
spectrogramParameters
-
-