Class CSSGridTracksPropEditor
- All Implemented Interfaces:
IThemeListener, IEditedPropControllerOwner<StringProp, String>, IEditedPropertyEntry<StringProp, String>, IEditedPropertyEntryMultiProp<StringProp, String>, IPropertyDefined, IDisposedPart
The property editor of a CSS Grid track list: the columns or rows of a CSS Grid layout (
grid-template-columns/-rows), or, with the option AUTO=true, the size of its implicit tracks (grid-auto-columns/-rows).The text is checked by the same parser as the runtime property (CSSGridTracks): an invalid list is refused with the parser's message and its position, a valid one is stored in its canonical form. The "more" button opens CSSGridTracksDialog, an editor over the parsed list of tracks.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class BaseEditor
appUI, combo, control, controller, definedButton, display, editor, focusListener, hasBeenModified, info, more, multipleValueWarningInput, options, parent, propController, shell, text, validator, wasDefinedAtFocusGainedConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionprotected voidcreate()Creates the property editor controls.formatValue(String value) Formats the value for user input as a String.Gets the default defined value to set in the property when defined.protected StringGets the tooltip text to display in the entry fields (not the one for property errors or validator).protected StringGets the property value for a user input.voidonMore()Called when the "more..." button is pressed: opens the track dialog.Methods inherited from class BaseEditor
assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doUndefineIfEmpty, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isDisposed, isPropReadOnly, onDefine, onDispose, onDoubleClick, onError, onF4List, onFocusGained, onFocusLost, onReadOnly, onThemeChanged, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, setToolTipText, showMenu, updateTooltip, validate
Constructor Details
CSSGridTracksPropEditor
public CSSGridTracksPropEditor()Default constructor called before createControls.
Method Details
create
protected void create()Creates the property editor controls.- Specified by:
createin classBaseEditor<StringProp, String>
onMore
public void onMore()Called when the "more..." button is pressed: opens the track dialog.- Overrides:
onMorein classBaseEditor<StringProp, String>
getToolTipText
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
getToolTipTextin classBaseEditor<StringProp, String>
getDefaultValue
Gets the default defined value to set in the property when defined.- Specified by:
getDefaultValuein interfaceIEditedPropControllerOwner<StringProp, String>- Specified by:
getDefaultValuein classBaseEditor<StringProp, String>
getValue
Gets the property value for a user input.- Specified by:
getValuein classBaseEditor<StringProp, String>- Parameters:
input- The current user input.- Returns:
- The canonical track list, or null to un-define the property.
- Throws:
Exception- For validation errors, with the parser's message.
formatValue
Formats the value for user input as a String.- Specified by:
formatValuein interfaceIEditedPropControllerOwner<StringProp, String>- Specified by:
formatValuein classBaseEditor<StringProp, String>- Parameters:
value- The value.- Returns:
- The formatted value.