public abstract class GralTable.GraphicImplAccess extends GralWidget.ImplAccess implements GralWidgImpl_ifc, Removeable
Modifier and Type | Field and Description |
---|---|
protected boolean |
bFocused
Set true if the focus is gained by mouse click.
|
protected boolean |
bFocusLost
Sets temporary between focus lost and redraw.
|
protected boolean |
bRedrawPending
Set to true while
#table . |
protected boolean |
bVscrollbarChanged |
protected GralTable.CellData[][] |
cells |
static int |
chgEditableColumn |
protected int |
ixColorScrollbar
New and last index of the sliderColor.
|
protected int |
ixColorScrollbarLast
New and last index of the sliderColor.
|
protected int |
linePixel
Pixel per line.
|
protected long |
mousect |
protected long |
mousetime |
protected int |
nrofColumnTreeShift
number of columns which should be shift to rigth on tree indent. 0. don't shift.
|
protected GralTable<UserData> |
outer |
protected long |
redrawct |
protected long |
redrawtime |
protected int[] |
xpixelCell
Column position for the cells in pixel from 0 (left) calculated from the pixel size of the table.
|
protected int |
xPixelUnit |
protected boolean |
XXXhasFocus
Set to true if the table has the focus in window.
|
protected GralRectangle |
xyVscrollbar
Pixel position of the vertical scroll bar.
|
protected int |
y1Scrollbar
Position of vScrollBar calculated from
GralTable.rootLine . |
protected int |
y2Scrollbar
Position of vScrollBar calculated from
GralTable.rootLine . |
chgBitsDerived, chgColorBack, chgColorLine, chgColorText, chgEditable, chgFloat, chgFocus, chgFont, chgIntg, chgInvisible, chgObjects, chgPos, chgText, chgVisible, chgVisibleInfo, pixBounds, wdgimpl, widgg
Modifier | Constructor and Description |
---|---|
protected |
GraphicImplAccess(GralTable<UserData> outer,
GralMng mng) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
bChangedLinesForCell() |
protected void |
bChangedLinesForCell(boolean val) |
protected boolean |
bColumnEditable(int ix) |
protected void |
checkAndUpdateText(java.lang.String sText,
GralTable.CellData celldata) |
protected GralColor |
colorBackTable() |
protected GralColor |
colorBackVscrollbar() |
protected GralColor |
colorLineVscrollbar() |
protected GralColor |
colorSelectChars() |
protected GralColor |
colorSelectCharsBack() |
protected int[] |
columnWidthsGral() |
protected abstract GralMenu |
createColumnMenu(int column)
Should be implemented by the implementation class.
|
protected void |
determineSizeAndPositionScrollbar(int yPixel)
This method have to be called before the vertical scroll bar is painted
in the
GralWidgImpl_ifc.repaintGthread() routine.. |
protected abstract void |
drawCellContent(int iCellLine,
GralTable.CellData[] cellData,
GralTable.TableLineData line,
GralTable.LinePresentation linePresentationP) |
protected abstract GralTable.CellData |
drawCellInvisible(int iCellLine,
int iCellCol) |
void |
focusGainedTable()
This routine is invoked if any cell of the table gets the focus.
|
protected void |
focusLostTable()
Invoked if any cell has lost the focus.
|
protected abstract java.lang.String |
getCellText(GralTable.CellData cell)
Gets the current text of the given cell from the graphic implementation.
|
protected abstract java.lang.String |
getCellTextFocus()
Gets the cell text from the focused cell in the implementation.
|
protected abstract int |
getVisibleLinesTableImpl() |
protected GralMng |
itsMng() |
protected int |
ixColumn() |
protected void |
mouseDoubleGral(int key,
GralTable.CellData cell) |
protected void |
mouseDownGral(int key,
GralTable.CellData cell) |
protected void |
mouseUpGral(int key,
GralTable.CellData cell) |
protected boolean |
processKeys(int keyCode)
Handle all standard keys of table.
|
protected boolean |
redrawTableWithFocusedCell(GralTable.CellData data)
Sets the current cell as focused with the focus color.
|
boolean |
remove()
Removes all referenced data, close all opened resources, removes all graphical widgets etc.
|
protected void |
resizeTable(GralRectangle pixTable)
This routine will be called inside a resize listener of the implementation graphic.
|
protected java.lang.StringBuilder |
searchChars() |
protected abstract void |
setBoundsCells(int treeDepthBase,
int zLineVisible)
Invoked in
resizeTable(GralRectangle) as action which should be implemented in the implementation layer. |
protected void |
setCellText(GralTable.CellData cell,
java.lang.String text)
Invoked on editing a text field
|
protected void |
setFocusCellMousePressed() |
protected void |
updateGraphicCellContent()
Updates the cell text fields which presents the content of the table.
|
protected int |
zColumn() |
acknChanged, actionShow, dyda, getActionChange, getChanged, gralWidgetFromImplData, setDragEnable, setDropEnable, setFocused, setTextChanged, setVisibleState, XXXfocusGained
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPixelPositionSize, getWidgetImplementation, removeWidgetImplementation, repaintGthread, setBoundsPixel, setFocusGThread, setVisibleGThread
protected boolean bFocused
#actionOnLineSelected(GralTableLine_ifc)
.protected boolean bFocusLost
protected boolean bRedrawPending
#table
.Table#redrawGthread()
is running.
It prevents recursive invocation of redraw() while setFocus() is invoked.protected boolean bVscrollbarChanged
protected GralTable.CellData[][] cells
public static final int chgEditableColumn
protected int ixColorScrollbar
protected int ixColorScrollbarLast
protected int linePixel
protected long mousect
protected long mousetime
protected int nrofColumnTreeShift
protected long redrawct
protected long redrawtime
protected final int[] xpixelCell
resizeTable(GralRectangle)
.protected final int xPixelUnit
protected boolean XXXhasFocus
protected final GralRectangle xyVscrollbar
protected int y1Scrollbar
GralTable.rootLine
. GralTable.NodeTableLine.zLineUnfolded
and GralTable#nLineCurr
written in #determineSizeAndPosition()
used for painting vScrollBar.protected int y2Scrollbar
GralTable.rootLine
. GralTable.NodeTableLine.zLineUnfolded
and GralTable#nLineCurr
written in #determineSizeAndPosition()
used for painting vScrollBar.protected GraphicImplAccess(GralTable<UserData> outer, GralMng mng)
protected boolean bChangedLinesForCell()
protected void bChangedLinesForCell(boolean val)
protected boolean bColumnEditable(int ix)
protected void checkAndUpdateText(java.lang.String sText, GralTable.CellData celldata)
protected GralColor colorBackTable()
protected GralColor colorBackVscrollbar()
protected GralColor colorLineVscrollbar()
protected GralColor colorSelectChars()
protected GralColor colorSelectCharsBack()
protected int[] columnWidthsGral()
protected abstract GralMenu createColumnMenu(int column)
column
- The columnprotected void determineSizeAndPositionScrollbar(int yPixel)
GralWidgImpl_ifc.repaintGthread()
routine..
It checks whether the GralTable#nLineCurr
and the shown number of lines
in GralTable.rootLine
. GralTable.NodeTableLine.zLineUnfolded
is given, e.g. >=0. If one of them is <0 or lines are countered
calling GralTable.NodeTableLine.countChildren(boolean, int)
.
Therewith the GralTable#nLineCurr
is set too. Anytime if the situation is not specified
the GralTable#nLineCurr
can be set to -1. This forces new calculation.protected abstract void drawCellContent(int iCellLine, GralTable.CellData[] cellData, GralTable.TableLineData line, GralTable.LinePresentation linePresentationP)
protected abstract GralTable.CellData drawCellInvisible(int iCellLine, int iCellCol)
public void focusGainedTable()
bFocusLost
is true, another cell of this table has lost the focus
in the last 50 ms before the repaint() was invoked. Then the super.GralWidget.setFocus()
will not be called.
bRedrawPending
is set, it means that the focus gained is invoked by a setFocus()-call
of the graphic representation layer. Then the GralWidget.setFocus()
will not be called.
GralWidget.setFocus()
is called to designate, that the table is focused.
protected void focusLostTable()
bFocused
= false.
But if another cell of the table has gotten the focus in this time, the bFocus = true is set.protected abstract java.lang.String getCellText(GralTable.CellData cell)
cell
- protected abstract java.lang.String getCellTextFocus()
protected abstract int getVisibleLinesTableImpl()
protected int ixColumn()
protected void mouseDoubleGral(int key, GralTable.CellData cell)
protected void mouseDownGral(int key, GralTable.CellData cell)
protected void mouseUpGral(int key, GralTable.CellData cell)
protected boolean processKeys(int keyCode)
GralTable.keyMarkUp
GralTable.keyMarkDn
GralMng.getRegisteredUserAction(String what)
with what="KeyAction"
and invokes the returned action method. With them all standard key actions of this application
may be done if a GralUserAction
is registered for that.
keyCode
- Encoding see KeyCode
.protected boolean redrawTableWithFocusedCell(GralTable.CellData data)
GralMng#setInfo(GralWidget, int, int, Object, Object)
.cell
- The cellpublic boolean remove()
org.vishia.util.Removeable
remove
in interface Removeable
protected void resizeTable(GralRectangle pixTable)
#setBoundsCells()
will be called.
That is implemented in the underlying graphic layer and sets the bounds for each cell.pixTable
- Size of the table area.protected java.lang.StringBuilder searchChars()
protected abstract void setBoundsCells(int treeDepthBase, int zLineVisible)
resizeTable(GralRectangle)
as action which should be implemented in the implementation layer.
The xpixelCell
was set before.treeDepthBase
- protected void setCellText(GralTable.CellData cell, java.lang.String text)
cell
- text
- protected void setFocusCellMousePressed()
protected void updateGraphicCellContent()
#drawCellContent(int, CellData[], TableLineData, LinePresentation)
is called inside for any cell. This method is implemented in the implementation layer.protected int zColumn()