public class InspcFieldTable
extends java.lang.Object
InspcFieldOfStruct
which are referenced as data in the GralTable
of the private composite reference widgTable
.
fillTableFromFocusedVariable()
, actionBack()
, getSubStruct(GralTableLine_ifc)
are invoked from operator GUI actions. They call
#fillTableStruct()
InspcStruct
of the variable respectively the shown struct in table whether it is known already,
using InspcStruct#isUpdated()
. It it is not updated, on selection a new variable, the
InspcTargetAccessor#requestFields(org.vishia.inspcPC.InspcTargetAccessData, InspcAccessExecRxOrder_ifc, Runnable)
InspcTargetAccessData
and the 2 callbacks.
This action is done especially in the graphical thread.
InspcStruct#isUpdated()
returns true, then the struct was updated already. Then it can be shown in the GralTable
with the names of its elements and the last gotten values.
InspcMng
invokes InspcMng#procComm()
cyclically to show and request values.
In this thread via calling InspcTargetAccessor#requestStart(long)
the request for getFields is recognized.
For that the InspcTargetAccessor#cmdGetFields(String, org.vishia.inspcPC.InspcAccessExecRxOrder_ifc)
is invoked for the path of the struct. That is sent to the target.
InspcStruct#rxActionGetFields
is invoked which fills the struct.
Runnable
: actionUpdated
of this class
is invoked. This action calls #fillTableStruct()
now with received and stored fields.
InspcFieldOfStruct#variable(InspcVariable, org.vishia.byteData.VariableContainer_ifc)
and request a new value with InspcVariable#requestValue(long, Runnable)
. The callback invoked on end of the last datagram
is a temporary instance RunOnReceive#RunOnReceive(GralTableLine_ifc)
with the given line of the table which invokes
showValue(GralTableLine_ifc, boolean)
.
Modifier and Type | Class and Description |
---|---|
(package private) class |
InspcFieldTable.RunOnReceive |
static class |
InspcFieldTable.TxOrderSetValue
An instance of this class is used to prepare setValueByPath on a changed value in a line.
|
Modifier and Type | Field and Description |
---|---|
(package private) GralUserAction |
actionBack |
(package private) GralUserAction |
actionChgTable
This action is invoked on any keyboard hits which are not handled in the GralTable.
|
(package private) GralUserAction |
actionLineSelected |
(package private) GralUserAction |
actionOpenWindow |
(package private) GralUserAction |
actionRefresh |
(package private) GralUserAction |
actionSetValues |
(package private) GralUserAction |
actionShowAll |
(package private) java.lang.Runnable |
actionUpdated |
private GralButton |
btnBack |
private GralButton |
btnHelp |
private GralButton |
btnRefresh |
private GralButton |
btnRepeat |
private GralButton |
btnSetValue |
private GralButton |
btnShowAll |
private java.util.Map<java.lang.String,java.lang.String> |
indexSelection
This index stores the last selected file for any component which was used.
|
private InspcMng |
inspcMng
Aggregation.
|
private java.lang.String |
sFieldCurrent
Name and path to the current selected field.
|
private static int |
sizeName
Sizes in table in Graphic grid units.
|
private static int |
sizeStruct
Sizes in table in Graphic grid units.
|
private static int |
sizeType
Sizes in table in Graphic grid units.
|
private java.lang.String |
sPathCurrent
Name and path to the current selected field.
|
private java.lang.String |
sPathStruct
Path in target to the struct which is shown in table.
|
private InspcVariable |
structVar |
protected static java.lang.String |
sVersion
Version, history and license.
|
private long |
timeLineSelected |
private GralTextField |
widgPath
Shows the path in target to this struct.
|
private GralTable<InspcFieldOfStruct> |
widgTable
Table of fields, type and value.
|
private GralWindow |
wind
The window to present.
|
protected java.util.concurrent.atomic.AtomicBoolean |
XXXbSetValue
Set in graphic thread with
btnSetValue , ask and reset in the InspcMng-thread. |
Constructor and Description |
---|
InspcFieldTable(GralMng gralMng,
InspcMng inspcMng) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
actionBack() |
(package private) void |
actionSetValues() |
(package private) void |
fillTableFromFocusedVariable() |
(package private) void |
fillTableStruct(boolean bCanRequest)
Fills the graphic table to show the structural content of a data node (a C struct or class).
|
java.lang.String |
getCurrentPathField() |
static java.lang.String |
getDataPath(GralTable.TableLineData line) |
(package private) void |
getSubStruct(GralTableLine_ifc<InspcFieldOfStruct> line) |
(package private) void |
refresh() |
(package private) void |
sendValueChange(GralTableLine_ifc<InspcFieldOfStruct> line)
This method is invoked if the value in the table is changed and this change should be applied to the target, key ctrl-enter.
|
(package private) void |
setCurrentFieldInfo(GralTable.TableLineData line) |
(package private) void |
showAll() |
private void |
showValue(GralTableLine_ifc<InspcFieldOfStruct> line,
boolean request)
Shows the current value inside the target for the specified line.
|
protected static final java.lang.String sVersion
InspcFieldOfStruct
hasSubstruct.
private static final int sizeStruct
private static final int sizeName
private static final int sizeType
private final GralWindow wind
private final GralTextField widgPath
private final GralTable<InspcFieldOfStruct> widgTable
private final GralButton btnBack
private final GralButton btnHelp
private final GralButton btnRefresh
private final GralButton btnShowAll
private final GralButton btnSetValue
private final GralButton btnRepeat
private final InspcMng inspcMng
private final java.util.Map<java.lang.String,java.lang.String> indexSelection
private InspcVariable structVar
private java.lang.String sPathStruct
private java.lang.String sFieldCurrent
private java.lang.String sPathCurrent
private long timeLineSelected
protected java.util.concurrent.atomic.AtomicBoolean XXXbSetValue
btnSetValue
, ask and reset in the InspcMng-thread.GralUserAction actionOpenWindow
GralUserAction actionChgTable
GralUserAction actionLineSelected
GralUserAction actionBack
GralUserAction actionRefresh
GralUserAction actionShowAll
GralUserAction actionSetValues
java.lang.Runnable actionUpdated
public InspcFieldTable(GralMng gralMng, InspcMng inspcMng)
void fillTableFromFocusedVariable()
void fillTableStruct(boolean bCanRequest)
bCanRequest
- InspcFieldOfStruct#hasSubstruct
info from the parent (the field of the array).
Note: It comes from the target: "type..." or "type[size]..." in the telegram.private void showValue(GralTableLine_ifc<InspcFieldOfStruct> line, boolean request)
actionChgTable
or if a new value was received: InspcFieldTable.RunOnReceive.run()
invoked from InspcVariable#requestValue(long, Runnable)
.
The last one method requestValue() is invoked in this routine if the argument request is set to true.line
- The line of this table, contains the InspcFieldOfStruct
as user data , GralTableLine_ifc.getUserData()
.
Therein the variable for this line is stored or will be created with InspcMng#getOrCreateVariable(InspcStruct, InspcFieldOfStruct)
.request
- true then a new value for the variable of this line will be requested here.void refresh()
void showAll()
public java.lang.String getCurrentPathField()
public static java.lang.String getDataPath(GralTable.TableLineData line)
void setCurrentFieldInfo(GralTable.TableLineData line)
void actionBack()
void getSubStruct(GralTableLine_ifc<InspcFieldOfStruct> line)
void actionSetValues()
void sendValueChange(GralTableLine_ifc<InspcFieldOfStruct> line)