public abstract class UIParameterControl extends UIInputBox implements UIControlTarget, UIModulationTarget, UIModulationSource, LXParameterListener, UICopy, UIPaste
UIInputBox.FillStyle, UIInputBox.ProgressIndicatorUIContextActions.Action| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
enabled  | 
protected boolean | 
keyEditable  | 
protected static int | 
LABEL_HEIGHT  | 
protected static int | 
LABEL_MARGIN  | 
protected LXNormalizedParameter | 
parameter  | 
protected LXParameter.Polarity | 
polarity  | 
static int | 
TEXT_MARGIN  | 
editable, editBuffer, editing, fillColor, fillStyle, hasFill, progressFillStyle, returnKeyEditDEFAULT_HEIGHT, useCommandEnginebottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, ychildren, hasFocus, mousePressContextMenu, visible| Modifier | Constructor and Description | 
|---|---|
protected  | 
UIParameterControl(float x,
                  float y,
                  float w,
                  float h)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
decrementValue(KeyEvent keyEvent)
Subclasses may optionally override to decrement value in response to arrows. 
 | 
LXParameter | 
getControlTarget()  | 
String | 
getDescription()
Objects are encouraged to override this method providing a helpful String displayed to the user explaining
 the function of this UI component. 
 | 
static String | 
getDescription(LXParameter parameter)  | 
protected int | 
getFocusColor(UI ui)  | 
int | 
getModulatedValueColor(int baseColor)
Given a base color for a control, return the color used to display the modulated component of its value. 
 | 
LXNormalizedParameter | 
getModulationSource()  | 
CompoundParameter | 
getModulationTarget()  | 
protected double | 
getNormalized()  | 
LXNormalizedParameter | 
getParameter()  | 
protected String | 
getValueString()  | 
protected void | 
incrementValue(KeyEvent keyEvent)
Subclasses may optionally override to decrement value in response to arrows. 
 | 
boolean | 
isEnabled()  | 
protected boolean | 
isValidCharacter(char keyChar)  | 
protected void | 
onBlur()
Subclasses override when element loses focus 
 | 
LXClipboardItem | 
onCopy()  | 
protected void | 
onDraw(UI ui,
      PGraphics pg)
Subclasses should override this method to perform their drawing functions. 
 | 
protected void | 
onKeyPressed(KeyEvent keyEvent,
            char keyChar,
            int keyCode)
Subclasses override to receive key events 
 | 
protected void | 
onKeyReleased(KeyEvent keyEvent,
             char keyChar,
             int keyCode)
Subclasses override to receive key events 
 | 
protected void | 
onMousePressed(MouseEvent mouseEvent,
              float mx,
              float my)
Subclasses override to receive mouse events 
 | 
protected void | 
onMouseReleased(MouseEvent mouseEvent,
               float mx,
               float my)
Subclasses override to receive mouse events 
 | 
void | 
onParameterChanged(LXParameter parameter)
Invoked when the value of a parameter is changed. 
 | 
void | 
onPaste(LXClipboardItem item)  | 
protected void | 
saveEditBuffer()  | 
UIInputBox | 
setEditable(boolean editable)  | 
UIParameterControl | 
setEnabled(boolean enabled)  | 
UIParameterControl | 
setLabel(String label)  | 
protected UIParameterControl | 
setNormalized(double normalized)  | 
UIParameterControl | 
setParameter(LXNormalizedParameter parameter)  | 
UIParameterControl | 
setPolarity(LXParameter.Polarity polarity)  | 
UIParameterControl | 
setShowLabel(boolean showLabel)  | 
edit, enableImmediateEdit, enableMousePressEdit, enableReturnKeyEdit, getEditBufferValue, getFillWidthNormalized, incrementMouseValue, isEditable, onMouseDragged, setProgressColor, setProgressColor, setProgressFillStyle, setProgressIndicator, setValueCommandgetContextActions, getOscAddress, setNormalizedCommand, setUseCommandEngineaddToContainer, addToContainer, breakTextToWidth, clipTextToWidth, contains, drawBackground, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, getBackgroundColor, getBorderColor, getBorderRounding, getBorderWeight, getContainer, getFocusSize, getFont, getFontColor, getHeight, getNextSibling, getParent, getPrevSibling, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, onResize, redraw, removeFromContainer, setBackground, setBackgroundColor, setBorder, setBorderColor, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setYaddLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onFocus, onUIResize, removeLoopTask, toggleVisibleonKeyTyped, onMouseClicked, onMouseMoved, onMouseOut, onMouseOver, onMouseWheelprotected static final int LABEL_MARGIN
protected static final int LABEL_HEIGHT
public static final int TEXT_MARGIN
protected LXNormalizedParameter parameter
protected LXParameter.Polarity polarity
protected boolean enabled
protected boolean keyEditable
protected UIParameterControl(float x,
                             float y,
                             float w,
                             float h)
