public class GralWindow extends GralPanelContent 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 |
|---|---|
protected class |
GralWindow.ActionResizeOnePanel
Standard action for resizing, used if the window contains one panel.
|
static class |
GralWindow.GraphicImplAccess
This class is not intent to use from an application, it is the super class for the implementation layer
to access all necessary data and methods with protected access rights.
|
GralPanelContent.ImplAccess, GralPanelContent.MethodsCalledbackFromImplementationGralWidget.ActionChangeSelect, GralWidget.ConfigData, GralWidget.DynamicDataGralWidget_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) GralGraphicTimeOrder |
createImplWindow
Code snippet for initializing the GUI area (panel).
|
protected GralMenu |
menuBarGral |
protected GralUserAction |
mouseAction
|
protected GralUserAction |
resizeAction
This action is called whenever the window is resized by user handling on GUI
and the window is determined as
GralWindow_ifc.windResizeable. |
static java.lang.String |
version
Version, history and license.
|
protected boolean |
visibleFirst |
(package private) int |
windProps
Or of some wind... constants.
|
protected boolean |
XXXbVisible
State of visible, fullScreen, close set by
GralWidget.setVisible(boolean), setFullScreen(boolean),
closeWindow() called in another thread than the graphic thread. |
bGridZoomed, bZoomed, canvas, primaryWidget, widgetList, widgetsToResize_wdgImpl, bEditable, bHasFocus, bShouldInitialize, buildMng, bVisibleState, cfg, contextMenu, dateUser, dyda, htmlHelp, itsMng, lastTimeSetVisible, name, repaintDelay, repaintDelayMax, sCmd, sFormat, sToolTip, sVersion, whatIswindConcurrently, windExclusive, windHasMenu, windIsMain, windOnTop, windRemoveOnClose, windResizeablesVersion| Constructor and Description |
|---|
GralWindow(java.lang.String posString,
java.lang.String nameWindow,
java.lang.String sTitle,
int windProps)
Constructs a window.
|
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() |
void |
create(java.lang.String awtOrSwt,
char size,
LogMessage log,
GralGraphicTimeOrder initializeInGraphicThread)
Creates the window.
|
GralMenu |
getMenuBar()
Gets the menu bar to add a menu item.
|
GralRectangle |
getPixelPositionSize() |
boolean |
isWindowsVisible() |
boolean |
remove()
This overridden form of
Removeable.remove() removes all widgets of this panel. |
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 |
setResizeAction(GralUserAction action)
Sets an action which is invoked if the whole window is resized by user handling on the window borders.
|
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.
|
addWidget, createImplWidget_Gthread, getTextFrom, getWidget, getWidgetImplementation, getWidgetList, removeWidget, setPrimaryWidget, setTextIn, setVisibleState, toString, widgetList, XXXsetFocusGThreadchgPos, clearShowParam, getActionChange, getActionChangeStrict, getActionDrag, getActionDrop, getActionFocused, getActionShow, getBackColor, getCfgElement, getCmd, getCmd, getContentIdent, getContentInfo, getContextMenu, getData, getDataIx, getDataPath, getDataPath, getFloatValue, getFormat, getGralWidget, getHtmlHelp, getImpl, getItsPanel, getLongValue, getName, getShowMethod, getShowParam, getsToolTip, getText, getValue, getVariable, getVariableFromContentInfo, gralMng, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, pos, refreshFromVariable, refreshFromVariable, registerWidget, repaint, repaint, requestNewValueForVariable, setActionChange, setActionFocused, setActionMouse, setActionShow, setBackColor, setBackgroundColor, setBoundsPixel, setCfgElement, setCmd, setContentIdent, setContentInfo, setData, setDataIx, setDataPath, setDragEnable, setDropEnable, setEditable, setFocus, setFocus, setForegroundColor, setFormat, setHtmlHelp, setLineColor, setLongValue, setMinMax, setPanelMng, setPrimaryWidgetOfPanel, setText, setTextColor, setToolTip, setToPanel, setValue, setValue, setValue, setValue, setVisible, setVisibleStateWidget, specifyActionChange, specifyContextMenu, stop, XXXgetPixelPositionSize, XXXgetWidgetImplementation, XXXremoveWidgetImplementation, XXXrepaintGthread, XXXsetVisibleGThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateImplWidget_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, setVisiblepublic static final java.lang.String version
create(String, char, LogMessage, GralGraphicTimeOrder) 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, GralGraphicTimeOrder) to create either the primary window inclusive the whole graphic machine,
or create any secondary window.
GralWindow.GraphicImplAccess is now derived from GralPanelContent.ImplAccess
because this class is derived from that too. Parallel inheritance.
setFullScreen(boolean) now works.
GralWidget.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 GralWidget.pos(), the member 'posWindow' is removed.
setResizeAction(GralUserAction) and setMouseAction(GralUserAction)
for operations with the whole window.
resizeAction
int windProps
protected GralUserAction resizeAction
GralWindow_ifc.windResizeable.
Per default an instance of GralWindow.ActionResizeOnePanel is called.
See GralWindow_ifc.setResizeAction(GralUserAction).protected GralUserAction actionOnCloseWindow
protected GralUserAction mouseAction
protected GralMenu menuBarGral
protected boolean visibleFirst
protected boolean XXXbVisible
GralWidget.setVisible(boolean), setFullScreen(boolean),
closeWindow() called in another thread than the graphic thread. It is stored here
and executed in the GralWidgImpl_ifc.repaintGthread().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 GralWidgImpl_ifc.repaintGthread().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 GralWidgImpl_ifc.repaintGthread().GralGraphicTimeOrder 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.public GralWindow(java.lang.String posString, java.lang.String nameWindow, java.lang.String sTitle, int windProps)
posString - the position relative to a given position of the parent window. "!" on top level window.nameWindow - sTitle - windProps - See GralWindow_ifc.windResizeable etc.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 void create(java.lang.String awtOrSwt, char size, LogMessage log, GralGraphicTimeOrder initializeInGraphicThread)
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.awtOrSwt - 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()
GralPanelContentRemoveable.remove() removes all widgets of this panel.
It includes the disposition of the widgets in the graphic. It is done by invocation
GralWidget.remove().remove in interface Removeableremove in class GralPanelContentpublic 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 setResizeAction(GralUserAction action)
GralWindow_ifcsetResizeAction in interface GralWindow_ifcaction - The GralUserAction.userActionGui(int, GralWidget, Object...) will be called
without parameter.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_getifc