Class ColorComponent
- java.lang.Object
-
- com._1c.g5.aef2.components.Component<M,P>
-
- com._1c.g5.aef2.standard.components.StandardComponent<M,P>
-
- com._1c.g5.aef2.standard.components.AbstractControlComponent<M,P,VM>
-
- com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent<M,P,ActionBarViewModel>
-
- com._1c.g5.v8.dt.ui.aef.component.AbstractDtActionBarComponent<M,P>
-
- com._1c.g5.v8.dt.ui.aef.component.AbstractDtReadonlyActionBarComponent<M,P>
-
- com._1c.g5.v8.dt.ui.aef.component.AbstractDtColorActionBarComponent<IColorModel,IColorComponentParameterization>
-
- com._1c.g5.v8.dt.md.ui.aef.components.ColorComponent
-
- All Implemented Interfaces:
IComponent<IColorModel>
,IEventChannel
public class ColorComponent extends AbstractDtColorActionBarComponent<IColorModel,IColorComponentParameterization>
Color component for processing model ofColor
type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
CLEAR_BUTTON_COMMAND_ID, DEFAULT_CONTEXT, OPEN_BUTTON_COMMAND_ID, SELECT_BUTTON_COMMAND_ID
-
-
Constructor Summary
Constructors Constructor Description ColorComponent(IColorComponentParameterization parameterization)
Creates a new color component.ColorComponent(IDtActionBarParameterization parameterization)
Creates a new color component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<ButtonItemViewModel>
createButtons()
Creates a collection of theButtonItemViewModel
that will be added to the component view model.protected void
disposeViewModels()
Disposes the view models of this component.protected void
handleButtonClicked(IViewModel viewModel)
Handles the button clicked event.protected org.eclipse.swt.graphics.RGB
transformModelToRgb(IColorModel model)
Transforms the given model object to RGB color representation.protected String
transformModelToString(IColorModel model)
Transforms the given model object to string representation.-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtColorActionBarComponent
bindModelToViewModel, createControlViewModel, updateViewModel
-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtReadonlyActionBarComponent
createViewModels, updateViewModels
-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
createButtonItem, createClearButtonItem, createOpenButtonItem, createSelectButtonItem, dispose
-
Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData
-
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatus
-
Methods inherited from class com._1c.g5.aef2.components.Component
addComponent, addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, attachToModel, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, detachFromModel, disposeComponents, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
-
-
-
Constructor Detail
-
ColorComponent
public ColorComponent(IColorComponentParameterization parameterization)
Creates a new color component.- Parameters:
parameterization
- the parameterization.
-
ColorComponent
public ColorComponent(IDtActionBarParameterization parameterization)
Creates a new color component. Internally newColorComponentParameterization
instance will be created with givenIDtActionBarParameterization
instance as base, and color reset allowed flag set totrue
. This instance will be used as parameterization.- Parameters:
parameterization
- the parameterization.
-
-
Method Detail
-
handleButtonClicked
protected void handleButtonClicked(IViewModel viewModel)
Description copied from class:AbstractDtSelectComponent
Handles the button clicked event.- Overrides:
handleButtonClicked
in classAbstractDtSelectComponent<IColorModel,IColorComponentParameterization,ActionBarViewModel>
- Parameters:
viewModel
- the view model of the event sender.
-
disposeViewModels
protected void disposeViewModels()
Description copied from class:Component
Disposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModels
in classAbstractDtColorActionBarComponent<IColorModel,IColorComponentParameterization>
-
createButtons
protected Collection<ButtonItemViewModel> createButtons()
Description copied from class:AbstractDtSelectComponent
Creates a collection of theButtonItemViewModel
that will be added to the component view model.- Overrides:
createButtons
in classAbstractDtSelectComponent<IColorModel,IColorComponentParameterization,ActionBarViewModel>
- Returns:
- the collection of the
ButtonItemViewModel
.
-
transformModelToString
protected String transformModelToString(IColorModel model)
Description copied from class:AbstractDtReadonlyActionBarComponent
Transforms the given model object to string representation.- Specified by:
transformModelToString
in classAbstractDtReadonlyActionBarComponent<IColorModel,IColorComponentParameterization>
- Parameters:
model
- the model.- Returns:
- string representation of the model values.
-
transformModelToRgb
protected org.eclipse.swt.graphics.RGB transformModelToRgb(IColorModel model)
Description copied from class:AbstractDtColorActionBarComponent
Transforms the given model object to RGB color representation.- Specified by:
transformModelToRgb
in classAbstractDtColorActionBarComponent<IColorModel,IColorComponentParameterization>
- Parameters:
model
- the model.- Returns:
- RGB color representation of the model values.
-
-