public interface GralMngBuild_ifc
GralMng_ifc
.
GralMng
or this interface.
For example create SwtMng
.
#createGridPanel(GralColor, int, int, int, int)
and add the panel to the given
selectPanel(String)
.
setPositionSize(int, int, int, int, char)
in grid units
#setFinePositionSize(int, int, int, int, int, int, int, int, char)
#setNextPositionX()
#setPosition(float, float, float, float, char, int)
and GralWidget_ifc
.
GralWidget
Modifier and Type | Field and Description |
---|---|
static int |
propGridZoomedPanel |
static int |
propZoomedPanel |
static int |
version
The version of this interface:
2016-09-01 Hartmut chg: instead extends
ReplaceAlias_ifc now contains getReplacerAlias() . |
Modifier and Type | Method and Description |
---|---|
GralButton |
addButton(java.lang.String sName,
GralUserAction action,
java.lang.String sButtonText)
Adds a button
|
GralButton |
addButton(java.lang.String sName,
GralUserAction action,
java.lang.String sCmd,
java.lang.String sDataPath,
java.lang.String sButtonText)
Adds a button
|
GralButton |
addCheckButton(java.lang.String sName,
java.lang.String sButtonTextOn,
java.lang.String sButtonTextOff,
java.lang.String sButtonTextDisabled,
GralColor colorOn,
GralColor colorOff,
GralColor colorDisabled)
Adds a button which is switching on or off.
|
GralCurveView |
addCurveViewY(java.lang.String sPosName,
int nrofXvalues,
GralCurveView.CommonCurve common,
TimedValues tracksValues)
Adds a curve view for displaying values with ordinary x-coordinate.
|
GralTextField |
addFileSelectField(java.lang.String name,
java.util.List<java.lang.String> listRecentFiles,
java.lang.String startDirMask,
java.lang.String prompt,
java.lang.String promptStylePosition)
Adds a special text field to select a file.
|
void |
addFocusAction(GralWidget widgetInfo,
GralUserAction action,
java.lang.String sCmdEnter,
java.lang.String sCmdRelease)
Adds the given Focus action to the known widget.
|
GralWidget |
addFocusAction(java.lang.String sName,
GralUserAction action,
java.lang.String sCmdEnter,
java.lang.String sCmdRelease)
Adds the given Focus action to the named widget.
|
GralHtmlBox |
addHtmlBox(java.lang.String name)
Adds a box which presents html content.
|
java.lang.Object |
addImage(java.lang.String sName,
java.io.InputStream imageStream,
int height,
int width,
java.lang.String sCmd) |
GralLed |
addLed(java.lang.String sName,
java.lang.String sDataPath)
Adds a Led (round)
|
void |
addLine(GralColor color,
java.util.List<GralPoint> points)
Adds a line.
|
void |
addLine(int colorValue,
float xa,
float ya,
float xe,
float ye)
Deprecated.
it is the old form before a
GralCanvasArea was created. Use that. |
GralWidget |
addSlider(java.lang.String sName,
GralUserAction action,
java.lang.String sShowMethod,
java.lang.String sDataPath) |
GralButton |
addSwitchButton(java.lang.String sName,
GralUserAction action,
java.lang.String sCmd,
java.lang.String sDataPath,
java.lang.String sButtonText,
GralColor colorOff,
GralColor colorOn)
Adds a button which saves its state, pressed or non-pressed.
|
GralButton |
addSwitchButton(java.lang.String sName,
java.lang.String sButtonTextOff,
java.lang.String sButtonTextOn,
GralColor colorOff,
GralColor colorOn)
Adds a button which is switching on or off.
|
GralTable |
addTable(java.lang.String sName,
int height,
int[] columnWidths)
Deprecated.
Create an instance of
GralTable and call GralTable#setToPanel(GralMngBuild_ifc) |
GralWidget |
addText(java.lang.String sText)
Adds a text to the current panel at given position with standard colors, left origin.
|
GralWidget |
addText(java.lang.String sText,
char size,
int color)
Deprecated.
|
GralWidget |
addText(java.lang.String sText,
int origin,
GralColor textColor,
GralColor BackColor)
Adds a simple text at the current position.
|
GralTextBox |
addTextBox(java.lang.String name,
boolean editable,
java.lang.String prompt,
char promptStylePosition)
Adds a box for editing or showing a text.
|
GralTextField |
addTextField(java.lang.String name,
boolean editable,
java.lang.String prompt,
java.lang.String promptStylePosition)
Adds a text field at the current position.
|
GralValueBar |
addValueBar(java.lang.String sName,
java.lang.String sDataPath) |
void |
buildCfg(GralCfgData data,
java.io.File fileCfg)
Sets the builder for content configuration.
|
GralPanelContent |
createCompositeBox(java.lang.String name)
Creates a box inside the current panel to hold some widgets.
|
GralFileDialog_ifc |
createFileDialog()
Creates a file or directory dialog.
|
GralPanelContent |
createGridPanel(java.lang.String namePanel,
GralColor backGround,
int xG,
int yG,
int xS,
int yS)
Creates an independent grid panel which is managed by this.
|
GralInfoBox |
createHtmlInfoBox(java.lang.String posName,
java.lang.String title,
boolean onTop) |
void |
createImplWidget_Gthread(GralWidget widgg)
This routine is called from
GralWidget#setToPanel(GralMngBuild_ifc) . |
GralInfoBox |
createTextInfoBox(java.lang.String name,
java.lang.String title) |
GralWindow |
createWindow(java.lang.String name,
java.lang.String title,
int windProps)
Creates a Window for a modal or non modal dialog.
|
GralColor |
getColor(java.lang.String sName)
Gets the named color.
|
int |
getColorValue(java.lang.String sName)
Gets the value to the named color.
|
GralPos |
getPositionInPanel()
Deprecated.
see
GralWidget.ImplAccess . |
GralUserAction |
getRegisteredUserAction(java.lang.String name) |
ReplaceAlias_ifc |
getReplacerAlias() |
java.util.Set<java.util.Map.Entry<java.lang.String,GralWidget>> |
getShowFields()
Returns a Set of all fields, which are created to show.
|
void |
registerPanel(GralPanel_ifc panel)
Registers a panel to place the widgets.
|
void |
registerUserAction(java.lang.String name,
GralUserAction action)
Registered any user action.
|
void |
registerWidget(GralWidgetBase widgd)
Register all widgets, which are created in its own classes, not add here.
|
boolean |
remove(GralPanel_ifc compositeBox)
Removes a composite box from the graphic representation.
|
boolean |
remove(GralWidget widget) |
void |
repaint()
Forces a newly paint of the GUI-container.
|
void |
repaintCurrentPanel()
Forces a newly paint of the current panel.
|
java.lang.String |
saveCfg(java.io.Writer dest)
Saves the given configuration.
|
void |
selectPanel(GralPanel_ifc panel)
Selects the given panel as current panel to build some content.
|
GralPanel_ifc |
selectPanel(java.lang.String sName)
selects a registered panel for the next add-operations.
|
void |
selectPrimaryWindow()
Selects the primary window as current panel to build some content.
|
void |
setDesignMode(boolean mode)
Sets or resets the design mode.
|
void |
setFinePosition(int y,
int yFrac,
int yEnd,
int yEndFrac,
int x,
int xFrac,
int xEnd,
int xEndFrac,
char direction,
int border,
int borderFrac,
GralPos frame)
Deprecated.
|
GralUserAction |
setMainKeyAction(GralUserAction userKeyAction)
Sets the action for main keys.
|
void |
setPosition(float line,
float lineEndOrSize,
float column,
float columnEndOrSize,
char direction)
Deprecated.
|
void |
setPosition(float line,
float lineEnd,
float column,
float columnEnd,
char direction,
float border)
Deprecated.
|
void |
setPosition(GralPos framePos,
float line,
float lineEnd,
float column,
float columnEnd,
char direction)
Deprecated.
|
void |
setPosition(GralPos framePos,
float line,
float lineEnd,
float column,
float columnEnd,
char direction,
float border)
Deprecated.
|
void |
setPositionSize(int line,
int column,
int height,
int length,
char direction)
Deprecated.
|
static final int version
ReplaceAlias_ifc
now contains getReplacerAlias()
.
It is an extra class for a ReplacerAlias given independent of the graphic.
#createImplWidget_Gthread()
. It is a better name.
#addDataReplace(Map)
, #replaceDataPathPrefix(String)
.
using alias in the GralWidget.setDataPath(String)
. The resolving of the alias is done
only if the datapath is used.
addCheckButton(String, String, String, String, GralColor, GralColor, GralColor)
#setContextMenu(GralWidget, GralMenu)
.
addText(String)
simple with standards.
createWindow(String, String, int)
now not only exclusive or not
but with some control bits GralWindow_ifc.windExclusive
etc.
#addTextBox(GralWidget, boolean, String, char)
:
A Text box with more as one line. The TextField has only one line.
#createCompositeBox()
. It is a box with its own PanelMng
which is located in an area of another panel. (Composite)
#remove(GralGridBuild_ifc)
and remove(GralWidget)
to remove widgets, for dynamic views.
#createWindow(String, boolean)
instead createModalWindow(String).
This method should be used for any sub-windows in the application. The window position is determined
inside the current window with the known setPositionSize(int, int, int, int, char)
functionality.
The #createWindow(int, int, int, int, VariableContainer_ifc)
with absolute coordinates
may be deprecated. (Is it necessary to create a window outside the own borders? )
static final int propZoomedPanel
static final int propGridZoomedPanel
GralUserAction setMainKeyAction(GralUserAction userKeyAction)
GralUserAction.userActionGui(int, GralWidget, Object...)
is invoked on any key down event,
exclusive some graphic implementation specific keys. The user should return false in this method
if the key is not used and should not be blocked for widget specific key listeners.userKeyAction
- The user action to process main keys.ReplaceAlias_ifc getReplacerAlias()
void registerPanel(GralPanel_ifc panel)
selectPanel(String)
-Routine
name
- Name of the panel.panel
- The panel. It should be from the correct type of the base-graphic-system.
If it the instance is fault, a ClassCastException is thrown.GralPanel_ifc selectPanel(java.lang.String sName)
#registerPanel(String, Object)
.void selectPanel(GralPanel_ifc panel)
void selectPrimaryWindow()
@Deprecated void setPositionSize(int line, int column, int height, int length, char direction)
line
- y-Position in y-Units, count from top of the box.
It is either the top or bottom line of the widget, depending on height.
If < 0, then the previous position is valid furthermore.column
- x-Position in x-Units, count from left of the box.
If < 0, then the previous position is valid furthermore.heigth
- The height of the line. If <0, then the param line respectively the current line
will be used as bottom line of the next widget, and (line-height) is the top line.
If 0 then the last value of height is taken furthermore.length
- The number of columns. If <0, then the param column is the right column,
and column-length is the left column. If 0 then the last value of length is not changed.direction
- direction for a next widget, use 'r', 'l', 'u', 'd' for right, left, up, down@Deprecated void setPosition(float line, float lineEndOrSize, float column, float columnEndOrSize, char direction)
framePos
- The given frame.line
- The line. Positive: from top, negative: from end.lineEndOrSize
- The position of end of widget. negative or 0: from end. 0: the end position of Panel.
see GralPos.same
etc.column
- columnEndOrSize
- @Deprecated void setPosition(GralPos framePos, float line, float lineEnd, float column, float columnEnd, char direction)
framePos
- The given frame.line
- The linelineEnd
- column
- columnEnd
- @Deprecated void setPosition(GralPos framePos, float line, float lineEnd, float column, float columnEnd, char direction, float border)
@Deprecated void setPosition(float line, float lineEnd, float column, float columnEnd, char direction, float border)
GralPos
.line
- either position or combinded with GralPos.refer
etc.lineEnd
- column
- columnEnd
- direction
- border
- @Deprecated void setFinePosition(int y, int yFrac, int yEnd, int yEndFrac, int x, int xFrac, int xEnd, int xEndFrac, char direction, int border, int borderFrac, GralPos frame)
setPositionSize(int, int, int, int, char)
, but the positions can be in a fine division.y
- The line.yFrac
- Number between 0..9 for fine positioning in the grid step.yEnd
- yEndFrac
- Number between 0..9 for fine positioning in the grid step.x
- xFrac
- Number between 0..9 for fine positioning in the grid step.xEnd
- xEndFrac
- Number between 0..9 for fine positioning in the grid step.direction
- Direction of the next position if that is not given than or GralPos.next
is given than.
A value other then r, l, u, d let the direction unchanged from previous call.@Deprecated GralPos getPositionInPanel()
GralWidget.ImplAccess
.GralMng.pos()
is reused there. Therefore the implementation of the method
returns a cloned instance.GralMng.pos()
.GralButton addButton(java.lang.String sName, GralUserAction action, java.lang.String sCmd, java.lang.String sDataPath, java.lang.String sButtonText)
sButtonText
- text in the buttonheight
- in grid-unitswidth
- in grid-unigssCmd
- The command string will be transfered to the action-methodsUserAction
- The user action shoult be registered before
calling registerUserAction(String, GralUserAction)
sName
- GralButton addButton(java.lang.String sName, GralUserAction action, java.lang.String sButtonText)
sButtonText
- text in the buttonheight
- in grid-unitswidth
- in grid-unigssCmd
- The command string will be transfered to the action-methodsUserAction
- The user action shoult be registered before
calling registerUserAction(String, GralUserAction)
sName
- GralButton addSwitchButton(java.lang.String sName, GralUserAction action, java.lang.String sCmd, java.lang.String sDataPath, java.lang.String sButtonText, GralColor colorOff, GralColor colorOn)
sName
- action
- sCmd
- sShowMethod
- sDataPath
- sButtonText
- GralButton addSwitchButton(java.lang.String sName, java.lang.String sButtonTextOff, java.lang.String sButtonTextOn, GralColor colorOff, GralColor colorOn)
GralButton.isOn()
or GralWidget.getValue()
.sName
- sButtonText0
- sButtonText1
- color0
- color1
- GralButton addCheckButton(java.lang.String sName, java.lang.String sButtonTextOn, java.lang.String sButtonTextOff, java.lang.String sButtonTextDisabled, GralColor colorOn, GralColor colorOff, GralColor colorDisabled)
GralButton.isOn()
or GralWidget.getValue()
.sName
- sButtonText0
- sButtonText1
- color0
- color1
- GralLed addLed(java.lang.String sName, java.lang.String sDataPath)
sName
- GralValueBar addValueBar(java.lang.String sName, java.lang.String sDataPath)
GralWidget addSlider(java.lang.String sName, GralUserAction action, java.lang.String sShowMethod, java.lang.String sDataPath)
@Deprecated GralTable addTable(java.lang.String sName, int height, int[] columnWidths)
GralTable
and call GralTable#setToPanel(GralMngBuild_ifc)
GralWidget.setActionChange(GralUserAction)
with
GralTableLine_ifc
KeyCode
GralMng.getRegisteredUserAction(String)
for "keyAction" is tried to get and then invoked with cmd = "key" and the key code in values[0].
This central keyAction may be used for application centralized keys without association to the table itself.sName
- register name, used for GuiPanelMngWorkingIfc#insertInfo(String, int, String).
height
- The height in grid units for the appearancecolumnWidths
- Array with width of the columns.
Each column has a fix default width per construction.
It may or may not a fix widht, it may able to change by mouse actions,
adequate to the possibilities of the used graphic base system.void createImplWidget_Gthread(GralWidget widgg)
GralWidget#setToPanel(GralMngBuild_ifc)
.
It is not intent to call from the application immediately. Use GralWidget#setToPanel(GralMngBuild_ifc)
instead.
The implementation of this routine checks the type of the widget and invokes the proper routine
for the implementation graphic in the implementation level of the GralMng
.widgg
- The widget should be initialized already.GralWidget addText(java.lang.String sText)
text
- @Deprecated GralWidget addText(java.lang.String sText, char size, int color)
sText
- The textsize
- size, 'A' is small ...'E' is large.color
- The color as RGB-value in 3 Byte. 0xffffff is white, 0xff0000 is red.GralWidget addText(java.lang.String sText, int origin, GralColor textColor, GralColor BackColor)
sText
- origin
- Origin, use char 1..9 for 1 top-left, 2 top-middle, ... 5 middle, 9 bottom-right.textColor
- BackColor
- java.lang.Object addImage(java.lang.String sName, java.io.InputStream imageStream, int height, int width, java.lang.String sCmd)
@Deprecated void addLine(int colorValue, float xa, float ya, float xe, float ye)
GralCanvasArea
was created. Use that.XXXSwtCanvasStorePanel
. This class stores the line coordinates and conditions
and draws it as background if drawing is invoked.colorValue
- The value for color, 0xffffff is white, 0xff0000 is red.xa
- start of line relative to current position in grid units.
The start is relative to the given position! Not absolute in window!ya
- start of line relative to current position in grid units.xe
- end of line relative to current position in grid units.ye
- end of line relative to current position in grid units.void addLine(GralColor color, java.util.List<GralPoint> points)
XXXSwtCanvasStorePanel
. This class stores the line coordinates and conditions
and draws it as background if drawing is invoked.color
- points
- GralTextField addTextField(java.lang.String name, boolean editable, java.lang.String prompt, java.lang.String promptStylePosition)
name
- The registering name to get the value from outside or set the content.editable
- true then an input field, false only for showprompt
- If not null, then this prompt text is shown above, left, rigthpromptStylePosition
- Position and size of description label:
upper case letter: normal font, lower case letter: small font
'l' left, 't' top (above field)GralTextBox addTextBox(java.lang.String name, boolean editable, java.lang.String prompt, char promptStylePosition)
GralMng_ifc.getValue(String)
with the given registering name.
#addActionFocused(String, GralUserAction, String)
can be called after invoking this method (any time, able to change). The GralUserAction#userActionGui(String, String, GralWidget, Map)
is called in the GUI-thread before the field gets the focus.
#addActionFocusRelease(String, GralUserAction, String)
can be called after invoking this method (any time, able to change). The adequate userActionGui is called after editing the field.
GralWidget#action
refers an instance of type GralUserAction
, than it is the action on finish editing.sName
- The registering namewidgetInfo
- The informations about the textfield.editable
- true than edit-able, false to show contentprompt
- If not null, than a description label is shownpromptStylePosition
- Position and size of description label:
upper case letter: normal font, lower case letter: small font
'l' left, 't' top (above field)GralHtmlBox addHtmlBox(java.lang.String name)
sName
- The registering nameGralCurveView addCurveViewY(java.lang.String sPosName, int nrofXvalues, GralCurveView.CommonCurve common, TimedValues tracksValues)
sName
- Its registered namedyGrid
- height in grid-unitsdxGrid
- width in grid-unitsnrofXvalues
- depth of the buffer for x-values. It should be 6..20 times of dx.nrofTracks
- number of curves (tracks).GralTextField addFileSelectField(java.lang.String name, java.util.List<java.lang.String> listRecentFiles, java.lang.String startDirMask, java.lang.String prompt, java.lang.String promptStylePosition)
name
- Name of the widgetlistRecentFiles
- maybe null, a list which stores and offers selected files.defaultDir
- The start directory on open the dialog.startDirMask
- The start dir and selection mask. Both are separated with a ':' character
in this string. See GralFileDialog_ifc
.
If the last or only one char is '/' then a directory should be selected.
For example "D:/MyDir:*.txt" shows only .txt-files to select in the dialog starting from d:/MyDir.prompt
- Prompt for the text field.promptStylePosition
- GralWidget addFocusAction(java.lang.String sName, GralUserAction action, java.lang.String sCmdEnter, java.lang.String sCmdRelease)
sName
- The name of the widget. It should be registered calling any add... method.action
- sCmdEnter
- sCmdRelease
- void addFocusAction(GralWidget widgetInfo, GralUserAction action, java.lang.String sCmdEnter, java.lang.String sCmdRelease)
widgetInfo
- action
- sCmdEnter
- sCmdRelease
- void registerWidget(GralWidgetBase widgd)
widgd
- int getColorValue(java.lang.String sName)
sName
- supported: red, green, blue, yellowGralColor getColor(java.lang.String sName)
sName
- supported: red, green, blue, yellowvoid repaint()
void repaintCurrentPanel()
void registerUserAction(java.lang.String name, GralUserAction action)
GralCfgBuilder#buildGui(org.vishia.msgDispatch.LogMessage, int)
is invoked.
The user actions can be called in any specialized context.
name
- Name of the actionaction
- what to do.GralUserAction getRegisteredUserAction(java.lang.String name)
java.util.Set<java.util.Map.Entry<java.lang.String,GralWidget>> getShowFields()
GralPanelContent createCompositeBox(java.lang.String name)
GralPanelContent createGridPanel(java.lang.String namePanel, GralColor backGround, int xG, int yG, int xS, int yS)
namePanel
- backGround
- xG
- yG
- xS
- yS
- boolean remove(GralPanel_ifc compositeBox)
compositeBox
- boolean remove(GralWidget widget)
GralWindow createWindow(java.lang.String name, java.lang.String title, int windProps)
GralWindow_setifc.setWindowVisible(boolean)
or
GralMng_ifc#setWindowsVisible(GralWindow_ifc, GralPos)
.
The position and size of the window is set with the adequate strategy like all other widget:
using setPositionSize(int, int, int, int, char)
.title
- Title of the window, may be null, then without title bar.windProps
- Or of the static variables GralWindow_ifc.windExclusive
etc.GralInfoBox createTextInfoBox(java.lang.String name, java.lang.String title)
GralInfoBox createHtmlInfoBox(java.lang.String posName, java.lang.String title, boolean onTop)
void buildCfg(GralCfgData data, java.io.File fileCfg)
cfgBuilder
- void setDesignMode(boolean mode)
mode
- java.lang.String saveCfg(java.io.Writer dest)
dest
- GralFileDialog_ifc createFileDialog()