public class SwtSubWindow extends GralWindow.WindowImplAccess implements GralWidgImplAccess_ifc
Shell
to implement a GralWindow
.
The following inheritance structure is given (hint: only readable in Javadoc, not in src, because of length of link controls
To access theSwtSubWindow
<>-->SwtPanel
<>-->GralPanelContent.ImplAccess
<>-->GralWidget.ImplAccess
| | +<*>-->SwtPanel#swtGralWindow
+<*>---------------------------------------+ | , +<*>-->GralWindow.WindowImplAccess#gralWindow
:GralWindow
<>-->GralPanelContent
<>-->GralWidget
^SwtWindowImplAccess
<>-------------+ SwtSubWindow<>--->SwtPanel<>--->GralPanelContent.ImplAccess<>---->GralWidget.ImplAccess | | | +-widgg-->GralWindow<>-->GralWidget | | +-widgg : GralPanelContent +-wdgimpl-->GralWidgetImpl_ifc<>-+ | +-panelComposite---> | +-tabFolder : TabFolder | +-itsTabSwt : TabItem | +-swtWidgWrapper--------------->SwtWidgetHelper<------------------------------------------------------------------ +-window-->swt.Shell<>-->Control<--widgetSwt-+ +-swtPanel--->SwtPanel +-menuBar--->SwtMenu
GralWindow.WindowImplAccess#gralWindow
you should use the aggregation SwtPanel#swtGralWindow
from the SwtPanel super class.Modifier and Type | Class and Description |
---|---|
(package private) class |
SwtSubWindow.ActionUserMenuItem |
Modifier and Type | Field and Description |
---|---|
protected boolean |
bFullScreen
State of the window in swt.
|
private boolean |
bHasMouseAction
Some flags to set an action listener a first time if the action is given.
|
private DisposeListener |
disposeListener |
private DisposeListener |
disposeListenerMainWindow |
protected SwtMenu |
menuBar |
(package private) MouseListener |
mouseListener
The mouseListener will be activated if
GralWindow.setMouseAction(GralUserAction) will be called. |
private ControlListener |
resizeListener
The resizeListener is always associated to the Shell (Swt Window).
|
protected ShellListener |
shellListener |
static java.lang.String |
sVersion
Version, history and license:
2016-08-31 Hartmut chg: Now disposes the window in
shellListener
2015-05-31 Hartmut setFocusGThread() now regards the GralPanelContent#setFocusedWidget(GralWidget) . |
(package private) SwtWidgetHelper |
swtWidgWrapper
It contains the association to the swt widget (Control) and the
SwtMng
and implements some methods of GralWidgImplAccess_ifc which are delegate from this. |
protected Shell |
window |
protected PaintListener |
windowPaintListener |
gralWindow
bRedrawOnlyDynamics, chgBitsDerived, chgColorBack, chgColorLine, chgColorText, chgCurrTab, chgEditable, chgFloat, chgFocus, chgFont, chgIntg, chgInvisible, chgObjects, chgPos, chgText, chgVisible, chgVisibleInfo, mngImpl, pixBounds, wdgimpl, widgg
version
Constructor and Description |
---|
SwtSubWindow(SwtMng mng,
GralWindow gralWindow)
Constructs a window (primary or sub window maybe for dialog etc.).
|
Modifier and Type | Method and Description |
---|---|
GralRectangle |
getPixelPositionSize() |
java.lang.Object |
getWidgetImplementation()
The Swt widget implementation is either the Shell itself which is a Composite,
or it is the TabFolder, which is created as only one Composite inside this shell composite.
|
void |
redrawGthread()
This method should be implemented in all Widget implementations of the adapter for the
underlying graphic system.
|
void |
removeWidgetImplementation()
Removes the graphical widget in the graphic.
|
void |
reportAllContentImpl(java.lang.Appendable out)
Reports the tree of content of the window from view of swt
Composite#getChildren() |
protected void |
resizeWindow() |
void |
setBoundsPixel(int x,
int y,
int dx,
int dy)
Returns the size of the working area without border, menu and title of the window.
|
boolean |
setFocusGThread()
Sets the focus to the widget.
|
void |
setVisibleGThread(boolean bVisible)
Sets the implementation widget(s) visible state.
|
(package private) void |
stop() |
void |
updateValuesForAction()
This operation should be called before any action is invoked in the user space.
|
actionOnCloseWindow, getMenubar, getTitle, getWindowProps, isFullScreen, mouseAction, resizeWidgets, shouldClose
acknChanged, actionShow, dyda, getActionChange, getChanged, gralMng, gralWidgetFromImplData, redrawOnlyDynamics, setDragEnable, setDropEnable, setPosBounds, setTextChanged, setVisibleState, XXXfocusGained
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPosBounds
public static final java.lang.String sVersion
shellListener
setFocusGThread()
now regards the GralPanelContent#setFocusedWidget(GralWidget)
.
GralWindow_ifc.windRemoveOnClose
#getPixelSize()
, chg: getPixelPositionSize()
in all implementations.
A swt.widget.Shell now returns the absolute position and the real size of its client area without menu and title bar.
#setResizeAction(GralUserAction)
now for both ctors, resize on subwindow works.
SwtMenu
. Instance refered with menuBar
#addMenuBarArea9ItemGThread(String, String, GralUserAction)
moved from
SwtPrimaryWindow
to this, because the capability to have a menu bar may needed on a sub-window too.
SwtSubWindow#SwtSubWindow(String, Display, String, int, GralMng)
now gets an int-property instead boolean 'exclusive'. A window has more as one property. Constants
are defined in GralWindow_ifc.windExclusive
etc.
shellListener
and disposeListener
added, but empty yet.
mouseListener
and GralWindow.setMouseAction(GralUserAction)
.
resizeListener
, #setResizeAction(GralUserAction)
etc:
Not this class is base of SwtPrimaryWindow
and contains this capabilities yet.
getPixelPositionSize()
and setBoundsPixel(int, int, int, int)
to support pixel-orientation too. Note it isn't a concept of GRAL anyway, but it is needed.
GralMng
as parameter of constructor: The GralWidget
refers it, it should be initialized.
removeWidgetImplementation()
.
GralWindow.setWindowVisible(boolean)
, it hasn't
the focus automatically.
GralWindow
.
Some methods GralWidget.setBackColor(GralColor, int)
, GralWindow.setWindowVisible(boolean)
etc added
to comply the interface and super class definitions.
GralPanelContent
.
SwtWidgetHelper swtWidgWrapper
SwtMng
and implements some methods of GralWidgImplAccess_ifc
which are delegate from this.protected Shell window
protected SwtMenu menuBar
protected boolean bFullScreen
private boolean bHasMouseAction
protected PaintListener windowPaintListener
protected ShellListener shellListener
private final DisposeListener disposeListener
private final DisposeListener disposeListenerMainWindow
MouseListener mouseListener
GralWindow.setMouseAction(GralUserAction)
will be called.
It calls this user action on resize.private final ControlListener resizeListener
GralWindow.WindowImplAccess.resizeWidgets(GralRectangle)
with the client area of the window.
This calls via GralWidgetBase.GralWidgComposite#resizeWidgets(GralRectangle, int)
the necessary setBounds() for all members, without any other resizeListener of components.
GralWidgetBase.resizePostPreparation()
.
That is called from GralWidgetBase.GralWidgComposite#resizeWidgets(GralRectangle, int)
from the window down to all widgets.
History:
2023-04 resize actions were removed.
before 2022-09 this action does the resizing itself.SwtSubWindow(SwtMng mng, GralWindow gralWindow)
name
- display
- title
- windProps
- gralMng
- java.io.IOException
public java.lang.Object getWidgetImplementation()
SwtPanel.panelSwtImpl
.getWidgetImplementation
in interface GralWidgImplAccess_ifc
getWidgetImplementation
in class GralWidget.ImplAccess
public void removeWidgetImplementation()
GralWidgImplAccess_ifc
removeWidgetImplementation
in interface GralWidgImplAccess_ifc
public GralRectangle getPixelPositionSize()
getPixelPositionSize
in interface GralWidgImplAccess_ifc
public void setBoundsPixel(int x, int y, int dx, int dy)
org.eclipse.swt.widgets.Scrollable#getClientArea()
to get the size.setBoundsPixel
in interface GralWidgImplAccess_ifc
void stop()
public boolean setFocusGThread()
GralWidgImplAccess_ifc
GralMng_ifc#setFocus(GralWidget)
.setFocusGThread
in interface GralWidgImplAccess_ifc
public void setVisibleGThread(boolean bVisible)
GralWidgImplAccess_ifc
GralWidgetBase.bVisibleState
too. Therewith it is able to quest GralWidget.isVisible()
in any thread.setVisibleGThread
in interface GralWidgImplAccess_ifc
bVisible
- true then the widget should be visible, false it is set to invisible.public void redrawGthread()
GralWidgImplAccess_ifc
#repaintRequ
redrawGthread
in interface GralWidgImplAccess_ifc
public void updateValuesForAction()
GralWidgImplAccess_ifc
updateValuesForAction
in interface GralWidgImplAccess_ifc
protected void resizeWindow()
public void reportAllContentImpl(java.lang.Appendable out) throws java.io.IOException
Composite#getChildren()
reportAllContentImpl
in class GralWindow.WindowImplAccess
out
- java.io.IOException