public abstract class AbstractPropertyAdapter extends java.lang.Object implements PropertyAdapter, Adapter.ValueHolder
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractPropertyAdapter.EdtUpdateValue |
PropertyAdapter.PAType
Adapter.ValueHolder
Modifier and Type | Field and Description |
---|---|
protected VisionClientContext |
appContext |
protected boolean |
isTargetPropertyDynamic |
protected LoggerEx |
log |
protected boolean |
overlayOptOut
Overlay opt out notifies the adapter that this binding's quality shouldn't affect the overlay system
|
protected java.awt.Component |
target |
protected java.lang.String |
targetPropertyName |
protected QualifiedValue |
value |
protected java.lang.Class |
valueClass |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPropertyAdapter() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canUpdate()
checks to make sure we don't try to assign null to a primitive
|
void |
connect(VisionClientContext appContext)
Calls connect() on all interaction descriptors
|
void |
disconnect()
Calls disconnect() on all interaction descriptors
|
QualifiedValue |
getQValue() |
java.awt.Component |
getTarget()
The target component is the component that this adapter serves.
|
protected java.lang.String |
getTargetDesc() |
java.lang.String |
getTargetFullPath()
Returns the full path to the target component
|
java.lang.String |
getTargetPropertyName() |
java.lang.Class |
getValueClass() |
protected void |
handleError(java.lang.Exception ex,
QualityCode quality) |
protected void |
handleNullToPrimitive() |
protected LoggerEx |
initLogger() |
protected boolean |
isDataUsed(QualifiedValue qv)
Returns whether or not the data portion of the qualified value should be used, or whether only the quality
portion should be used instead.
|
static boolean |
isDataUsed(QualifiedValue qv,
java.lang.Class<?> targetType)
Returns whether or not the data portion of the qualified value should be used, or whether only the quality
portion should be used instead.
|
boolean |
isOverlayOptOut() |
boolean |
isTargetPropertyDynamic() |
boolean |
isValid()
Returns true if the target isn't null and the target has a parent.
|
protected boolean |
isValueClassPrimitive() |
void |
setOverlayOptOut(boolean overlayOptOut) |
void |
setQValue(QualifiedValue qualifiedValue)
Sets this adapter's value.
|
void |
setSetterMethodName(java.lang.String string)
Deprecated.
|
void |
setTarget(java.awt.Component component) |
void |
setTargetPropertyDynamic(boolean b) |
void |
setTargetPropertyName(java.lang.String string) |
void |
setValue(java.lang.Object value)
Deprecated.
Use setQValue() instead. Kept for serialization.
|
void |
setValueClass(java.lang.Class class1) |
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.
|
java.lang.String |
toString() |
protected void |
updateQuality(QualityCode quality) |
protected void |
updateTarget()
Sets the target property to the value.
|
protected void |
updateValue(QualifiedValue qv)
Sets the property adapter value to the given QualifiedValue, and updates the data quality,
then calls updateTarget().
|
protected boolean |
useQuality()
Called to determine whether or not to push qualities to the target.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getReferenceType
getInteractions
protected java.awt.Component target
protected java.lang.String targetPropertyName
protected QualifiedValue value
protected java.lang.Class valueClass
protected boolean isTargetPropertyDynamic
protected boolean overlayOptOut
protected VisionClientContext appContext
protected LoggerEx log
public static boolean isDataUsed(QualifiedValue qv, java.lang.Class<?> targetType)
protected boolean isDataUsed(QualifiedValue qv)
protected LoggerEx initLogger()
public void startup()
Adapter
public void shutdown()
Adapter
public void disconnect()
disconnect
in interface Adapter
public void connect(VisionClientContext appContext)
protected java.lang.String getTargetDesc()
public boolean isValid()
public java.lang.String getTargetFullPath()
public java.awt.Component getTarget()
Adapter
public void setTarget(java.awt.Component component)
public java.lang.String getTargetPropertyName()
getTargetPropertyName
in interface PropertyAdapter
public void setTargetPropertyName(java.lang.String string)
setTargetPropertyName
in interface PropertyAdapter
@Deprecated public void setSetterMethodName(java.lang.String string)
public QualifiedValue getQValue()
getQValue
in interface Adapter.ValueHolder
@Deprecated public void setValue(java.lang.Object value)
public void setQValue(QualifiedValue qualifiedValue)
setQValue
in interface Adapter.ValueHolder
protected void updateQuality(QualityCode quality)
protected boolean useQuality()
return !isOverlayOptOut() && target instanceof QualityMonitor;
If overridden, make sure that you AND-in super().
protected void updateValue(QualifiedValue qv)
This function is Non-EDT safe. It will re-call itself on the EDT if not called on EDT.
protected boolean canUpdate()
protected void updateTarget()
protected void handleNullToPrimitive()
protected void handleError(java.lang.Exception ex, QualityCode quality)
protected boolean isValueClassPrimitive()
public java.lang.Class getValueClass()
public void setValueClass(java.lang.Class class1)
public boolean isTargetPropertyDynamic()
public void setTargetPropertyDynamic(boolean b)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isOverlayOptOut()
public void setOverlayOptOut(boolean overlayOptOut)