org.vishia.gral.ifc

## Interface GralTableLine_ifc<UserData>

- All Superinterfaces:
    GralWidget_ifc, MarkMask_ifc, Removeable, SortedTree<GralTableLine_ifc<UserData>>, TreeNode_ifc<GralTable.TableLineData,UserData>
  All Known Implementing Classes:
    GralTable.TableLineData

      public interface GralTableLine_ifc<UserData>
      extends GralWidget_ifc, MarkMask_ifc, SortedTree<GralTableLine_ifc<UserData>>, TreeNode_ifc<GralTable.TableLineData,UserData>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `GralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `version` Version, history and license.

    - ### Fields inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `sVersion`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `GralTableLine_ifc<UserData>` | `addChildLine(java.lang.String childKey, java.lang.String[] childTexts, UserData data)` Inserts a line as child of this.
    `GralTableLine_ifc<UserData>` | `addNextLine(java.lang.String childKey, java.lang.String[] childTexts, UserData data)` Inserts a line behind the current line.
    `GralTableLine_ifc<UserData>` | `addPrevLine(java.lang.String childKey, java.lang.String[] childTexts, UserData data)` Inserts a line before the current line.
    `void` | `deleteLine()`
    `java.lang.String` | `getCellText(int column)` Returns the text which is assigned to the cell of the table.
    `java.lang.String[]` | `getCellTexts()`
    `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.
    `GralTableLine_ifc<UserData>` | `parentNode()`
    `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.
    `java.lang.String` | `setCellText(java.lang.String text, int column)`
    `void` | `showChildren(boolean show, boolean bLeftGrandChildrenOpen)` Opens or closes showing children of this line.
    `void` | `showChildren(boolean show, boolean bLeftGrandChildrenOpen, boolean showReally)`

    - ### Methods inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `createImplWidget_Gthread, getActionChange, getBackColor, getCmd, getContentIdent, getContentInfo, getData, getDataPath, getName, gralMng, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, refreshFromVariable, refreshFromVariable, repaint, repaint, setBackColor, setBackgroundColor, setBoundsPixel, setCmd, setContentIdent, setData, setDataPath, setEditable, setFocus, setFocus, setForegroundColor, setHtmlHelp, setLineColor, setText, setTextColor, setToPanel, setVisible`

    - ### Methods inherited from interface org.vishia.util.Removeable

      `remove`

    - ### Methods inherited from interface org.vishia.util.MarkMask_ifc

      `getMark, setMarked, setNonMarked`

    - ### Methods inherited from interface org.vishia.util.SortedTree

      `getChild, getParent, iterChildren, iterChildren, listChildren, listChildren`

    - ### Methods inherited from interface org.vishia.util.TreeNode_ifc

      `addNode, addNode, addNodeFirst, addSiblingNext, detach, firstChild, getKey, getNode, getOrCreateNode, getParentData, hasChildren, iteratorChildren, iteratorChildren, lastChild, nextSibling, nrofChildren, parent, parentEquals, prevSibling, removeChildren`

- - ### Field Detail

    - #### version

          static final int version

      Version, history and license.
      - 2015-07-12 Hartmut new: `setBackColor(GralColor, GralColor, GralColor, GralColor, GralColor, int)` with colorSelect etc. for content-depending table presentation.
      - 2011-06-00 Hartmut created
      Copyright/Copyleft:
      For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL is not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but doesn't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you intent to use this source without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### setBackColor

          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.
      Parameters:
        `colorNormal` - non selected, non marked
        `colorSelected` - non marked, the selected line.
        `colorMarked` - marked, not the selected line
        `colorSomeMarked` - some marked, not the selected line
        `colorSelectMarked` - marked or some marked, the selected line.
        `ix` - -1 for the line, 0... for one cell of the line.

    - #### getTable

          GralTable<UserData> getTable()

      Gets the table where this line is member of.

    - #### getCellText

          java.lang.String getCellText(int column)

      Returns the text which is assigned to the cell of the table.
      Parameters:
        `column` - The column of table.
      Returns:
        If the cell text, an empty text "" if the cell has not any text assigned.
      Throws:
        `java.lang.IndexOutOfBoundsException` - on fault column.

    - #### getCellTexts

          java.lang.String[] getCellTexts()

    - #### setCellText

          java.lang.String setCellText(java.lang.String text,
                                       int column)

    - #### getUserData

          UserData getUserData()

      Returns the instance which is related to the line on #setUserData or on construction. It is the same like GralWidget_ifct#getContentInfo.

    - #### getSelectedColumn

          int getSelectedColumn()

    - #### addChildLine

          GralTableLine_ifc<UserData> addChildLine(java.lang.String childKey,
                                                   java.lang.String[] childTexts,
                                                   UserData data)

      Inserts a line as child of this. This method should be used if no child line exists yet. It adds as last line of children. If child lines are existent, one can use `addPrevLine(String, String[], Object)` or `addNextLine(String, String[], Object)` in respect to a given child line too.
      Parameters:
        `lineKey` - The key for the line
        `lineTexts` - maybe null, elsewhere texts for the cells (column texts) of the line.
        `userDataP` -
      Returns:
        the added line.

    - #### addNextLine

          GralTableLine_ifc<UserData> addNextLine(java.lang.String childKey,
                                                  java.lang.String[] childTexts,
                                                  UserData data)

      Inserts a line behind the current line.
      Parameters:
        `lineKey` - The key for the line
        `lineTexts` - maybe null, elsewhere texts for the cells (column texts) of the line.
        `userDataP` -
      Returns:
        the added line.

    - #### addPrevLine

          GralTableLine_ifc<UserData> addPrevLine(java.lang.String childKey,
                                                  java.lang.String[] childTexts,
                                                  UserData data)

      Inserts a line before the current line.
      Parameters:
        `lineKey` - The key for the line
        `lineTexts` - maybe null, elsewhere texts for the cells (column texts) of the line.
        `userDataP` -
      Returns:
        the added line.

    - #### deleteLine

          void deleteLine()

    - #### parentNode

          GralTableLine_ifc<UserData> parentNode()

    - #### showChildren

          void showChildren(boolean show,
                            boolean bLeftGrandChildrenOpen)

      Opens or closes showing children of this line. It is for tree view.
      Parameters:
        `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.

    - #### showChildren

          void showChildren(boolean show,
                            boolean bLeftGrandChildrenOpen,
                            boolean showReally)