|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.sampled.waveform.AbstractWaveFormDisplay
com.groovemanager.sampled.waveform.SelectableWaveFormDisplay
com.groovemanager.sampled.waveform.MarkableWaveFormDisplay
com.groovemanager.gui.custom.WaveFormDisplay
This class is an implementation of the abstract MarkableWaveFormDisplay using SWT
| Field Summary | |
|---|---|
protected org.eclipse.swt.graphics.GC |
backgroundGC
Different Graphic Context Objects used for different drawing operations |
protected org.eclipse.swt.graphics.GC |
channelBgGC
Different Graphic Context Objects used for different drawing operations |
protected org.eclipse.swt.graphics.GC |
channelFgGC
Different Graphic Context Objects used for different drawing operations |
protected org.eclipse.swt.widgets.Canvas |
comp
The main Composite |
protected org.eclipse.swt.graphics.Cursor |
deleteMarkerCursor
The default cursor |
protected java.util.HashMap |
drawedMarkers
Map of all drawed Markers as DrawedRectangle instances |
protected DrawedRectangle |
drawedPosition
DrawedRectangle for the drawed selection |
protected DrawedRectangle |
drawedSelection
DrawedRectangle for the drawed selection |
protected org.eclipse.swt.graphics.Cursor |
editMarkerCursor
The default cursor |
protected boolean |
gradient
If this variable is false, selection events coming from the scrollbar will be ignored |
protected org.eclipse.swt.graphics.Color |
markerColor
Color to use for not selected Markers |
protected org.eclipse.swt.graphics.GC |
markerGC
Different Graphic Context Objects used for different drawing operations |
protected org.eclipse.swt.graphics.Color |
markerHighlightColor
Color to use for not selected Markers |
protected org.eclipse.swt.graphics.Cursor |
moveMarkerCursor
The default cursor |
protected int |
moveStep
The number of sample frames to move a Marker with one arrow press |
protected org.eclipse.swt.graphics.Cursor |
normalCursor
The default cursor |
protected org.eclipse.swt.graphics.GC |
positionGC
Different Graphic Context Objects used for different drawing operations |
protected boolean |
reactToScrollBar
If this variable is false, selection events coming from the scrollbar will be ignored |
protected org.eclipse.swt.graphics.GC |
selectionGC
Different Graphic Context Objects used for different drawing operations |
protected org.eclipse.swt.graphics.GC |
waveGC
Different Graphic Context Objects used for different drawing operations |
| Fields inherited from class com.groovemanager.sampled.waveform.MarkableWaveFormDisplay |
|---|
editMarkers, markableListeners, markers, MOUSE_TOLERANCE, selectedMarker |
| Fields inherited from class com.groovemanager.sampled.waveform.SelectableWaveFormDisplay |
|---|
left, mouseDown, pos, right, selectableListeners, selStartedAt |
| Fields inherited from class com.groovemanager.sampled.waveform.AbstractWaveFormDisplay |
|---|
channelSpacing, leftOffset, listeners, scrollFactor, source, topOffset, zoomFactor |
| Constructor Summary | |
|---|---|
WaveFormDisplay(org.eclipse.swt.widgets.Composite parent,
boolean gradientBackground)
Construct a new WaveFormDisplay |
|
WaveFormDisplay(org.eclipse.swt.widgets.Composite parent,
int style,
boolean gradientBackground)
Construct a new WaveFormDisplay |
|
| Method Summary | |
|---|---|
void |
addMarker(Marker m)
Internal method for adding a Marker |
protected void |
addMouseListeners(org.eclipse.swt.widgets.Composite comp)
Add the needed MouseListeners to the given Composite |
protected void |
drawChannelBackground(int x,
int y,
int width,
int height)
Draw one channel´s background into the given area |
protected void |
drawChannelForeground(int x,
int y,
int width,
int height)
Draw the foreground elements of one channel into the given area |
protected void |
drawGlobalBackground(int x,
int y,
int width,
int height)
Draw the global background in the given area. |
protected void |
drawGlobalForeground(int x,
int y,
int width,
int height)
Draw the global foreground elements into the given area |
protected void |
drawHighlightedMarker(Marker m)
Draw the given Marker in selected state |
protected void |
drawMarker(Marker m)
Draw the given Marker on the WaveFormDisplay |
protected void |
drawPosition(int x,
int y,
int height)
Draw the position pointer at the given position |
protected void |
drawSelection(int x,
int y,
int width,
int height)
Draw the selection in the given area |
protected void |
drawWaveLine(int x,
int y,
int x2,
int y2)
Draw one line of the WaveForm, this is either a vertical connection from a maximum to a minmum or a connection from the average value of pixel x to the average value of pixel x + 1 |
protected void |
eraseHighlightedMarker(Marker m)
Erase the given Marker that has been drawn in selected state before |
protected void |
eraseMarker(Marker m)
Erase the given marker from the WaveformDisplay |
protected void |
erasePosition()
Hide the position pointer |
protected void |
eraseSelection()
Hide the current selection |
org.eclipse.swt.widgets.Composite |
getComposite()
Get the main Composite of this WaveFormDisplay |
protected int |
getDisplayHeight()
Get the total height available to this WaveDisplay |
protected int |
getDisplayWidth()
Get the total width available to this WaveDisplay |
protected void |
initColors()
Set the colors for the different drawing elements to default colors |
void |
redraw()
Redraw the current display |
protected void |
redrawSelection(int x,
int y,
int width,
int height)
Adapt the visible selection to the given area or - if it was not visible before - draw it to the given area. |
protected void |
removeMarker(Marker m)
Internal Method for removing a marker |
void |
setChannelBackgroundColor(org.eclipse.swt.graphics.Color c)
Set the background color used for each channel |
void |
setHighlightedMarkerColor(org.eclipse.swt.graphics.Color c)
Change the Color used for drawing highlighted markers |
void |
setMarkerColor(org.eclipse.swt.graphics.Color c)
Change the Color used for drawing markers |
void |
setMiddleLineColor(org.eclipse.swt.graphics.Color c)
Set the color of the middle line |
void |
setMoveStep(int newStep)
Set the number of sample frames a Marker should be moved, when an arrow key is pressed |
void |
setPositionColor(org.eclipse.swt.graphics.Color c)
Set the color used for drawing the position pointer |
void |
setSelectionColor(org.eclipse.swt.graphics.Color c)
Set the Color for drawing the selection |
void |
setWaveColor(org.eclipse.swt.graphics.Color c)
Set the color used for drawing the WaveForm itself |
| Methods inherited from class com.groovemanager.sampled.waveform.MarkableWaveFormDisplay |
|---|
addMarkableListener, addMarker, deselectMarker, getMarker, getMarkerCount, getMarkerFromMousePos, getMarkers, getSelectedMarker, identifyMarker, identifyMarker, identifyMarker, identifyMarkerIndex, mouseDown, mouseMove, mouseUp, moveMarker, moveMarker, moveMarker, moveMarker, moveMarkerIndex, redrawMarker, removeMarkableListener, removeMarker, removeMarker, removeMarker, removeMarkerIndex, selectMarker, selectMarker, selectMarker, selectMarker, selectMarkerIndex, setEditMarkers |
| Methods inherited from class com.groovemanager.sampled.waveform.SelectableWaveFormDisplay |
|---|
addSelectableListener, getPosition, getSelection, redrawPosition, removeSelectableListener, setPosition, setSelection, showSelection |
| Methods inherited from class com.groovemanager.sampled.waveform.AbstractWaveFormDisplay |
|---|
addWaveDisplayListener, calcY, dataToPixel, drawBackground, drawForeground, drawWave, getChannelHeight, getChannels, getChannelSpacing, getChannelTop, getFirstData, getLastData, getLeftOffset, getPixelFactor, getScroll, getSource, getTopOffset, getTotalLength, getUsableDisplayHeight, getUsableDisplayWidth, getVisibleWaveForm, getZoom, hasData, mouseToData, pixelToData, removeSource, removeWaveDisplayListener, scroll, scrollCenter, scrollLeft, scrollRight, setChannelSpacing, setLeftOffset, setSource, setTopOffset, showAll, showData, zoom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.eclipse.swt.graphics.GC backgroundGC
protected org.eclipse.swt.graphics.GC channelBgGC
protected org.eclipse.swt.graphics.GC channelFgGC
protected org.eclipse.swt.widgets.Canvas comp
protected org.eclipse.swt.graphics.Cursor deleteMarkerCursor
protected java.util.HashMap drawedMarkers
protected DrawedRectangle drawedPosition
protected DrawedRectangle drawedSelection
protected org.eclipse.swt.graphics.Cursor editMarkerCursor
protected boolean gradient
protected org.eclipse.swt.graphics.Color markerColor
protected org.eclipse.swt.graphics.GC markerGC
protected org.eclipse.swt.graphics.Color markerHighlightColor
protected org.eclipse.swt.graphics.Cursor moveMarkerCursor
protected int moveStep
protected org.eclipse.swt.graphics.Cursor normalCursor
protected org.eclipse.swt.graphics.GC positionGC
protected boolean reactToScrollBar
protected org.eclipse.swt.graphics.GC selectionGC
protected org.eclipse.swt.graphics.GC waveGC
| Constructor Detail |
|---|
public WaveFormDisplay(org.eclipse.swt.widgets.Composite parent,
boolean gradientBackground)
parent - The parent CompositegradientBackground - true, if a gradient background should be used,
false otherwise
public WaveFormDisplay(org.eclipse.swt.widgets.Composite parent,
int style,
boolean gradientBackground)
parent - The parent Compositestyle - Combination of SWT.* style constants for the main CompositegradientBackground - true, if a gradient background should be used,
false otherwise| Method Detail |
|---|
public void addMarker(Marker m)
MarkableWaveFormDisplay
addMarker in class MarkableWaveFormDisplaym - The Marker to addprotected void addMouseListeners(org.eclipse.swt.widgets.Composite comp)
comp - The main Composite
protected void drawChannelBackground(int x,
int y,
int width,
int height)
AbstractWaveFormDisplay
drawChannelBackground in class AbstractWaveFormDisplayx - The x-coordinate of the areay - The y-coordinate of the areawidth - The width of the areaheight - The height of the area
protected void drawChannelForeground(int x,
int y,
int width,
int height)
AbstractWaveFormDisplay
drawChannelForeground in class AbstractWaveFormDisplayx - The x-coordinate of the areay - The y-coordinate of the areawidth - The width of the areaheight - The height of the area
protected void drawGlobalBackground(int x,
int y,
int width,
int height)
AbstractWaveFormDisplay
drawGlobalBackground in class AbstractWaveFormDisplayx - The x-coordinate of the areay - The y-coordinate of the areawidth - The width of the areaheight - The height of the area
protected void drawGlobalForeground(int x,
int y,
int width,
int height)
AbstractWaveFormDisplay
drawGlobalForeground in class AbstractWaveFormDisplayx - The x-coordinate of the areay - The y-coordinate of the areawidth - The width of the areaheight - The height of the areaprotected void drawHighlightedMarker(Marker m)
MarkableWaveFormDisplay
drawHighlightedMarker in class MarkableWaveFormDisplaym - The Marker to drawprotected void drawMarker(Marker m)
MarkableWaveFormDisplay
drawMarker in class MarkableWaveFormDisplaym - The Marker to draw
protected void drawPosition(int x,
int y,
int height)
SelectableWaveFormDisplay
drawPosition in class SelectableWaveFormDisplayx - The x-coordinate of the position pointery - The y-coordinate of the position pointer´s topheight - The height of the position pointer
protected void drawSelection(int x,
int y,
int width,
int height)
SelectableWaveFormDisplay
drawSelection in class SelectableWaveFormDisplayx - The x-coordinate of the areay - The y-coordinate of the areawidth - The width of the areaheight - The height of the area
protected void drawWaveLine(int x,
int y,
int x2,
int y2)
AbstractWaveFormDisplay
drawWaveLine in class AbstractWaveFormDisplayx - The x-coordinate of the first pointy - The y-coordinate of the first pointx2 - The x-coordinate of the second pointy2 - The y-coordinate of the second pointprotected void eraseHighlightedMarker(Marker m)
MarkableWaveFormDisplay
eraseHighlightedMarker in class MarkableWaveFormDisplaym - The Marker to eraseprotected void eraseMarker(Marker m)
MarkableWaveFormDisplay
eraseMarker in class MarkableWaveFormDisplaym - The Marker to eraseprotected void erasePosition()
SelectableWaveFormDisplay
erasePosition in class SelectableWaveFormDisplayprotected void eraseSelection()
SelectableWaveFormDisplay
eraseSelection in class SelectableWaveFormDisplaypublic org.eclipse.swt.widgets.Composite getComposite()
protected int getDisplayHeight()
AbstractWaveFormDisplay
getDisplayHeight in class AbstractWaveFormDisplayprotected int getDisplayWidth()
AbstractWaveFormDisplay
getDisplayWidth in class AbstractWaveFormDisplayprotected void initColors()
public void redraw()
AbstractWaveFormDisplay
redraw in class AbstractWaveFormDisplay
protected void redrawSelection(int x,
int y,
int width,
int height)
SelectableWaveFormDisplay
redrawSelection in class SelectableWaveFormDisplayx - The x-coordinate of the areay - The y-coordinate of the areawidth - The width of the areaheight - The height of the areaprotected void removeMarker(Marker m)
MarkableWaveFormDisplay
removeMarker in class MarkableWaveFormDisplaym - The Marker to removepublic void setChannelBackgroundColor(org.eclipse.swt.graphics.Color c)
c - The new channel background colorpublic void setHighlightedMarkerColor(org.eclipse.swt.graphics.Color c)
c - The new Color to be used for drawing highlighted markerspublic void setMarkerColor(org.eclipse.swt.graphics.Color c)
c - The new Color to be used for drawing markerspublic void setMiddleLineColor(org.eclipse.swt.graphics.Color c)
c - The middle line´s colorpublic void setMoveStep(int newStep)
newStep - The number of sample frames to move a Marker with the
arrow keyspublic void setPositionColor(org.eclipse.swt.graphics.Color c)
c - The Color for the position pointerpublic void setSelectionColor(org.eclipse.swt.graphics.Color c)
c - The new selection Colorpublic void setWaveColor(org.eclipse.swt.graphics.Color c)
c - The waveform´s color
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||