public final class GralTable.TableLineData extends GralTable.NodeTableLine implements GralTableLine_ifc<UserData>
TreeNodeBase#nd_data
cellTexts
colorBackground, colorForeground
markMask
TableLineData#bChanged.
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 |
colorBackMarked2 |
GralColor |
colorBackSelect |
GralColor |
colorBackSelectMarked |
GralColor |
colorBackSelectMarked2 |
GralColor |
colorBackSelectSomeMarked |
GralColor |
colorBackSelectSomeMarked2 |
GralColor |
colorBackSomeMarked |
GralColor |
colorBackSomeMarked2 |
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). |
tbl_lineCanHaveChildren, tbl_showChildren, tbl_treeDepth, tbl_zLineUnfoldedversionsVersion| Constructor and Description |
|---|
TableLineData(java.lang.String key,
UserData data) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanSpecialColorsOfLine() |
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() |
GralWidgetBase_ifc |
getFocusedWidget()
Returns the widget which is in focus of a panel or comprehensive widget.
|
GralWidget.ImplAccess |
getImplAccess()
This is used to access to the implementation widget instance.
|
java.lang.Object |
getImplWidget()
Returns the implementation widget or its Wrapper.
|
int |
getMark() |
java.lang.String |
getName()
Access to the name of the widget.
|
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 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() |
GralPos |
pos()
Position of the widget, which refers also the
GralPos.parent. |
private void |
prepareAddedLine(java.lang.String[] lineTexts) |
void |
redraw()
repaint request.
|
void |
redraw(int delay,
int latest)
Possible delayed repaint, can be called in any thread.
|
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)
Capability of any widget for
GralWidget_ifc.refreshFromVariable(VariableContainer_ifc)
but additionally the widget is shown as "too old" if the time stored with the variable is old. |
boolean |
remove() |
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)
This operation is used if the pixel are calculated on gral level.
|
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. .
|
void |
setFocused(boolean bGained)
This operation can be called from the implementation graphic if the focus is gained for an implementation widget.
|
void |
setFocusedWidget(GralWidgetBase_ifc widg)
If this widget is a comprehensive widget or a panel, it sets one of the content as focused.
|
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.
|
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, deleteLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChildLine, addNextLine, addPrevLine, deleteLineSelectMask 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
public GralColor colorBackSelectMarked2
public GralColor colorBackSelectSomeMarked2
public GralColor colorBackMarked2
public GralColor colorBackSomeMarked2
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()
GralWidgetBase_ifcGralWidgetBase.name immediately.getName in interface GralWidgetBase_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)
GralWidgetBase_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 GralWidgetBase_ifcpublic void setFocusedWidget(GralWidgetBase_ifc widg)
GralWidgetBase_ifcsetFocusedWidget in interface GralWidgetBase_ifcwidg - The sub widget which should be focused.
It influences for example the current tab of a tabbed panel,
or influences which widget of a comprehensive widget is first focused.
On a panel it determines which widget should get the focus if the panel gets the focus.public GralWidgetBase_ifc getFocusedWidget()
GralWidgetBase_ifcgetFocusedWidget in interface GralWidgetBase_ifcpublic void setFocus()
GralWidgetBase_ifcsetFocus in interface GralWidgetBase_ifcpublic void setFocus(int delay,
int latest)
GralWidget_ifcsetFocus in interface GralWidget_ifcsetFocus in interface GralWidgetBase_ifcpublic boolean isInFocus()
GralWidgetBase_ifcisInFocus in interface GralWidgetBase_ifcpublic boolean isVisible()
GralWidgetBase_ifcisVisible in interface GralWidgetBase_ifcpublic void setFocused(boolean bGained)
setFocused in interface GralWidgetBase_ifcbGained - @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 void cleanSpecialColorsOfLine()
public 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.redraw(int, int) is invoked with the standard delay of #redrawtDelay and #redrawDelayMax.
With that the widget-specific private instance of #repaintRequ is added to the queue of requests
in the GralGraphicThread#addTimeEntry(GralGraphicOrder). In the requested time that
dispatch order is executed in the graphic thread. It calls GralWidgImplAccess_ifc.redrawGthread().
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.
GralGraphicOrder
is queued. All changed attributes are stored in DynamicData#whatIsChanged and the
GralWidgImplAccess_ifc.redrawGthread() 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 redraw()
GralWidget_ifcGralWidget_ifc.redraw(int, int)redraw in interface GralWidget_ifcpublic void redraw(int delay,
int latest)
GralWidget_ifcredraw 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 <= 0, then it is unused.
Note that a new call of repaint removes an existing repaint order to the new given time.
With the latest argument for this time the repaint is always executing independent of new calls.public void setBoundsPixel(int x,
int y,
int dx,
int dy)
GralWidget_ifcsetBoundsPixel 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)
GralWidget_ifcGralWidget_ifc.refreshFromVariable(VariableContainer_ifc)
but additionally the widget is shown as "too old" if the time stored with the variable is old.
This helps to show the state of fields for updating.refreshFromVariable in interface GralWidget_ifctimeAtleast - The absolute time stamp after them the variable should be gotten a new value.
It may be for example some seconds before the current time.colorRefreshed - show with this background color if refreshedcolorOld - show with this background color if not refresehed.public 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()
public 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()
public 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)mask - This bits of the SelectMask#selectMask will be reseted.data - if null then don't invoke GralTable.specifyActionOnLineMarked(MarkMask_ifc)org.vishia.util.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)mask - This bits of the SelectMask#selectMask will be set.data - if null then don't invoke GralTable.specifyActionOnLineMarked(MarkMask_ifc)org.vishia.util.SelectMask#setNonMarked(int, java.lang.Object)public GralMng gralMng()
GralWidgetBase_ifcgralMng in interface GralWidgetBase_ifcpublic java.lang.String toString()
public void setData(java.lang.Object data)
GralWidget_ifcsetData in interface GralWidget_ifcpublic UserData getData()
GralWidget_ifc#setContentInfo(Object).getData in interface GralWidget_ifcpublic GralWidget.ImplAccess getImplAccess()
GralWidgetBase_ifcgetImplAccess in interface GralWidgetBase_ifcpublic GralPos pos()
GralWidgetBase_ifcGralPos.parent.
The parent in a GralPos has usual the reference to the GralMng.pos in interface GralWidgetBase_ifcpublic java.lang.Object getImplWidget()
GralWidget_ifcgetImplWidget in interface GralWidget_ifc