Package ca.corbett.extras.audio
Class WaveformConfigField
java.lang.Object
ca.corbett.forms.fields.FormField
ca.corbett.extras.audio.WaveformConfigField
A ConfigPanel instance that allows viewing and editing settings for a WaveformConfig object.
- Since:
- 2018-01-25
- Author:
- scorbo2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
Fields inherited from class ca.corbett.forms.fields.FormField
DEFAULT_FONT, defaultFont, extraAttributes, fieldComponent, fieldLabel, fieldValidators, helpLabel, identifier, isEnabled, isVisible, margins, validationLabel, valueChangedListeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the text that is either showing in the field label OR in the field's title border, depending on the value of useTitleBorder.intbooleanThis field itself typically will not show a validation label, as we delegate field validation to our embedded form fields.booleanbooleanbooleanBy default, FormFields occupy a single "line", or row, on the form.booleansetBaselineColor(Color col) setBaselineWidth(int width) setBgColor(Color col) setCompression(WaveformConfigField.Compression compression) setEnableDrawBaseline(boolean enable) setEnableDrawOutline(boolean enable) setFieldLabelText(String text) setOutlineColor(Color col) setOutlineWidth(int width) setShouldExpand(boolean should) setUseTitleBorder(boolean use) Decides whether to use a titled border around this field component (the default), or to use a traditional FormField field label instead.setWaveformColor(Color col) booleanBy default, FormPanel will allocate only the space that the field component requires.booleanvalidate()Asks all registered FieldValidators (if any) to check the current value of this field to make sure it's valid.Methods inherited from class ca.corbett.forms.fields.FormField
addAllExtraAttributes, addFieldValidator, addValueChangedListener, clearExtraAttribute, clearExtraAttributes, clearValidationResults, equals, fireValueChangedEvent, getDefaultFont, getExtraAttribute, getFieldComponent, getFieldLabel, getHelpLabel, getHelpText, getIdentifier, getMargins, getValidationLabel, hasFieldLabel, hashCode, hasHelpLabel, isEnabled, isValid, isVisible, preRender, removeAllFieldValidators, removeFieldValidator, removeValueChangedListener, setAllExtraAttributes, setDefaultFont, setEnabled, setExtraAttribute, setFieldLabelFont, setHelpText, setIdentifier, setMargins, setVisible
-
Constructor Details
-
WaveformConfigField
-
-
Method Details
-
isMultiLine
public boolean isMultiLine()Description copied from class:FormFieldBy default, FormFields occupy a single "line", or row, on the form. However, some FormFields may have a field component that spans multiple lines, like a multi-line text box, or a list, or a custom panel. Descendant classes can override the default false value here. It controls the placement of the field label. For tall form fields, the field label will be anchored to the top-left of its area.- Overrides:
isMultiLinein classFormField
-
setShouldExpand
-
shouldExpand
public boolean shouldExpand()Description copied from class:FormFieldBy default, FormPanel will allocate only the space that the field component requires. Descendant classes can override the default false value here to indicate that their field component should be allowed to expand as much space as is available to it. For example: PanelField.- Overrides:
shouldExpandin classFormField
-
hasValidationLabel
public boolean hasValidationLabel()This field itself typically will not show a validation label, as we delegate field validation to our embedded form fields. But, in keeping with the swing-forms general contract, you can still assign FieldValidators to instances of this field if you wish.- Overrides:
hasValidationLabelin classFormField
-
validate
public boolean validate()Description copied from class:FormFieldAsks all registered FieldValidators (if any) to check the current value of this field to make sure it's valid. If no FieldValidators are registered, then the field is valid by default (i.e. no checking is done). If any validator returns false, then this method will return false.Updating the UI: this method will make the validation label to the right of the FormField visible automatically and will set its icon as appropriate. Tooltip text will be available in the case of a failed validation, to explain why the field is invalid.
-
setUseTitleBorder
Decides whether to use a titled border around this field component (the default), or to use a traditional FormField field label instead. -
isUseTitleBorder
public boolean isUseTitleBorder() -
getFieldLabelText
Returns the text that is either showing in the field label OR in the field's title border, depending on the value of useTitleBorder. -
setFieldLabelText
-
setBgColor
-
getBgColor
-
setWaveformColor
-
getWaveformColor
-
setOutlineColor
-
getOutlineColor
-
setBaselineColor
-
getBaselineColor
-
setBaselineWidth
-
getBaselineWidth
public int getBaselineWidth() -
setOutlineWidth
-
getOutlineWidth
public int getOutlineWidth() -
setEnableDrawBaseline
-
isEnableDrawBaseline
public boolean isEnableDrawBaseline() -
setEnableDrawOutline
-
isEnableDrawOutline
public boolean isEnableDrawOutline() -
setCompression
-
getCompression
-
setWidthLimit
-
getWidthLimit
-