Package org.jjazz.ss_editor.rpviewer.api
Class MeterRpRenderer
java.lang.Object
org.jjazz.ss_editor.rpviewer.api.MeterRpRenderer
- All Implemented Interfaces:
RpViewerRenderer
Display the value as a vertical meter with max 10 leds of 3 colors.
Accept only RP_Enumerables instances. Sensitive to zoomVFactor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
A change event is fired when this RpRenderer configuration has changed for some reason (e.g. user has changed some settings).void
Preferred size depends on STD_SIZE and getZoomVFactor() for height.The target RpViewer for which we perform the rendering.getSong()
The Song context.The SongPart context.void
Render the RpViewer.void
void
setRpViewer
(RpViewer rpViewer) Set the target RpViewer for which we perform the rendering.
-
Constructor Details
-
MeterRpRenderer
-
-
Method Details
-
getSongPart
Description copied from interface:RpViewerRenderer
The SongPart context.- Specified by:
getSongPart
in interfaceRpViewerRenderer
- Returns:
- Might be null.
-
getSong
Description copied from interface:RpViewerRenderer
The Song context.- Specified by:
getSong
in interfaceRpViewerRenderer
- Returns:
- Might be null.
-
setRpViewer
Description copied from interface:RpViewerRenderer
Set the target RpViewer for which we perform the rendering.- Specified by:
setRpViewer
in interfaceRpViewerRenderer
-
getRpViewer
Description copied from interface:RpViewerRenderer
The target RpViewer for which we perform the rendering.- Specified by:
getRpViewer
in interfaceRpViewerRenderer
- Returns:
-
getPreferredSize
Preferred size depends on STD_SIZE and getZoomVFactor() for height.If vFactor = 50% = add EXTRA_HEIGHT_ZOOM_50 points to STD_SIZE height
If vFactor = 0% = use the STD_SIZE height
If vFactor = 100% = add 2*EXTRA_HEIGHT_ZOOM_50 points to STD_SIZE height- Specified by:
getPreferredSize
in interfaceRpViewerRenderer
- Returns:
-
paintComponent
Description copied from interface:RpViewerRenderer
Render the RpViewer.- Specified by:
paintComponent
in interfaceRpViewerRenderer
-
fireChanged
public void fireChanged() -
addChangeListener
Description copied from interface:RpViewerRenderer
A change event is fired when this RpRenderer configuration has changed for some reason (e.g. user has changed some settings).A change event means the preferredSize() and/or the paintComponent() behavior might have changed.
- Specified by:
addChangeListener
in interfaceRpViewerRenderer
-
removeChangeListener
- Specified by:
removeChangeListener
in interfaceRpViewerRenderer
-