public static class DefWindowRenderer.WWindowImpl extends WLayoutedWidgetImpl<javafx.stage.Stage,javafx.scene.layout.BorderPane,org.eclipse.e4.ui.model.application.ui.basic.MWindow> implements WWindow<javafx.stage.Stage>
WWidget.WidgetState
WDragTargetWidget.DropData, WDragTargetWidget.DropType
logger
state
Constructor and Description |
---|
WWindowImpl(@NonNull org.eclipse.e4.ui.model.application.ui.basic.MWindow mWindow,
KeyBindingDispatcher dispatcher,
org.eclipse.e4.ui.model.application.MApplication application,
Logger logger)
Create a new window
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(int idx,
WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindowElement> widget)
Insert a child widget at the given index
|
void |
addChild(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindowElement> widget)
Append a child widget shown in the center
|
void |
addChildWindow(WWindow<javafx.stage.Stage> widget)
Add a child window
|
void |
addStyleClasses(java.util.List<java.lang.String> classnames)
Add a list of style class names used for a CSS class-Selector in your css
|
protected void |
bindProperties(javafx.stage.Stage widget)
Setup property bindings
|
void |
close()
Hide the window
|
protected javafx.stage.Stage |
createWidget() |
protected void |
doCleanup()
Cleanup code to run
|
protected javafx.scene.layout.BorderPane |
getWidgetNode() |
protected void |
init()
Initialize the widget (called by DI)
|
void |
removeChild(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindowElement> widget)
Remove a child widget
|
void |
removeChildWindow(@NonNull WWindow<javafx.stage.Stage> widget)
Remove the given child window
|
void |
setBottomTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
Set the bottom trim
|
void |
setFullscreen(java.lang.String fullScreen)
Make stage shown in fullscreen
|
void |
setHeight(int h)
set a new height
|
void |
setImageUrl(java.lang.String iconUri)
Set a window icon.
|
void |
setLeftTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
Set the left trim
|
void |
setMainMenu(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.menu.MMenu> menuWidget)
Set a main menu
|
void |
setOnCloseCallback(WCallback<WWindow<javafx.stage.Stage>,java.lang.Boolean> onCloseCallback)
Add a callback to veto the closing of the window
|
void |
setRightTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
Set the right trim
|
void |
setStyleId(java.lang.String id)
Set a style id used for an CSS ID-Selector in your css
|
void |
setTitle(java.lang.String title)
Set a new window title
|
void |
setTopTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
Set the top trim
|
void |
setVisible(boolean visible)
update the visibility of the window
|
void |
setWidth(int w)
set a new width
|
void |
setX(int _x)
set a new x coordinate
|
void |
setY(int _y)
set a new y coordinate
|
void |
show()
Show the window
|
addStyleClasses, createStaticLayoutNode, createStaticPane, getDropDroppedCallback, getStaticLayoutNode, getWeight, removeStyleClasses, removeStyleClasses, setDragDroppedCallback, setUserData
activate, bindProperty, deactivate, fireChange, getDomElement, getWidget, getWidgetState, isActive, registerActivationCallback, setDomElement, setPropertyChangeHandler, setWidgetState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, addStyleClasses, deactivate, getDomElement, getWidget, getWidgetState, isActive, registerActivationCallback, removeStyleClasses, removeStyleClasses, setDomElement, setPropertyChangeHandler, setWidgetState
@Inject public WWindowImpl(@Named(value="fx.rendering.domElement") @NonNull org.eclipse.e4.ui.model.application.ui.basic.MWindow mWindow, @Optional KeyBindingDispatcher dispatcher, org.eclipse.e4.ui.model.application.MApplication application, @Log Logger logger)
mWindow
- the window model elementdispatcher
- the keybinding dispatcherapplication
- the application model elementlogger
- the logger@PostConstruct protected void init()
WWidgetImpl
init
in class WWidgetImpl<javafx.stage.Stage,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
protected void doCleanup()
WWidgetImpl
doCleanup
in class WWidgetImpl<javafx.stage.Stage,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
protected javafx.stage.Stage createWidget()
createWidget
in class WWidgetImpl<javafx.stage.Stage,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
protected void bindProperties(javafx.stage.Stage widget)
WWidgetImpl
bindProperties
in class WWidgetImpl<javafx.stage.Stage,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
widget
- the widgetpublic void setMainMenu(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.menu.MMenu> menuWidget)
WWindow
setMainMenu
in interface WWindow<javafx.stage.Stage>
menuWidget
- the main menu widgetprotected javafx.scene.layout.BorderPane getWidgetNode()
getWidgetNode
in class WLayoutedWidgetImpl<javafx.stage.Stage,javafx.scene.layout.BorderPane,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
public void setOnCloseCallback(WCallback<WWindow<javafx.stage.Stage>,java.lang.Boolean> onCloseCallback)
WWindow
setOnCloseCallback
in interface WWindow<javafx.stage.Stage>
onCloseCallback
- the callback@Inject public void setX(@Named(value="x") int _x)
_x
- the new x@Inject public void setY(@Named(value="y") int _y)
_y
- the new y@Inject public void setWidth(@Named(value="width") int w)
w
- the new width@Inject public void setHeight(@Named(value="height") int h)
h
- the new height@Inject public void setVisible(@Named(value="visible") boolean visible)
visible
- the new visible value@Inject public void setFullscreen(@Named(value="persistedState_efx.window.fullscreen") @Optional java.lang.String fullScreen)
fullScreen
- the new statepublic void addStyleClasses(java.util.List<java.lang.String> classnames)
WWidget
addStyleClasses
in interface WWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindow>
addStyleClasses
in class WLayoutedWidgetImpl<javafx.stage.Stage,javafx.scene.layout.BorderPane,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
classnames
- list of classnamespublic void setStyleId(java.lang.String id)
WWidget
setStyleId
in interface WWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindow>
setStyleId
in class WLayoutedWidgetImpl<javafx.stage.Stage,javafx.scene.layout.BorderPane,org.eclipse.e4.ui.model.application.ui.basic.MWindow>
public void show()
WWindow
public void close()
WWindow
public void addChildWindow(WWindow<javafx.stage.Stage> widget)
WWindow
addChildWindow
in interface WWindow<javafx.stage.Stage>
widget
- the windowpublic void removeChildWindow(@NonNull WWindow<javafx.stage.Stage> widget)
WWindow
removeChildWindow
in interface WWindow<javafx.stage.Stage>
widget
- the window@Inject public void setTitle(@Named(value="localizedLabel") java.lang.String title)
title
- the new title@Inject public void setImageUrl(@Named(value="iconURI") @Optional java.lang.String iconUri)
iconUri
- the new iconpublic void setBottomTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
WWindow
setBottomTrim
in interface WWindow<javafx.stage.Stage>
trimBar
- the widget shown in the bottom trim areapublic void setLeftTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
WWindow
setLeftTrim
in interface WWindow<javafx.stage.Stage>
trimBar
- the widget shown in the left trim areapublic void setRightTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
WWindow
setRightTrim
in interface WWindow<javafx.stage.Stage>
trimBar
- the widget shown in the right trim areapublic void setTopTrim(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MTrimBar> trimBar)
WWindow
setTopTrim
in interface WWindow<javafx.stage.Stage>
trimBar
- the widget shown in the top trim areapublic void addChild(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindowElement> widget)
WWindow
public void removeChild(WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindowElement> widget)
WWindow
removeChild
in interface WWindow<javafx.stage.Stage>
widget
- the widgetpublic void addChild(int idx, WLayoutedWidget<org.eclipse.e4.ui.model.application.ui.basic.MWindowElement> widget)
WWindow