Class SimpleBoundColorAdapter
java.lang.Object
com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter
com.inductiveautomation.factorypmi.application.binding.SimpleBoundColorAdapter
- All Implemented Interfaces:
Adapter
,Adapter.ValueHolder
,SearchablePropertyAdapter
,PropertyAdapter
,Blinker
,PropertyChangeListener
,EventListener
public class SimpleBoundColorAdapter
extends AbstractPropertyAdapter
implements PropertyChangeListener, Blinker, SearchablePropertyAdapter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated.THIS CLASS IS DEPRECATED.static class
Deprecated.THIS CLASS IS DEPRECATED.Nested classes/interfaces inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter
AbstractPropertyAdapter.EdtUpdateValue
Nested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.Adapter
Adapter.ValueHolder
Nested classes/interfaces inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdapter
PropertyAdapter.PAType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter
appContext, isTargetPropertyDynamic, log, overlayOptOut, target, targetPropertyName, value, valueClass
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(VisionClientContext appContext) Calls connect() on all interaction descriptorsvoid
doBlink()
Implementation of Blinker interface.Retrieves an array of the interactions that this adapter depends on.int
getMode()
void
Listens to the property that we are bound to (source property) Calls setValue() with the new value.void
setCurrentState
(ColorState state) void
setInteraction
(PropertyInteractionDescriptor descriptor) void
setMode
(int i) void
setQValue
(QualifiedValue newValue) Overridden to provide translation logic.void
void
shutdown()
Notifies the adapter that it is becoming inactive, and should cease any polling/threaded activities.void
startup()
Notifies the adapter that it is becoming active, and should start any polling/threaded activities.Methods inherited from class com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter
disconnect, getQValue, getTarget, getTargetDesc, getTargetFullPath, getTargetPropertyName, getValueClass, handleError, handleNullToPrimitive, initLogger, isDataUsed, isDataUsed, isOverlayOptOut, isTargetPropertyDynamic, isValid, isValueClassPrimitive, setOverlayOptOut, setSetterMethodName, setTarget, setTargetPropertyDynamic, setTargetPropertyName, setValue, setValueClass, toString, updateQuality, updateTarget, updateValue, useQuality
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.factorypmi.application.binding.Adapter
disconnect, getTarget, isValid, setTarget
Methods inherited from interface com.inductiveautomation.factorypmi.application.binding.PropertyAdapter
getTargetPropertyName, setTargetPropertyName
-
Field Details
-
DIRECT_MODE
public static final int DIRECT_MODE- See Also:
-
NUMBER_TRANSLATION_MODE
public static final int NUMBER_TRANSLATION_MODE- See Also:
-
STRING_MODE
public static final int STRING_MODE- See Also:
-
-
Constructor Details
-
SimpleBoundColorAdapter
public SimpleBoundColorAdapter()
-
-
Method Details
-
getReferenceType
- Specified by:
getReferenceType
in interfacePropertyAdapter
-
getBindingConfiguration
- Specified by:
getBindingConfiguration
in interfaceSearchablePropertyAdapter
-
connect
Description copied from class:AbstractPropertyAdapter
Calls connect() on all interaction descriptors- Specified by:
connect
in interfaceAdapter
- Overrides:
connect
in classAbstractPropertyAdapter
-
startup
public void startup()Description copied from interface:Adapter
Notifies the adapter that it is becoming active, and should start any polling/threaded activities.- Specified by:
startup
in interfaceAdapter
- Overrides:
startup
in classAbstractPropertyAdapter
-
shutdown
public void shutdown()Description copied from interface:Adapter
Notifies the adapter that it is becoming inactive, and should cease any polling/threaded activities.- Specified by:
shutdown
in interfaceAdapter
- Overrides:
shutdown
in classAbstractPropertyAdapter
-
getInteractions
Description copied from interface:Adapter
Retrieves an array of the interactions that this adapter depends on. An interaction descriptor describes an inter-component interaction.- Specified by:
getInteractions
in interfaceAdapter
-
doBlink
public void doBlink()Implementation of Blinker interface. Called by the BlinkTimer's TimerTask (on the GUI thread). -
setQValue
Overridden to provide translation logic. Intercepts setValues coming from property changes of source proprety, translates the value to color- Specified by:
setQValue
in interfaceAdapter.ValueHolder
- Overrides:
setQValue
in classAbstractPropertyAdapter
-
propertyChange
Listens to the property that we are bound to (source property) Calls setValue() with the new value. All value-to-color translation logic is in our setValue() method.- Specified by:
propertyChange
in interfacePropertyChangeListener
-
getInteraction
-
setInteraction
-
getMode
public int getMode() -
setMode
public void setMode(int i) -
getTranslationTable
-
setTranslationTable
-
getCurrentState
-
setCurrentState
-