|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.window.ApplicationWindow
com.groovemanager.gui.EditorWindow
com.groovemanager.app.sse.SimpleSampleEditor
This class represents the application window of the sample editor application
| Nested Class Summary | |
|---|---|
protected class |
SimpleSampleEditor.AudioPlayerPositionReader
This subclass of Thread is used to monitor the AudioPlayer status and adapt the SampleEditor´s gui elements |
protected class |
SimpleSampleEditor.LeftBar
This class represents the left bar of a SampleEditor |
private class |
SimpleSampleEditor.TransportBar
This class is used for the transport bar of a Sample editor |
| Nested classes inherited from class org.eclipse.jface.window.Window |
|---|
org.eclipse.jface.window.Window.IExceptionHandler |
| Field Summary | |
|---|---|
protected ConfigAction |
configAction
ConfigAction used for Settings |
protected org.eclipse.swt.widgets.Composite |
controlBar
The control bar composite |
protected WaveTab |
copySource
The current source for paste operations |
protected java.util.ArrayList |
effectActions
All effect actions |
protected FileCloseAction |
fileCloseAction
Action used for closing files |
protected FileManager |
fileManager
the FileManager to be used |
protected FileOpenAction |
fileOpenAction
The action used for opening files |
protected FileSaveAction |
fileSaveAction
Action used for saving files |
protected SaveAudioFileAsAction |
fileSaveAsAction
Action used for saving files as... |
protected org.eclipse.swt.events.KeyListener |
keyListener
KeyListener for global shortcuts |
protected SimpleSampleEditor.LeftBar |
left
The left bar |
protected org.eclipse.swt.widgets.Composite |
leftBar
The control bar composite |
protected boolean |
listenToWaveDisplay
Indicates whether a zoom or scroll change in the main WaveFormDisplay of the currently active WaveTab should be handled with a selection change of the ZoomWaveDisplay or not |
protected boolean |
listenToZoomWaveForm
Indicates whether selection changes on the zoom waveform should be handled with a zoom and scroll change or not |
protected org.eclipse.swt.widgets.Composite |
mainContent
The control bar composite |
protected java.lang.Thread |
memoryReader
Seperate thread for showing the current memory usage |
protected AudioPlayer |
player
The AudioPlayer to be used for playback and recording |
protected SimpleSampleEditor.AudioPlayerPositionReader |
positionReader
A seperate Thread for updating the current position of the AudioPlayer |
protected boolean |
readMemory
break condition for the memory reader thread |
protected org.eclipse.swt.widgets.Composite |
rightBar
The control bar composite |
protected org.eclipse.swt.custom.SashForm |
sashForm
The SashForm containing the left bar and the wave form composite |
protected int |
style
This window´s style |
protected org.eclipse.swt.widgets.TabFolder |
tabFolder
The TabFolder containing the WaveTabs |
protected SimpleSampleEditor.TransportBar |
transportBar
The transport bar on the right |
protected org.eclipse.swt.widgets.Composite |
waveContent
The control bar composite |
protected org.eclipse.swt.widgets.Button |
zoomAll
Zoom buttons |
protected org.eclipse.swt.widgets.Button |
zoomIn
Zoom buttons |
protected org.eclipse.swt.widgets.Button |
zoomOut
Zoom buttons |
protected org.eclipse.swt.widgets.Button |
zoomSel
Zoom buttons |
protected WaveFormDisplay |
zoomWaveDisplay
The WaveFormDisplay displayed at the bottom for direct zooming |
| Fields inherited from class org.eclipse.jface.window.Window |
|---|
CANCEL, OK |
| Constructor Summary | |
|---|---|
SimpleSampleEditor()
Create a new SimpleSampleEditor in a top level window using the default FileManager |
|
SimpleSampleEditor(FileManager fileManager)
Create a new SimpleSampleEditor in a top level window |
|
SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell)
Create a new SimpleSampleEditor using the default FileManager |
|
SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell,
FileManager fileManager)
Create a new SimpleSampleEditor |
|
SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell,
int style)
Create a new SimpleSampleEditor using the default FileManager |
|
SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell,
int style,
FileManager fileManager)
Create a new SimpleSampleEditor |
|
| Method Summary | |
|---|---|
protected java.io.File |
copyFile(java.io.File source)
Create a 1:1 copy of the given file in a temporary file |
protected ConfigAction |
createConfigAction()
Create the action that will be used for "Settings" |
protected org.eclipse.swt.widgets.Control |
createContents(org.eclipse.swt.widgets.Composite parent)
This methos must be implemented to create the EditorWindow´s contents |
protected void |
createControlBarElements(org.eclipse.swt.widgets.Composite comp)
Create the control bar elements (bottom bar) |
protected void |
createEditMenu(org.eclipse.jface.action.MenuManager editMenu)
Add the edit menu elements to the given menu manager |
protected void |
createEffectMenu(org.eclipse.jface.action.MenuManager parent)
Add the effect menu elements to the given menu manager |
protected void |
createFileMenu(org.eclipse.jface.action.MenuManager fileMenu)
Add the file menu elements to the given menu manager |
protected void |
createLeftBarElements(org.eclipse.swt.widgets.Composite comp)
Create the elements for the left bar |
protected org.eclipse.jface.action.MenuManager |
createMenuManager()
|
protected void |
createOptionsMenu(org.eclipse.jface.action.MenuManager optionsMenu)
Add the options menu elements to the given menu manager |
protected void |
createRightBarElements(org.eclipse.swt.widgets.Composite parent)
Create the elementes for the right bar |
protected java.io.File |
createTempFile(javax.sound.sampled.AudioFormat format)
Create a temporary file for saving temporary audio data |
protected void |
createWaveContentElements(org.eclipse.swt.widgets.Composite comp)
Create the elements for the WaveForm content |
void |
editAction(int type)
Perform an edit action of the given type |
void |
fileClosed(java.io.File f)
Notification that the user requested to close a file |
void |
fileOpened(java.io.File f)
Notification that the user desired to open a file. |
void |
fileSaved(java.io.File source,
java.io.File f)
|
protected java.io.File |
getActiveSource()
Get the source file of the currently active WaveTab |
protected WaveTab |
getActiveTab()
Get the currently active WaveTab |
protected int |
getControlBarStyle()
Get the style to be used for the control bar (bottom bar) |
WaveTab |
getCopySource()
Get the WaveTab that is currently assigned as copy source, if any. |
protected org.eclipse.swt.graphics.Image |
getImage()
Get the icon to be used for this editor |
protected int |
getLeftBarStyle()
Get the style to be used for the left bar |
protected int |
getRightBarStyle()
Get the style to be used for the right bar |
protected int |
getSashFormStyle()
Get the style to be used for the SashForm |
protected int[] |
getSashFormWeights()
Get the weights to be used for the SashForm |
protected int |
getTabFolderStyle()
Get the style to be used for the TabFolder |
protected WaveTab |
getTabForFile(java.io.File f)
Get the WaveTab to which the given file is the source |
protected int |
getTabItemStyle()
Get the style to be used for each Tabitem |
protected java.lang.String |
getTitle()
Get the title to be used for the window |
protected int |
getTransportBarStyle()
Get the style to be used for the transport bar |
protected int |
getWaveContentStyle()
Get the style to be used for the WaveForm content |
protected AbstractWaveFormDisplay |
getWaveDisplay()
Get the current WaveFormDisplay |
protected int |
getWaveStyle()
Get the style to be used for the WaveForm composite |
protected boolean |
isOpen(java.io.File f)
Check, if the given file is opened somewhere inside this editor |
void |
newFile()
Notification that the user requested to create a new file. |
int |
open()
Open this editor |
void |
removeCopySource()
Remove the current copy source |
void |
saveAudioFile(java.io.File source,
java.io.File f,
javax.sound.sampled.AudioFileFormat.Type type,
javax.sound.sampled.AudioFormat format)
Notification that a SaveAudioFileAsAction has been performed, meaning the given file should be saved as the given audio file type at the given File location in the given format. |
protected boolean |
selectFileTab(java.io.File f)
Bring the WaveTab to the foreground to ehich the given file belongs |
void |
setCopySource(WaveTab wt)
Set the WaveTab that should act as copy source, meaning that a this WaveTab will be used for a paste operation |
protected void |
setShells(org.eclipse.swt.widgets.Shell s)
This method is called after the Shell has been created so that the Shell can be set for any action or other object that needs it. |
protected void |
sourceFileChanged(java.io.File newSource)
Notification that the currently active source file (represented by a WaveTab instance) has changed. |
protected void |
tabActivated(WaveTab wt)
React to a WaveTab being selected to the Foreground |
protected void |
transportBack()
React to the back button being pressed |
protected void |
transportBackSearch()
React to the search back button being pressed |
protected void |
transportFwd()
React to the forward button being pressed |
protected void |
transportFwdSearch()
React to the search forward button being pressed |
protected void |
transportLoop()
React to the loop button being pressed |
protected void |
transportPause()
React to the pause button being pressed |
protected void |
transportPlay()
React to the play button being pressed |
protected void |
transportRecord()
React to the record button being pressed |
protected void |
transportStop()
React to the stop button being pressed |
void |
viewChanged(AbstractWaveFormDisplay display,
double zoom,
double scroll)
Notification about a zoom or scroll change |
protected void |
zoomAll()
Zoom and scroll in the way that the whole WaveForm is visible and nothing more |
protected void |
zoomIn()
Zoom one level in |
protected void |
zoomOut()
Zoom one level out |
protected void |
zoomSelection()
Zoom and scroll to the current selection |
| Methods inherited from class com.groovemanager.gui.EditorWindow |
|---|
errorMessage |
| Methods inherited from class org.eclipse.jface.window.ApplicationWindow |
|---|
addMenuBar, addStatusLine, addToolBar, canHandleShellCloseEvent, close, configureShell, createStatusLineManager, createToolBarControl, createToolBarManager, getFont, getMenuBarManager, getStatusLineManager, getSymbolicFontName, getToolBarControl, getToolBarManager, run, setStatus, toolBarChildrenExist |
| Methods inherited from class org.eclipse.jface.window.Window |
|---|
constrainShellSize, create, createShell, getContents, getDefaultImage, getInitialLocation, getInitialSize, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, setBlockOnOpen, setDefaultImage, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ConfigAction configAction
protected org.eclipse.swt.widgets.Composite controlBar
protected WaveTab copySource
protected java.util.ArrayList effectActions
protected FileCloseAction fileCloseAction
protected FileManager fileManager
protected FileOpenAction fileOpenAction
protected FileSaveAction fileSaveAction
protected SaveAudioFileAsAction fileSaveAsAction
protected org.eclipse.swt.events.KeyListener keyListener
protected SimpleSampleEditor.LeftBar left
protected org.eclipse.swt.widgets.Composite leftBar
protected boolean listenToWaveDisplay
protected boolean listenToZoomWaveForm
protected org.eclipse.swt.widgets.Composite mainContent
protected java.lang.Thread memoryReader
protected AudioPlayer player
protected SimpleSampleEditor.AudioPlayerPositionReader positionReader
protected boolean readMemory
protected org.eclipse.swt.widgets.Composite rightBar
protected org.eclipse.swt.custom.SashForm sashForm
protected int style
protected org.eclipse.swt.widgets.TabFolder tabFolder
protected SimpleSampleEditor.TransportBar transportBar
protected org.eclipse.swt.widgets.Composite waveContent
protected org.eclipse.swt.widgets.Button zoomAll
protected org.eclipse.swt.widgets.Button zoomIn
protected org.eclipse.swt.widgets.Button zoomOut
protected org.eclipse.swt.widgets.Button zoomSel
protected WaveFormDisplay zoomWaveDisplay
| Constructor Detail |
|---|
public SimpleSampleEditor()
public SimpleSampleEditor(FileManager fileManager)
fileManager - The FileManager to usepublic SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell)
shell - The parent shell. May be null to create a
top level window.
public SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell,
FileManager fileManager)
shell - The parent shell. May be null to create a
top level window.fileManager - The FileManager to use
public SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell,
int style)
shell - The parent shell. May be null to create a
top level window.style - The window´s style
public SimpleSampleEditor(org.eclipse.swt.widgets.Shell shell,
int style,
FileManager fileManager)
shell - The parent shell. May be null to create a
top level window.style - The window´s stylefileManager - The FileManager to use| Method Detail |
|---|
protected java.io.File copyFile(java.io.File source)
throws java.io.IOException,
NotFinishedException
source - The file to copy
java.io.IOException
NotFinishedExceptionprotected ConfigAction createConfigAction()
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
EditorWindow
createContents in class EditorWindowWindow.createContents(org.eclipse.swt.widgets.Composite)protected void createControlBarElements(org.eclipse.swt.widgets.Composite comp)
comp - The parent compositeprotected void createEditMenu(org.eclipse.jface.action.MenuManager editMenu)
editMenu - The edit Menu´s MenuManagerprotected void createEffectMenu(org.eclipse.jface.action.MenuManager parent)
parent - The effect Menu´s MenuManagerprotected void createFileMenu(org.eclipse.jface.action.MenuManager fileMenu)
fileMenu - The file Menu´s MenuManagerprotected void createLeftBarElements(org.eclipse.swt.widgets.Composite comp)
comp - The parent Compositeprotected org.eclipse.jface.action.MenuManager createMenuManager()
createMenuManager in class org.eclipse.jface.window.ApplicationWindowprotected void createOptionsMenu(org.eclipse.jface.action.MenuManager optionsMenu)
optionsMenu - The options Menu´s MenuManagerprotected void createRightBarElements(org.eclipse.swt.widgets.Composite parent)
parent - The parent composite
protected java.io.File createTempFile(javax.sound.sampled.AudioFormat format)
throws java.io.IOException
format - The audio format of the file
java.io.IOException - If no temp file could be createdprotected void createWaveContentElements(org.eclipse.swt.widgets.Composite comp)
comp - The parent compositepublic void editAction(int type)
type - The type of edit action to performpublic void fileClosed(java.io.File f)
FileCloseListener
fileClosed in interface FileCloseListenerf - The file to be closedFileCloseListener.fileClosed(java.io.File)public void fileOpened(java.io.File f)
FileOpenListener
fileOpened in interface FileOpenListenerf - The file to be openedFileOpenListener.fileOpened(java.io.File)
public void fileSaved(java.io.File source,
java.io.File f)
fileSaved in interface FileSaveListenerFileSaveListener.fileSaved(java.io.File, java.io.File)protected java.io.File getActiveSource()
null, if no WaveTab is actually presentprotected WaveTab getActiveTab()
null, if no WaveTab
is actually presentprotected int getControlBarStyle()
public WaveTab getCopySource()
nullprotected org.eclipse.swt.graphics.Image getImage()
protected int getLeftBarStyle()
protected int getRightBarStyle()
protected int getSashFormStyle()
protected int[] getSashFormWeights()
protected int getTabFolderStyle()
protected WaveTab getTabForFile(java.io.File f)
f - The file to get the Wavetab for
null,
if no WaveTab was found for this fileprotected int getTabItemStyle()
protected java.lang.String getTitle()
protected int getTransportBarStyle()
protected int getWaveContentStyle()
protected AbstractWaveFormDisplay getWaveDisplay()
protected int getWaveStyle()
protected boolean isOpen(java.io.File f)
f - The file to check for
public void newFile()
FileNewListener
newFile in interface FileNewListenerFileNewListener.newFile()public int open()
open in class org.eclipse.jface.window.WindowWindow.open()public void removeCopySource()
public void saveAudioFile(java.io.File source,
java.io.File f,
javax.sound.sampled.AudioFileFormat.Type type,
javax.sound.sampled.AudioFormat format)
AudioFileSaveListener
saveAudioFile in interface AudioFileSaveListenersource - The file that should be saved.f - The file to save to.type - The audio file type to write.format - The audio format to write.AudioFileSaveListener.saveAudioFile(java.io.File, java.io.File, javax.sound.sampled.AudioFileFormat.Type, javax.sound.sampled.AudioFormat)protected boolean selectFileTab(java.io.File f)
f - The source file of the WaveTab to bring to the foreground
public void setCopySource(WaveTab wt)
wt - The WaveTab to set as copy sourceprotected void setShells(org.eclipse.swt.widgets.Shell s)
s - This Window´s Shellprotected void sourceFileChanged(java.io.File newSource)
newSource - The new active source fileprotected void tabActivated(WaveTab wt)
wt - The WaveTab that has been selected or null, if all
WaveTabs have been closedprotected void transportBack()
protected void transportBackSearch()
protected void transportFwd()
protected void transportFwdSearch()
protected void transportLoop()
protected void transportPause()
protected void transportPlay()
protected void transportRecord()
protected void transportStop()
public void viewChanged(AbstractWaveFormDisplay display,
double zoom,
double scroll)
WaveDisplayListener
viewChanged in interface WaveDisplayListenerdisplay - The WaveFormDisplay that was changedzoom - The new zoom factorscroll - The new scroll factorWaveDisplayListener.viewChanged(com.groovemanager.sampled.waveform.AbstractWaveFormDisplay, double, double)protected void zoomAll()
protected void zoomIn()
protected void zoomOut()
protected void zoomSelection()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||