public class GralWindow extends GralWidget implements GralWindow_ifc
GralPos#pos of the baseclass is the position of the window derived from any other
Position.| Modifier and Type | Class and Description |
|---|---|
static class |
GralWindow.WindowImplAccess
This class is not intent to use from an application.
|
GralWidget.ActionChangeSelect, GralWidget.ConfigData, GralWidget.DynamicData, GralWidget.ImplAccessGralWidgetBase.GralWidgComposite, GralWidgetBase.TimeOrderCreateImplWidgetGralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen| Modifier and Type | Field and Description |
|---|---|
protected GralUserAction |
actionOnCloseWindow |
protected boolean |
bFullScreen
State of visible, fullScreen, close set by
GralWidget.setVisible(boolean), setFullScreen(boolean),
closeWindow() called in another thread than the graphic thread. |
protected boolean |
bShouldClose
State of visible, fullScreen, close set by
GralWidget.setVisible(boolean), setFullScreen(boolean),
closeWindow() called in another thread than the graphic thread. |
(package private) GralGraphicOrder |
createImplWindow
Code snippet for initializing the GUI area (panel).
|
GralPanelContent |
mainPanel |
protected GralMenu |
menuBarGral |
protected GralUserAction |
mouseAction
|
static java.lang.String |
version
Version, history and license.
|
protected boolean |
visibleFirst |
(package private) int |
windProps
Or of some wind... constants.
|
_wdgImpl, bEditable, bShouldInitialize, cfg, contextMenu, dateUser, dyda, htmlHelp, lastTimeSetVisible, redrawDelayMax, redrawtDelay, sCmd, sFormat, showWidgetInfo, sToolTip, sVersion, whatIs, XXXbuildMng_cdata, _wdgPos, bVisibleState, gralMng, name, pixSizewindConcurrently, windExclusive, windHasMenu, windIsMain, windMinimizeOnClose, windOnTop, windRemoveOnClose, windResizeablesVersion| Constructor and Description |
|---|
GralWindow(GralPos currPos,
java.lang.String posName,
java.lang.String sTitle,
int windProps)
Constructs a window with an empty
mainPanel |
GralWindow(GralPos refPos,
java.lang.String posName,
java.lang.String sTitle,
int windProps,
GralMng gralMng)
Deprecated.
|
GralWindow(GralPos currPos,
java.lang.String posString,
java.lang.String nameWindow,
java.lang.String sTitle,
int windProps) |
GralWindow(java.lang.String posString,
java.lang.String nameWindow,
java.lang.String sTitle,
int windProps,
GralMng mng,
java.lang.Object panelComposite)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMenuBarItemGThread(java.lang.String nameMenu,
java.lang.String sMenuPath,
GralUserAction action)
Deprecated.
|
void |
closeWindow() |
boolean |
createImplWidget_Gthread()
Implementation of the creation of implementation graphic for the GralWindow.
|
GralWidgetBase_ifc |
getFocusedWidget()
Default implementation for a widget without children
|
GralPanelContent |
getItsPanel()
Deprecated.
create new
SwtFactory or new AwtFactory and then
call the overridden operation org.vishia.gral.ifc.GralFactory#createGraphic(GralWindow, char, LogMessage).
You can then use also any other Factory for the graphic system for any other graphic system. |
GralMenu |
getMenuBar()
Gets the menu bar to add a menu item.
|
GralRectangle |
getPixelPositionSize() |
boolean |
isWindowsVisible() |
boolean |
remove()
Removes the widget from the lists in its panel and from the graphical representation.
|
void |
removeImplWidget_Gthread()
Removes the implementation widget, maybe to re-create with changed properties
or also if the GralWidget itself should be removed.
|
void |
reportAllContent(java.lang.Appendable out) |
void |
reportAllContentImpl(java.lang.Appendable out) |
void |
setFullScreen(boolean val) |
void |
setMouseAction(GralUserAction action)
Sets an action which is invoked if any mouse button is pressed in the windows area on the screen.
|
void |
setTitle(java.lang.String sTitle) |
void |
setWindowVisible(boolean visible)
Controls whether the whole window, which contains this panel, should be visible or not.
|
void |
specifyActionOnCloseWindow(GralUserAction action)
Sets an action which is invoked if the window is set invisible or it is disposed.
|
int |
windProps() |
clearShowParam, getActionChange, getActionChangeStrict, getActionDrag, getActionDrop, getActionFocused, getActionShow, getBackColor, getCfgElement, getCmd, getCmd, getContentIdent, getContentInfo, getContextMenu, getData, getDataIx, getDataPath, getDataPath, getFloatValue, getFormat, getGralWidget, getHtmlHelp, getImplAccess, getImplWidget, getLongValue, getName, getShowMethod, getShowParam, getsToolTip, getText, getValue, getVariable, getVariableFromContentInfo, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, redraw, redraw, redraw, redraw1, redrawOnlyDynamics, refreshFromVariable, refreshFromVariable, requestNewValueForVariable, setActionChange, setActionFocused, setActionMouse, setActionShow, setBackColor, setBackgroundColor, setBoundsPixel, setCfgElement, setCmd, setContentIdent, setContentInfo, setData, setDataIx, setDataPath, setDragEnable, setDropEnable, setEditable, setFocus, setFocus, setFocusedWidget, setForegroundColor, setFormat, setHtmlHelp, setLineColor, setLongValue, setMinMax, setPrimaryWidgetOfPanel, setText, setTextColor, setToolTip, setToPanel, setValue, setValue, setValue, setValue, setVariable, setVisible, specifyActionChange, specifyContextMenu, stop, toString, toString, XXXgetWidgetImplementation, XXXremoveWidgetImplementation, XXXrepaintGthread, XXXsetFocusGThreadcheckImplWidgetCreation, createImplWidget, gralMng, hasFocus, pos, resizePostPreparation, setFocusedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActionChange, getBackColor, getCmd, getContentIdent, getContentInfo, getData, getDataPath, getImplWidget, isChanged, isEditable, isGraphicDisposed, isNotEditableOrShouldInitialize, redraw, redraw, refreshFromVariable, refreshFromVariable, setBackColor, setBackgroundColor, setBoundsPixel, setCmd, setContentIdent, setData, setDataPath, setEditable, setFocus, setForegroundColor, setHtmlHelp, setLineColor, setText, setTextColorgetImplAccess, getName, gralMng, isInFocus, isVisible, pos, setFocus, setFocused, setFocusedWidget, setVisiblepublic static final java.lang.String version
GralWidgComposite#resizeWidgets(GralRectangle).
#create(String, char, LogMessage, GralGraphicOrder) now needs an obligate argument which can be null
for the first callback routine for graphic initializing.
specifyActionOnCloseWindow(GralUserAction) instead 'setActionOnSettingInvisible', more expressive name.
#create(String, char, LogMessage, GralGraphicOrder) to create either the primary window inclusive the whole graphic machine,
or create any secondary window.
GraphicImplAccess is now derived from GralPanelContent.ImplAccess
because this class is derived from that too. Parallel inheritance.
setFullScreen(boolean) now works.
#setToPanel(GralMngBuild_ifc)
is supported.
#actionResizeOnePanel
GralWindow_ifc in form of calling
GralMng_ifc#setInfo(GralWidget, int, int, Object, Object). This methods
can be called in any thread, it may be stored using
GralGraphicThread#addRequ(org.vishia.gral.base.GralWidgetChangeRequ).
addMenuBarItemGThread(String, String, GralUserAction) copied
from GralPrimaryWindow_ifc. The capability to have a menu bar
should be enabled for sub-windows too. To support regularity, the property bit GralWindow_ifc.windHasMenu
is created. The property whether a window has a menu bar or not should be given on creation already.
windProps now stored for all implementations here.
visibleFirst: Maybe a problem while creation a menu bar in SWT (?)
GralWindow_ifc.windExclusive etc. as properties for creation a window.
GralPanelContent inherits GralWidget
and this class has a GralWidgetBase.pos(), the member 'posWindow' is removed.
#setResizeAction(GralUserAction) and setMouseAction(GralUserAction)
for operations with the whole window.
#resizeAction
int windProps
public GralPanelContent mainPanel
protected GralUserAction actionOnCloseWindow
protected GralUserAction mouseAction
protected GralMenu menuBarGral
protected boolean visibleFirst
protected boolean bFullScreen
GralWidget.setVisible(boolean), setFullScreen(boolean),
closeWindow() called in another thread than the graphic thread. It is stored here
and executed in the GralWidgImplAccess_ifc.redrawGthread().protected boolean bShouldClose
GralWidget.setVisible(boolean), setFullScreen(boolean),
closeWindow() called in another thread than the graphic thread. It is stored here
and executed in the GralWidgImplAccess_ifc.redrawGthread().GralGraphicOrder createImplWindow
@Deprecated
public GralWindow(java.lang.String posString,
java.lang.String nameWindow,
java.lang.String sTitle,
int windProps,
GralMng mng,
java.lang.Object panelComposite)
nameWindow - windProps - mng - panelComposite - The implementing instance for a panel.@Deprecated public GralWindow(GralPos refPos, java.lang.String posName, java.lang.String sTitle, int windProps, GralMng gralMng)
mainPanelrefPos - The parent will be set related to to the screen: GralMng.screen.
The internal used GralWidgetBase.pos() is cloned from this refPos instance (as for all Widgets)..
After construction the refPos will be set to the whole main panel of this window.posName - possible position and name. Syntax [@sTitle - can be null then the name is used as title without trailing "Win" or "Window".windProps - See GralWindow_ifc.windResizeable etc.gralMng - the gral Mng should be the same as in refPos, hence this is deprecated.public GralWindow(GralPos currPos, java.lang.String posName, java.lang.String sTitle, int windProps)
mainPanelrefPos - The parent will be set related to to the screen: GralMng.screen.
The internal used GralWidgetBase.pos() is cloned from this refPos instance (as for all Widgets)..
After construction the refPos will be set to the whole main panel of this window.posName - possible position and name. Syntax [@sTitle - can be null then the name is used as title without trailing "Win" or "Window".windProps - See GralWindow_ifc.windResizeable etc.public GralWindow(GralPos currPos, java.lang.String posString, java.lang.String nameWindow, java.lang.String sTitle, int windProps)
public void specifyActionOnCloseWindow(GralUserAction action)
GralWindow_ifcGralWindow_ifc.windRemoveOnClose the window is disposed or it is set invisible without disposing
if the close action is done by the user. In both cases this action will be invoked.specifyActionOnCloseWindow in interface GralWindow_ifcaction - The GralUserAction.userActionGui(int, GralWidget, Object...) will be called
without parameter.public GralPanelContent getItsPanel()
SwtFactory or new AwtFactory and then
call the overridden operation org.vishia.gral.ifc.GralFactory#createGraphic(GralWindow, char, LogMessage).
You can then use also any other Factory for the graphic system for any other graphic system.GralGraphicThread#isRunning() already then it is a second window.
If the graphic thread is not running, it would be started and this is the primary window.
The it invokes GralFactory#createGraphic(GralWindow, char, LogMessage, String).
The application should not know whether it is the primary or any secondary window.
That helps for applications which are started from a Gral graphic application itself without an own operation system process.
GralGraphicThread#runGraphicThread()
getItsPanel in class GralWidgetawtOrSwt - see GralFactory#createGraphic(GralWindow, char, LogMessage, String)size - 'A'..'G', 'A' is a small size, 'G' is the largest.log - maybe null. If not given a LogMessageStream with System.out will be created. For internal logging.initializeInGraphicThread - maybe null, an order which will be executed in the graphic thread after creation of the window.public void setWindowVisible(boolean visible)
GralWindow_setifcsetWindowVisible in interface GralWindow_setifcpublic void closeWindow()
closeWindow in interface GralWindow_setifcpublic boolean remove()
GralWidgetBaseGralWidgImplAccess_ifc.removeWidgetImplementation()
is called which is overridden in the graphic implementation sources in a specific kind
(SWT: for example SwtTextFieldWrapper.removeWidgetImplementation())
It calls the protected GralWidgetBase.GralWidgComposite.removeWidget(GralWidgetBase)
and also GralMng.deregisterWidgetName(GralWidgetBase).remove in class GralWidgetBasepublic GralRectangle getPixelPositionSize()
getPixelPositionSize in interface GralWindow_getifc@Deprecated
public void addMenuBarItemGThread(java.lang.String nameMenu,
java.lang.String sMenuPath,
GralUserAction action)
getMenuBar() and then GralMenu.addMenuItem(String, String, GralUserAction)GralWindowImpl_ifc#addMenuBarArea9ItemGThread(String, String, GralUserAction)
with the known GralWidget._wdgImpl instance
to invoke the graphic implementation layer method for the window.addMenuBarItemGThread in interface GralWindow_ifcsMenuPath - Menu position. Use slash as separator, use & for hot key.
For example "&edit/&search/co&ntinue" creates a menu 'edit' or uses the existing one in the top level (menu bar),
then creates the search menu item as pull down in menu bar, and then 'continue' with 'n' as hot key as sub-menu.
It is stored in GralWidget.sDataPathaction - called on menu activation.public GralMenu getMenuBar()
GralMng.createMenuBar(GralWindow).
If the window has a menu bar already, it is stored in the reference menuBarGral.getMenuBar in interface GralWindow_ifcpublic void setMouseAction(GralUserAction action)
GralWindow_ifcsetMouseAction in interface GralWindow_ifcaction - The GralUserAction.userActionGui(int, GralWidget, Object...) will be called
with parameter key: The mouse key. params[0]: Instance of GralRectangle with mouse coordinates.public void setTitle(java.lang.String sTitle)
setTitle in interface GralWindow_ifcpublic void setFullScreen(boolean val)
setFullScreen in interface GralWindow_setifcsetFullScreen in interface GralWindow_ifcpublic boolean isWindowsVisible()
isWindowsVisible in interface GralWindow_getifcpublic GralWidgetBase_ifc getFocusedWidget()
GralWidgetgetFocusedWidget in interface GralWidgetBase_ifcgetFocusedWidget in class GralWidgetpublic int windProps()
public void reportAllContent(java.lang.Appendable out)
public void reportAllContentImpl(java.lang.Appendable out)
throws java.io.IOException
java.io.IOExceptionpublic boolean createImplWidget_Gthread()
throws java.lang.IllegalStateException
createImplWidget_Gthread in class GralWidgetjava.lang.IllegalStateException - This routine can be called only if the graphic implementation widget is not
existing. It is one time after startup or more as one time if #removeWidgetImplementation()
was called.public void removeImplWidget_Gthread()
GralMng.runGraphicThread() and hence package private.removeImplWidget_Gthread in class GralWidget