public class EqualizerPanel extends JPanel
EqualizerModel. It displays the different categories of the model using
sliders which can be used to adjust the value of the respective category. Optionally, the range of the model can be
visualised right next to the slider group and a spline graph can be drawn to connect all the slider knobs of the
categories to visually indicate their togetherness.JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static Paint |
DEFAULT_PAINT
The default paint used for the spline, a pastel greenish tone.
|
static Stroke |
DEFAULT_STROKE
The default stroke used for the spline, a dashed line, 3 pixels wide.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
EqualizerPanel()
Creates a new EqualizerPanel object using:
a single category model
splinePaint=
DEFAULT_PAINT
splineStroke=DEFAULT_STROKE
splinePainted=true
rangeAxisName= null
rangeAxisPainted= true
updateModelWhileAdjusting= false
updateSplineWhileAdjusting= true
|
EqualizerPanel(EqualizerModel model)
Creates a new EqualizerPanel object from the provided
EqualizerModel using:
splinePaint=DEFAULT_PAINT
splineStroke=DEFAULT_STROKE
splinePainted=true
rangeAxisName= null
rangeAxisPainted= true
updateModelWhileAdjusting= false
updateSplineWhileAdjusting= true
|
EqualizerPanel(EqualizerModel model,
Paint splinePaint,
Stroke splineStroke,
boolean splinePainted,
String rangeAxisName,
boolean rangeAxisPainted,
boolean updateModelWhileAdjusting,
boolean updateSplineWhileAdjusting)
Creates a new EqualizerPanel object.
|
| Modifier and Type | Method and Description |
|---|---|
EqualizerModel |
getModel()
Getter for the current
EqualizerModel. |
String |
getRangeAxisName()
Getter for the current range axis name.
|
Paint |
getSplinePaint()
Getter for the current spline paint.
|
Stroke |
getSplineStroke()
Getter for the current spline stroke.
|
boolean |
isRangeAxisPainted()
Indicates if the range axis is painted or not.
|
boolean |
isSplinePainted()
Indicates if the spline is painted or not.
|
boolean |
isUpdateModelWhileAdjusting()
Whether or not the model is updated while the user is adjusting a slider value.
|
boolean |
isUpdateSplineWhileAdjusting()
Whether or not the spline curve will reflect the user's adjusting activity.
|
void |
setEnabled(boolean enabled) |
void |
setModel(EqualizerModel model)
Sets a new
EqualizerModel. |
void |
setRangeAxisName(String rangeAxisName)
Sets the new range axis name.
|
void |
setRangeAxisPainted(boolean rangeAxisPainted)
Sets if the range axis is painted or not.
|
void |
setSplinePaint(Paint splinePaint)
Sets the new spline paint.
|
void |
setSplinePainted(boolean splinePainted)
Sets if the spline is painted or not.
|
void |
setSplineStroke(Stroke splineStroke)
Sets the new spline stroke.
|
void |
setUpdateModelWhileAdjusting(boolean updateModelWhileAdjusting)
Through this setter one can control if user interaction with a slider will constantly update the model while the
user is still choosing the new slider value.
|
void |
setUpdateSplineWhileAdjusting(boolean updateSplineWhileAdjusting)
Through this setter one can control if the user interaction with a slider will constantly update the spline curve
while the user is still choosing the new slider value.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final Paint DEFAULT_PAINT
public static final Stroke DEFAULT_STROKE
public EqualizerPanel()
DEFAULT_PAINTDEFAULT_STROKEtruenulltruefalsetruepublic EqualizerPanel(EqualizerModel model)
EqualizerModel using:
DEFAULT_PAINTDEFAULT_STROKEtruenulltruefalsetruemodel - the underlying EqualizerModelEqualizerPanel(de.cismet.commons.gui.equalizer.EqualizerModel, java.awt.Paint, java.awt.Stroke, boolean,
java.lang.String, boolean, boolean, boolean)public EqualizerPanel(EqualizerModel model, Paint splinePaint, Stroke splineStroke, boolean splinePainted, String rangeAxisName, boolean rangeAxisPainted, boolean updateModelWhileAdjusting, boolean updateSplineWhileAdjusting)
model - the underlying EqualizerModelsplinePaint - the paint for the splinesplineStroke - the stroke for the splinesplinePainted - if the spline is painted at allrangeAxisName - the name of the range axisrangeAxisPainted - if the range axis is painted at allupdateModelWhileAdjusting - if updates are sent to the model while the user is adjusting the valueupdateSplineWhileAdjusting - if the spline is updated while the user is adjusting the valuepublic void setEnabled(boolean enabled)
setEnabled in class JComponentpublic EqualizerModel getModel()
EqualizerModel.EqualizerModelpublic final void setModel(EqualizerModel model)
EqualizerModel.model - the new modelIllegalArgumentException - if the model is nullpublic boolean isSplinePainted()
public void setSplinePainted(boolean splinePainted)
splinePainted - if the spline is painted or notpublic Paint getSplinePaint()
public final void setSplinePaint(Paint splinePaint)
splinePaint - the new spline paintIllegalArgumentException - if the spline paint is nullpublic Stroke getSplineStroke()
public final void setSplineStroke(Stroke splineStroke)
splineStroke - the new spline strokeIllegalArgumentException - if the spline stroke is nullpublic boolean isRangeAxisPainted()
public final void setRangeAxisPainted(boolean rangeAxisPainted)
rangeAxisPainted - paint the range axis of notpublic String getRangeAxisName()
public final void setRangeAxisName(String rangeAxisName)
rangeAxisName - the new range axis namepublic boolean isUpdateModelWhileAdjusting()
JSlider.getValueIsAdjusting()public void setUpdateModelWhileAdjusting(boolean updateModelWhileAdjusting)
updateModelWhileAdjusting - whether or not update the model while adjustingJSlider.getValueIsAdjusting()public boolean isUpdateSplineWhileAdjusting()
public void setUpdateSplineWhileAdjusting(boolean updateSplineWhileAdjusting)
updateSplineWhileAdjusting - whether or not update the spline curve while adjustingCopyright © 2012–2026 cismet GmbH. All rights reserved.