public final class GralTable.TableLineData extends GralTable.NodeTableLine implements MarkMask_ifc, GralTableLine_ifc<UserData>
TreeNodeBase.data
cellTexts
colorBackground, colorForeground
markMask
TableLineData#bChanged.
TreeNodeBase.IteratorDerivedImpl, TreeNodeBase.IteratorDerivedNode, TreeNodeBase.IteratorImpl, TreeNodeBase.IteratorMetaNode, TreeNodeBase.IteratorOneNode, TreeNodeBase.MetaNode<DerivedNode extends TreeNodeBase<DerivedNode,Data,IfcType> & SortedTree<IfcType>,Data,IfcType extends SortedTree<IfcType>>, TreeNodeBase.TreeNode<Data>GralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen| Modifier and Type | Field and Description |
|---|---|
protected boolean[] |
bChangedEdit
True if any of a cell text was changed by manual edit.
|
protected boolean[] |
bChangedSet
True if any of a cell text was changed by manual edit.
|
GralColor[] |
cellColorBack
If not null, then a special background color for the cell.
|
java.lang.String[] |
cellTexts |
GralColor |
colorBackground |
GralColor |
colorBackMarked |
GralColor |
colorBackSelect |
GralColor |
colorBackSelectMarked |
GralColor |
colorBackSelectSomeMarked |
GralColor |
colorBackSomeMarked |
GralColor |
colorForeground |
java.util.concurrent.atomic.AtomicInteger |
ctRepaintLine
If a repaint is necessary, it is changed by increment by 1.
|
(package private) SelectMask |
markMask |
private java.lang.String |
sDataPath
A line may have its datapath adequate a
GralWidget, only used for
getDataPath() and setDataPath(String). |
lineCanHaveChildren, showChildren, treeDepth, zLineUnfoldeddata, firstChild, idxChildren, key, lastChild, leafData, next, nrofChildren, parent, prev, versionversionsVersion| Constructor and Description |
|---|
TableLineData(java.lang.String key,
UserData data) |
| Modifier and Type | Method and Description |
|---|---|
void |
createImplWidget_Gthread()
Sets this widget to the current panel at the current given position.
|
GralWidget_ifc.ActionChange |
getActionChange(GralWidget_ifc.ActionChangeWhen when) |
GralColor |
getBackColor(int ix)
Gets the background color for the widget.
|
java.lang.String |
getCellText(int column)
Returns the text which is assigned to the cell of the table.
|
java.lang.String[] |
getCellTexts() |
java.lang.String |
getCmd()
Any widget can have a command String, which can be quest for example in an action.
|
long |
getContentIdent()
Gets the content identification of the users data which are set with
GralWidget_ifc.setContentIdent(long). |
java.lang.Object |
getContentInfo() |
UserData |
getData()
Gets the application specific info.
|
java.lang.String |
getDataPath() |
int |
getMark()
Returns the selection mask of this object.
|
java.lang.String |
getName() |
int |
getSelectedColumn() |
GralTable<UserData> |
getTable()
Gets the table where this line is member of.
|
UserData |
getUserData()
Returns the instance which is related to the line on #setUserData or on construction.
|
GralMng |
gralMng()
Returns the associated singleton GralMng.
|
boolean |
isChanged(boolean setUnchanged)
Returns true if the content is changed from a user action on GUI.
|
boolean |
isEditable()
Query whether the table line is able to edit: Return from the whole table.
|
boolean |
isGraphicDisposed()
Returns true if the graphic implementatin widget was initialized, and then it was disposed.
|
boolean |
isInFocus()
Returns true if this widget is the focused one.
|
boolean |
isNotEditableOrShouldInitialize()
Query whether this field should be written from any initial or actual data.
|
boolean |
isVisible()
Returns whether the widget is visible or not.
|
GralTable.TableLineData |
parentNode() |
private void |
prepareAddedLine(java.lang.String[] lineTexts) |
void |
refreshFromVariable(VariableContainer_ifc container)
Capability for any widget to update its content from its associated variables described in its sDataPath.
|
void |
refreshFromVariable(VariableContainer_ifc container,
long timeAtleast,
GralColor colorRefreshed,
GralColor colorOld) |
boolean |
remove()
Removes all referenced data, close all opened resources, removes all graphical widgets etc.
|
void |
repaint()
repaint request.
|
void |
repaint(int delay,
int latest)
Possible delayed repaint, can be called in any thread.
|
void |
setBackColor(GralColor colorNormal,
GralColor colorSelected,
GralColor colorMarked,
GralColor colorSomeMarked,
GralColor colorSelectMarked,
int ix)
Sets the background color for a special cell of line or for all cells of this line
which has not a special cell color for the several states of the line.
|
void |
setBackColor(GralColor color,
int ix)
Sets the background color of the whole line or one cell.
|
GralColor |
setBackgroundColor(GralColor color)
Deprecated.
|
void |
setBoundsPixel(int x,
int y,
int dx,
int dy) |
java.lang.String |
setCellText(java.lang.String text,
int column) |
void |
setCmd(java.lang.String cmd)
Any widget can have a command String, which can be quest for example in an action.
|
long |
setContentIdent(long date)
Sets a identification for the shown data.
|
void |
setData(java.lang.Object data)
Sets a application specific data.
|
void |
setDataPath(java.lang.String sDataPath)
Sets the data path.
|
void |
setEditable(boolean editable)
Sets whether it is able to edit the content of the text field or text box.
|
void |
setFocus()
Sets the focus to the widget. .
|
void |
setFocus(int delay,
int latest)
Sets the focus to the widget. .
|
GralColor |
setForegroundColor(GralColor color)
Deprecated.
|
void |
setHtmlHelp(java.lang.String url)
Sets the html help url for this widget.
|
void |
setLineColor(GralColor color,
int ix)
Sets the line color for the widget.
|
int |
setMarked(int mask,
java.lang.Object data)
Sets the mark status of the line.
|
int |
setNonMarked(int mask,
java.lang.Object data)
Sets the mark status of the line.
|
void |
setText(java.lang.CharSequence text)
Set the text of the widget.
|
void |
setTextColor(GralColor color)
Sets the text color for the widget.
|
void |
setToPanel(GralMngBuild_ifc mng)
Deprecated.
|
boolean |
setVisible(boolean visible)
Sets this widget visible on graphic or invisible.
|
void |
showChildren(boolean show,
boolean bLeftGrandChildrenOpen)
Opens or closes showing children of this line.
|
void |
showChildren(boolean show,
boolean bLeftGrandChildrenOpen,
boolean showReally) |
java.lang.String |
toString() |
int |
treeDepth() |
boolean |
wasCelltextSet(int column) |
addChildLine, addNextLine, addPrevLine, adjCountChildrenInParent, clear, countChildren, countChildren, deleteLineaddLeaf, addNode, addNode, addNodeFirst, addSiblingNext, addSiblingPrev, childNodes, childNodes, detach, firstChild, getChild, getContainerChildren, getKey, getNode, getOrCreateNode, getParent, getParentData, hasChildren, iterator, iteratorChildren, iteratorChildren, iterChildren, iterChildren, lastChild, listChildren, listChildren, movetoFirstChild, movetoSiblingNext, movetoSiblingPrev, newNode, nextSibling, nrofChildren, parent, parentEquals, prevSibling, removeChildren, swap, walkTreeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChildLine, addNextLine, addPrevLine, deleteLinegetChild, getParent, iterChildren, iterChildren, listChildren, listChildrenaddNode, addNode, addNodeFirst, addSiblingNext, detach, firstChild, getKey, getNode, getOrCreateNode, getParentData, hasChildren, iteratorChildren, iteratorChildren, lastChild, nextSibling, nrofChildren, parent, parentEquals, prevSibling, removeChildrenSelectMask markMask
public java.util.concurrent.atomic.AtomicInteger ctRepaintLine
public final java.lang.String[] cellTexts
public GralColor[] cellColorBack
colorBackground of the line
or the GralTable.colorBackMarked etc. of the table.private java.lang.String sDataPath
GralWidget, only used for
getDataPath() and setDataPath(String).protected final boolean[] bChangedEdit
protected final boolean[] bChangedSet
public GralColor colorForeground
public GralColor colorBackground
public GralColor colorBackSelect
public GralColor colorBackSelectMarked
public GralColor colorBackSelectSomeMarked
public GralColor colorBackMarked
public GralColor colorBackSomeMarked
TableLineData(java.lang.String key, UserData data)
public GralTable<UserData> getTable()
getTable in interface GralTableLine_ifc<UserData>private void prepareAddedLine(java.lang.String[] lineTexts)
public void setEditable(boolean editable)
GralWidget_ifcsetEditable in interface GralWidget_ifceditable - true then the content is going to be able to change.
False then the edit functionality is disabled.public boolean isEditable()
isEditable in interface GralWidget_ifcGralWidget_ifc.isEditable()public boolean isNotEditableOrShouldInitialize()
GralWidget_ifcisNotEditableOrShouldInitialize in interface GralWidget_ifcpublic boolean isGraphicDisposed()
GralWidget_ifcisGraphicDisposed in interface GralWidget_ifcpublic boolean isChanged(boolean setUnchanged)
GralWidget_ifcisChanged in interface GralWidget_ifcsetUnchanged - If true then set to unchanged with this call.public boolean wasCelltextSet(int column)
public GralTable.TableLineData parentNode()
parentNode in interface GralTableLine_ifc<UserData>public java.lang.String getName()
getName in interface GralWidget_ifcpublic void setCmd(java.lang.String cmd)
GralWidget_ifcGralWidget_ifc.getCmd() independent of its name which can be set on runtime with this method.setCmd in interface GralWidget_ifcpublic java.lang.String getCmd()
GralWidget_ifcGralWidget_ifc.setCmd(String).getCmd in interface GralWidget_ifcpublic java.lang.String getCellText(int column)
GralTableLine_ifcgetCellText in interface GralTableLine_ifc<UserData>column - The column of table.public java.lang.String[] getCellTexts()
getCellTexts in interface GralTableLine_ifc<UserData>public int treeDepth()
public java.lang.String setCellText(java.lang.String text, int column)
setCellText in interface GralTableLine_ifc<UserData>public UserData getUserData()
GralTableLine_ifcgetUserData in interface GralTableLine_ifc<UserData>public long setContentIdent(long date)
GralWidget_ifcGralWidget_ifc.getContentIdent().setContentIdent in interface GralWidget_ifcdate - any number which identifies the value of content.public long getContentIdent()
GralWidget_ifcGralWidget_ifc.setContentIdent(long).getContentIdent in interface GralWidget_ifcpublic int getSelectedColumn()
getSelectedColumn in interface GralTableLine_ifc<UserData>public boolean setVisible(boolean visible)
GralWidget_ifcGralWindow, its the visibility of the whole window.
Note that a window which is invisible is not shown in the task bar of the operation system.
Note that an application can have more as one window.
Note that a dialog window can be set to invisible if it is not need yet instead destroy and build newly.setVisible in interface GralWidget_ifcpublic void setFocus()
GralWidget_ifcsetFocus in interface GralWidget_ifcpublic void setFocus(int delay, int latest)
GralWidget_ifcsetFocus in interface GralWidget_ifcpublic boolean isInFocus()
GralWidget_ifcisInFocus in interface GralWidget_ifcpublic boolean isVisible()
GralWidget_ifcisVisible in interface GralWidget_ifc@Deprecated public GralColor setBackgroundColor(GralColor color)
setBackgroundColor in interface GralWidget_ifc@Deprecated public GralColor setForegroundColor(GralColor color)
setForegroundColor in interface GralWidget_ifcpublic void setBackColor(GralColor color, int ix)
setBackColor in interface GralWidget_ifcix - -1 for the whole line, >=0 for one cell.color - Any colorpublic GralColor getBackColor(int ix)
GralWidget_ifcgetBackColor in interface GralWidget_ifcix - 0 if only one color is supported, 1, ... if the widget has more as one background.public void setBackColor(GralColor colorNormal, GralColor colorSelected, GralColor colorMarked, GralColor colorSomeMarked, GralColor colorSelectMarked, int ix)
setBackColor in interface GralTableLine_ifc<UserData>colorNormal - non selected, non markedcolorSelected - non marked, the selected line.colorMarked - marked, not the selected linecolorSomeMarked - some marked, not the selected linecolorSelectMarked - marked or some marked, the selected line.ix - -1 for the line, 0... for one cell of the line.public void setLineColor(GralColor color, int ix)
GralWidget_ifcsetLineColor in interface GralWidget_ifccolor - Any colorix - 0 if only one color is supported, 1, ... if the widget has more as one line.public void setTextColor(GralColor color)
GralWidget_ifcsetTextColor in interface GralWidget_ifccolor - Any colorpublic void setText(java.lang.CharSequence text)
GralWidget_ifcGralWidget_ifc.setBackColor(GralColor, int) etc.
GralWidget_ifc.repaint(int, int) is invoked with the standard delay of #repaintDelay and #repaintDelayMax.
With that the widget-specific private instance of #repaintRequ is added to the queue of requests
in the GralGraphicThread#addTimeOrder(GralGraphicTimeOrder). In the requested time that
dispatch order is executed in the graphic thread. It calls GralWidgImpl_ifc.repaintGthread().
That method is implemented in the graphic implementation layer of the widget. It sets the appropriate values
from the independent Gral attributes to the implementation specifics and invoke a redraw of the graphic layer.
GralGraphicTimeOrder
is queued. All changed attributes are stored in DynamicData#whatIsChanged and the
GralWidgImpl_ifc.repaintGthread() quests all changes one after another.
It means that a thread switch is invoked only one time per widget for more as one change.
DynamicData. That composite part of a widget stores all standard dynamic data of a widget.setText in interface GralWidget_ifcpublic void showChildren(boolean show, boolean bLeftGrandChildrenOpen)
GralTableLine_ifcshowChildren in interface GralTableLine_ifc<UserData>show - true then show, false then close this bough.bLeftGrandChildrenOpen - if show==true, false then close sub children boughs of this, true left opened grand children open.
This is an important behavior of operating with a tree view. Both variants are desirable in different situations.public void showChildren(boolean show, boolean bLeftGrandChildrenOpen, boolean showReally)
showChildren in interface GralTableLine_ifc<UserData>public void repaint()
GralWidget_ifcGralWidget_ifc.repaint(int, int)repaint in interface GralWidget_ifcpublic void repaint(int delay, int latest)
GralWidget_ifcrepaint in interface GralWidget_ifcdelay - in milliseconds. If 0 or less 0, then it is executed immediately if the calling
thread is the graphic thread.latest - The latest draw time in milliseconds. If it is less 0, then it is unused.
If it is 0 or less delay if a delay is given, then the delay isn't wound up on re-call.public void setBoundsPixel(int x, int y, int dx, int dy)
setBoundsPixel in interface GralWidget_ifcpublic void refreshFromVariable(VariableContainer_ifc container)
GralWidget_ifcrefreshFromVariable in interface GralWidget_ifccontainer - The container is used only if the variable is not known by direct reference
in the private GralWidget.variable or GralWidget.variables. If the variable(s) is/are
not known, they are searched by there data path set by GralWidget_ifc.setDataPath(String). More as one
variables are possible separated by "," in the setDataPath("variable1, variable2").
The variables are searched in the container calling VariableContainer_ifc.getVariable(String).public void refreshFromVariable(VariableContainer_ifc container, long timeAtleast, GralColor colorRefreshed, GralColor colorOld)
refreshFromVariable in interface GralWidget_ifcpublic void setDataPath(java.lang.String sDataPath)
GralWidget_ifcGralWidget_ifc.refreshFromVariable(VariableContainer_ifc).setDataPath in interface GralWidget_ifcpublic java.lang.String getDataPath()
getDataPath in interface GralWidget_ifcpublic GralWidget_ifc.ActionChange getActionChange(GralWidget_ifc.ActionChangeWhen when)
getActionChange in interface GralWidget_ifcpublic boolean remove()
org.vishia.util.Removeableremove in interface Removeablepublic void setHtmlHelp(java.lang.String url)
GralWidget_ifcsetHtmlHelp in interface GralWidget_ifcurl - String given url, maybe a local file too with #internalLabel.public java.lang.Object getContentInfo()
getContentInfo in interface GralWidget_ifcpublic int getMark()
org.vishia.util.MarkMask_ifcgetMark in interface MarkMask_ifcpublic int setNonMarked(int mask, java.lang.Object data)
GralTable.specifyActionOnLineMarked(MarkMask_ifc)
with the given #setUserData(Object) of this line. It means a selection with the user data
may be done too. This method will be called especially on pressing the mark key specified with
GralTable.specifyKeysMarkUpDn(int, int)setNonMarked in interface MarkMask_ifcmask - This bits of the SelectMask.selectMask will be reseted.data - if null then don't invoke GralTable.specifyActionOnLineMarked(MarkMask_ifc)SelectMask.setNonMarked(int, java.lang.Object)public int setMarked(int mask, java.lang.Object data)
GralTable.specifyActionOnLineMarked(MarkMask_ifc)
with the given getUserData() of this line. It means a selection with the user data
may be done too. This method will be called especially on pressing the mark key specified with
GralTable.specifyKeysMarkUpDn(int, int)setMarked in interface MarkMask_ifcmask - This bits of the SelectMask.selectMask will be set.data - if null then don't invoke GralTable.specifyActionOnLineMarked(MarkMask_ifc)SelectMask.setNonMarked(int, java.lang.Object)public GralMng gralMng()
GralWidget_ifcGralWidget_ifc.setToPanel(GralMngBuild_ifc).gralMng in interface GralWidget_ifcpublic void setToPanel(GralMngBuild_ifc mng)
GralWidget_ifcGralWidget_ifc.createImplWidget_Gthread().setToPanel in interface GralWidget_ifcmng - not used. It is known as singleton. Use null as argument.public void createImplWidget_Gthread()
GralWidget_ifcGralMng.createImplWidget_Gthread(GralWidget) which tests the type of the derived GralWidget
to create the correct graphical widget. That method calls the implementing specific GralMng.ImplAccess#createImplWidget_Gthread(GralWidget)
which knows the implementation graphic.
ImplAccess. With them the GralWidget
is references because it is the environment class. The core graphical widget is an aggregation in this instance. It is possible
that more as one implementation widget is used for a Gral Widget implementation. For example a text field with a prompt
consists of two implementation widgets, the text field and a label for the prompt.
GralWidget#initPosAndRegisterWidget(GralPos) which is called either
on construction of a widget with a String-given position, before it appears on graphic, or on construction of the
graphic widget. It calls the package private GralWidget#initPosAndRegisterWidget(GralPos), which takes the
given position, stores it in the GralWidget.pos() and adds the widget both to its panel which is given
with the pos and registers the widget in the GralMng for simple global access.
If the name of the widget starts with "@" its name in the panel is the part after "@" whereby the global name
is the "panelname.widgetname". If a widget's position is given from left and from right or with percent, it is resized
on resizing the window and the panel.
createImplWidget_Gthread in interface GralWidget_ifcpublic java.lang.String toString()
toString in class TreeNodeBase<GralTable.TableLineData,UserData,GralTableLine_ifc<UserData>>public void setData(java.lang.Object data)
GralWidget_ifcsetData in interface GralWidget_ifcpublic UserData getData()
GralWidget_ifc#setContentInfo(Object).getData in interface GralWidget_ifc