public class Element extends FrameElement
Modifier and Type | Field and Description |
---|---|
private Accessor |
data
The source and/or sink of the widget's data.
|
private java.lang.String |
fmt
The value's associated format string or
null . |
private GenericWidget |
widget
The widget associated with this element.
|
Constructor and Description |
---|
Element(Accessor data,
GenericWidget widget)
Create an instance.
|
Element(Accessor data,
java.lang.String fmt,
GenericWidget widget)
Create an instance.
|
Element(BaseDataType data,
GenericWidget widget)
Create an instance.
|
Element(BaseDataType data,
java.lang.String fmt,
GenericWidget widget)
Create an instance.
|
Element(boolean data,
GenericWidget widget)
Create an instance.
|
Element(boolean data,
java.lang.String fmt,
GenericWidget widget)
Create an instance.
|
Element(double data,
GenericWidget widget)
Create an instance.
|
Element(double data,
java.lang.String fmt,
GenericWidget widget)
Create an instance.
|
Element(int data,
GenericWidget widget)
Create an instance.
|
Element(int data,
java.lang.String fmt,
GenericWidget widget)
Create an instance.
|
Element(java.lang.String data,
GenericWidget widget)
Create an instance.
|
Element(java.lang.String data,
java.lang.String fmt,
GenericWidget widget)
Create an instance.
|
Modifier and Type | Method and Description |
---|---|
BaseDataType |
get()
Get a copy of the referenced object's current runtime value (this does
not return the original instance itself).
|
Accessor |
getDataAccessor()
Returns the source and/or sink of the widget's data.
|
java.lang.String |
getFormat()
Accesses the format string associated with this frame element.
|
FormattedValue |
getFormattedValue()
Accesses the formatted value associated with this frame element.
|
GenericWidget |
getWidget()
Accesses the widget associated with this frame element.
|
boolean |
hasFormat()
Determines if the element stores a format string in addition to a data
value.
|
void |
set(BaseDataType val)
Set the referenced object's current runtime value to the given value.
|
assignOnly, bypass, getAccumulator, statsColumn, widgetOnly, wordWrap
private Accessor data
private GenericWidget widget
private java.lang.String fmt
null
.public Element(Accessor data, GenericWidget widget)
data
- The data to display/edit in the given widget. Must NOT be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(BaseDataType data, GenericWidget widget)
data
- The data to display/edit in the given widget. Must NOT be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(java.lang.String data, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget. Must NOT be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(int data, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(double data, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(boolean data, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(Accessor data, java.lang.String fmt, GenericWidget widget)
data
- The data to display/edit in the given widget. Must NOT be
null
.fmt
- The format string to associate with the data value. May be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(BaseDataType data, java.lang.String fmt, GenericWidget widget)
data
- The data to display/edit in the given widget. Must NOT be
null
.fmt
- The format string to associate with the data value. May be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(java.lang.String data, java.lang.String fmt, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget. Must NOT be
null
.fmt
- The format string to associate with the data value. May be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(int data, java.lang.String fmt, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget.fmt
- The format string to associate with the data value. May be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(double data, java.lang.String fmt, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget.fmt
- The format string to associate with the data value. May be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public Element(boolean data, java.lang.String fmt, GenericWidget widget)
WARNING: this form of the constructor allows primative (non-wrapper) types to be copied to the screen buffer BUT any assignment back to such widgets will silently fail since there is no backing wrapper instance in the calling code to which to assign.
data
- The data to display/edit in the given widget.fmt
- The format string to associate with the data value. May be
null
.widget
- The widget instance representing the exact frame field and
state of that field. Must NOT be null
.public boolean hasFormat()
hasFormat
in class FrameElement
true
if there is a format string encoded in this
instance, false
if the format string is
null
.public FormattedValue getFormattedValue()
getFormattedValue
in class FrameElement
public java.lang.String getFormat()
getFormat
in class FrameElement
public GenericWidget getWidget()
getWidget
in class FrameElement
public BaseDataType get()
public void set(BaseDataType val)
val
- The current value to be assigned into the referenced object.public Accessor getDataAccessor()