public UIParameterControl setEnabled(boolean enabled)
setEnabled in class UIInputBoxpublic static String getDescription(LXParameter parameter)
public String getDescription()
UIObjectgetDescription in class UIObjectpublic boolean isEnabled()
isEnabled in class UIInputBoxpublic UIInputBox setEditable(boolean editable)
setEditable in class UIInputBoxpublic UIParameterControl setShowLabel(boolean showLabel)
public UIParameterControl setLabel(String label)
protected int getFocusColor(UI ui)
getFocusColor in class UI2dComponentpublic void onParameterChanged(LXParameter parameter)
LXParameterListeneronParameterChanged in interface LXParameterListenerparameter - The parameter that has changed its valueprotected double getNormalized()
protected UIParameterControl setNormalized(double normalized)
public LXNormalizedParameter getParameter()
getParameter in class UIParameterComponentpublic UIParameterControl setPolarity(LXParameter.Polarity polarity)
public UIParameterControl setParameter(LXNormalizedParameter parameter)
protected String getValueString()
getValueString in class UIInputBoxprotected boolean isValidCharacter(char keyChar)
isValidCharacter in class UIInputBoxprotected void saveEditBuffer()
saveEditBuffer in class UIInputBoxprotected void onDraw(UI ui, PGraphics pg)
UIObjectonDraw in class UIInputBoxui - UI contextpg - Graphics contextprotected void decrementValue(KeyEvent keyEvent)
decrementValue in class UIInputBoxkeyEvent - Key event in response toprotected void incrementValue(KeyEvent keyEvent)
incrementValue in class UIInputBoxkeyEvent - Key event in response toprotected void onKeyPressed(KeyEvent keyEvent, char keyChar, int keyCode)
UIEventHandleronKeyPressed in class UIInputBoxkeyEvent - Key eventkeyChar - Key characterkeyCode - Key code valueprotected void onKeyReleased(KeyEvent keyEvent, char keyChar, int keyCode)
UIEventHandleronKeyReleased in class UIEventHandlerkeyEvent - Key eventkeyChar - Key characterkeyCode - Key code valueprotected void onMousePressed(MouseEvent mouseEvent, float mx, float my)
UIEventHandleronMousePressed in class UIInputBoxmouseEvent - Mouse eventmx - x-coordinatemy - y-coordinateprotected void onMouseReleased(MouseEvent mouseEvent, float mx, float my)
UIEventHandleronMouseReleased in class UIInputBoxmouseEvent - Mouse eventmx - x-coordinatemy - y-coordinateprotected void onBlur()
UIObjectonBlur in class UIInputBoxpublic LXParameter getControlTarget()
getControlTarget in interface UIControlTargetpublic LXNormalizedParameter getModulationSource()
getModulationSource in interface UIModulationSourcepublic CompoundParameter getModulationTarget()
getModulationTarget in interface UIModulationTargetpublic int getModulatedValueColor(int baseColor)
baseColor - Base color to determine modulated color frompublic LXClipboardItem onCopy()
public void onPaste(LXClipboardItem item)
LX library by Mark C. Slee. © 2012-2020