Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'demos/org.eclipse.fx.demo.customWindow.app')
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/.classpath7
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/.project28
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/Application.e4xmi77
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/META-INF/MANIFEST.MF29
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/OSGI-INF/services/theme-default.xml8
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/bin/.gitignore1
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/build.properties8
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/css/default.css1
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/fxml/MainFrame.fxml88
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/plugin.xml15
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/CustomWindowDemoConstants.java7
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/controller/MainFrameController.java28
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/HelloHandler.java17
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/ToggleTrimHandler.java28
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/part/Part1.java66
-rw-r--r--demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/themes/DefaultTheme.java9
16 files changed, 417 insertions, 0 deletions
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/.classpath b/demos/org.eclipse.fx.demo.customWindow.app/.classpath
new file mode 100644
index 000000000..a0c6dd9ce
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/.project b/demos/org.eclipse.fx.demo.customWindow.app/.project
new file mode 100644
index 000000000..589014786
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.fx.demo.customWindow.app</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/Application.e4xmi b/demos/org.eclipse.fx.demo.customWindow.app/Application.e4xmi
new file mode 100644
index 000000000..943f7fffb
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/Application.e4xmi
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_zBNCsZNxEeWDyN02lshAkQ" elementId="org.eclipse.e4.application" bindingContexts="_zBNCsJNxEeWDyN02lshAkQ">
+ <children xsi:type="basic:TrimmedWindow" xmi:id="__PF74JNxEeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.trimmedwindow.customwindowdemo" label="Custom Window Demo" width="600" height="420">
+ <persistedState key="efx.window.root.fxml" value="platform:/plugin/org.eclipse.fx.demo.customWindow.app/fxml/MainFrame.fxml"/>
+ <persistedState key="efx.window.stagestyle" value="DECORATED"/>
+ <children xsi:type="basic:PartStack" xmi:id="_YoMVUJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.partstack.0">
+ <children xsi:type="basic:Part" xmi:id="_XOU_YJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.part.loremipsum" contributionURI="bundleclass://org.eclipse.fx.demo.customWindow.app/org.eclipse.fx.demo.customWindow.app.part.Part1" label="Lorem Ipsum"/>
+ </children>
+ <mainMenu xmi:id="_GUXb0JN6EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.menu.0">
+ <children xsi:type="menu:Menu" xmi:id="_GwPfgJN6EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.menu.file" label="File">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_Hnq2wJN6EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledmenuitem.hello" label="Hello" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_k2wT8JQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.menu.edit" label="Edit">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_mEc2IJQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.handledmenuitem.hello" label="Hello" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_mhewYJQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.menu.navigate" label="Navigate">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_n2CvkJQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.handledmenuitem.hello" label="Hello" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ </children>
+ </mainMenu>
+ <trimBars xmi:id="_A3_PgJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.trimbar.top">
+ <children xsi:type="menu:ToolBar" xmi:id="_D7YIAJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.toolbar.top">
+ <tags>fillspace</tags>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_EQ9WcJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.top1" label="Remove right trim" command="_-jT5EJQjEeWYybeGVFjzJQ">
+ <persistedState key="trim.side" value="right"/>
+ </children>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_GedIwJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.top2" label="Remove bottom trim" command="_whmKcJQmEeWYybeGVFjzJQ">
+ <persistedState key="trim.side" value="bottom"/>
+ </children>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_GkPnsJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.top3" label="Remove left rim" command="_uuspcJQmEeWYybeGVFjzJQ">
+ <persistedState key="trim.side" value="left"/>
+ </children>
+ </children>
+ </trimBars>
+ <trimBars xmi:id="_BT028JN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.trimbar.right" side="Right">
+ <children xsi:type="menu:ToolBar" xmi:id="_I-mKQJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.toolbar.right">
+ <tags>fillspace</tags>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_KEeNMJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.right1" label="" iconURI="platform:/plugin/org.eclipse.fx.ui.controls/bin/org/eclipse/fx/ui/controls/dialog/icons/dialog-information.png" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_L5aVkJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.right2" label="" iconURI="platform:/plugin/org.eclipse.fx.ui.controls/bin/org/eclipse/fx/ui/controls/dialog/icons/dialog-warning.png" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_L9JmEJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.right3" label="" iconURI="platform:/plugin/org.eclipse.fx.ui.controls/bin/org/eclipse/fx/ui/controls/dialog/icons/dialog-error.png" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ </children>
+ </trimBars>
+ <trimBars xmi:id="_Bff7cJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.trimbar.left" side="Left">
+ <children xsi:type="menu:ToolBar" xmi:id="_JtScQJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.toolbar.left">
+ <tags>fillspace</tags>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_No8ZgJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.left1" label="" iconURI="platform:/plugin/org.eclipse.fx.ui.controls/org/eclipse/fx/ui/controls/filesystem/skin/file_16.png" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_P9LF8JN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.left2" label="" iconURI="platform:/plugin/org.eclipse.fx.ui.controls/org/eclipse/fx/ui/controls/filesystem/skin/fldr_16.png" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ </children>
+ </trimBars>
+ <trimBars xmi:id="_BrZpcJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.trimbar.bottom" side="Bottom">
+ <children xsi:type="menu:ToolBar" xmi:id="_JWP1QJN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.toolbar.bottom">
+ <tags>fillspace</tags>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_SJ2Y4JN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.buttom1" label="Hello 1" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_UW--0JN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.buttom2" label="Hello 2" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_UY0K0JN2EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handledtoolitem.buttom3" label="Hello 3" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ </children>
+ </trimBars>
+ </children>
+ <handlers xmi:id="_yebI8JN1EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.handler.0" contributionURI="bundleclass://org.eclipse.fx.demo.customWindow.app/org.eclipse.fx.demo.customWindow.app.handler.HelloHandler" command="_xTMr8JN1EeWDyN02lshAkQ"/>
+ <handlers xmi:id="_CcjbgJQkEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.handler.removerighttrim" contributionURI="bundleclass://org.eclipse.fx.demo.customWindow.app/org.eclipse.fx.demo.customWindow.app.handler.ToggleTrimHandler" command="_-jT5EJQjEeWYybeGVFjzJQ"/>
+ <handlers xmi:id="_koMeEJQnEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.handler.removebottomtrim" contributionURI="bundleclass://org.eclipse.fx.demo.customWindow.app/org.eclipse.fx.demo.customWindow.app.handler.ToggleTrimHandler" command="_whmKcJQmEeWYybeGVFjzJQ"/>
+ <handlers xmi:id="_sfQ9cJQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.handler.removelefttrim" contributionURI="bundleclass://org.eclipse.fx.demo.customWindow.app/org.eclipse.fx.demo.customWindow.app.handler.ToggleTrimHandler" command="_uuspcJQmEeWYybeGVFjzJQ"/>
+ <rootContext xmi:id="_zBNCsJNxEeWDyN02lshAkQ" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
+ <children xmi:id="_zBNCspNxEeWDyN02lshAkQ" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
+ <children xmi:id="_zBNCs5NxEeWDyN02lshAkQ" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
+ </rootContext>
+ <commands xmi:id="_xTMr8JN1EeWDyN02lshAkQ" elementId="org.eclipse.fx.demo.customwindow.app.command.hello" commandName="Hello"/>
+ <commands xmi:id="_-jT5EJQjEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.command.removerighttrim" commandName="Remove Right Trim"/>
+ <commands xmi:id="_whmKcJQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.command.removebottomtrim" commandName="Remove Bottom Trim"/>
+ <commands xmi:id="_uuspcJQmEeWYybeGVFjzJQ" elementId="org.eclipse.fx.demo.customwindow.app.command.removelefttrim" commandName="Remove Left Trim"/>
+ <addons xmi:id="_zBNCtJNxEeWDyN02lshAkQ" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
+ <addons xmi:id="_zBNCtZNxEeWDyN02lshAkQ" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
+ <addons xmi:id="_zBNCtpNxEeWDyN02lshAkQ" elementId="org.eclipse.fx.ui.keybindings.e4.service" contributionURI="bundleclass://org.eclipse.fx.ui.keybindings.e4/org.eclipse.fx.ui.keybindings.e4.BindingServiceAddon"/>
+ <addons xmi:id="_zBNCt5NxEeWDyN02lshAkQ" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
+ <addons xmi:id="_zBNCuJNxEeWDyN02lshAkQ" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
+ <addons xmi:id="_zBNpwJNxEeWDyN02lshAkQ" elementId="org.eclipse.fx.ui.keybindings.e4.model" contributionURI="bundleclass://org.eclipse.fx.ui.keybindings.e4/org.eclipse.fx.ui.keybindings.e4.BindingProcessingAddon"/>
+ <addons xmi:id="_zBNpwZNxEeWDyN02lshAkQ" elementId="org.eclipse.e4.ui.workbench.addons.HandlerProcessingAddon" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
+</application:Application>
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/META-INF/MANIFEST.MF b/demos/org.eclipse.fx.demo.customWindow.app/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5ad56135e
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: My Sample App
+Bundle-SymbolicName: org.eclipse.fx.demo.customWindow.app;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.fx.ui.workbench.fx,
+ org.eclipse.e4.ui.model.workbench,
+ org.eclipse.e4.core.services,
+ org.eclipse.e4.core.di,
+ org.eclipse.e4.ui.di,
+ org.eclipse.e4.core.di.extensions,
+ org.eclipse.fx.ui.theme,
+ org.eclipse.fx.ui.di,
+ org.eclipse.e4.core.contexts,
+ org.eclipse.fx.core.databinding,
+ org.eclipse.fx.ui.databinding,
+ org.eclipse.core.databinding,
+ org.eclipse.core.databinding.observable,
+ org.eclipse.core.databinding.property,
+ org.eclipse.e4.ui.workbench,
+ org.eclipse.e4.ui.services,
+ org.eclipse.fx.ui.services,
+ org.eclipse.fx.ui.controls;bundle-version="2.2.0",
+ org.eclipse.fx.core
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: javax.annotation;version="1.0.0";resolution:=optional,
+ javax.inject;version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Service-Component: OSGI-INF/services/theme-default.xml
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/OSGI-INF/services/theme-default.xml b/demos/org.eclipse.fx.demo.customWindow.app/OSGI-INF/services/theme-default.xml
new file mode 100644
index 000000000..930f80be2
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/OSGI-INF/services/theme-default.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.fx.demo.customWindow.app.themes.default">
+ <implementation class="org.eclipse.fx.demo.customWindow.app.themes.DefaultTheme"/>
+ <service>
+ <provide interface="org.eclipse.fx.ui.services.theme.Theme"/>
+ </service>
+ <reference bind="registerStylesheet" cardinality="0..n" interface="org.eclipse.fx.ui.services.theme.Stylesheet" name="Stylesheet" policy="dynamic" unbind="unregisterStylesheet"/>
+</scr:component>
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/bin/.gitignore b/demos/org.eclipse.fx.demo.customWindow.app/bin/.gitignore
new file mode 100644
index 000000000..cf1db2eed
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/bin/.gitignore
@@ -0,0 +1 @@
+/org/
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/build.properties b/demos/org.eclipse.fx.demo.customWindow.app/build.properties
new file mode 100644
index 000000000..8871ecd9d
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/build.properties
@@ -0,0 +1,8 @@
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+css/,\
+ Application.e4xmi,\
+ OSGI-INF/
+
+source.. = src/
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/css/default.css b/demos/org.eclipse.fx.demo.customWindow.app/css/default.css
new file mode 100644
index 000000000..c4ad87a47
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/css/default.css
@@ -0,0 +1 @@
+/* JavaFX CSS - Main CSS-File */ \ No newline at end of file
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/fxml/MainFrame.fxml b/demos/org.eclipse.fx.demo.customWindow.app/fxml/MainFrame.fxml
new file mode 100644
index 000000000..eb434d932
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/fxml/MainFrame.fxml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.shape.*?>
+<?import javafx.scene.control.*?>
+<?import javafx.scene.layout.*?>
+<?import java.lang.*?>
+<?import javafx.scene.control.TextField?>
+<?import javafx.scene.control.ToolBar?>
+<?import javafx.scene.layout.BorderPane?>
+<?import javafx.scene.layout.HBox?>
+<?import javafx.scene.layout.Pane?>
+<?import javafx.scene.layout.VBox?>
+
+<BorderPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="420.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.eclipse.fx.demo.customWindow.app.controller.MainFrameController">
+ <top>
+ <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
+ <children>
+ <HBox id="top-trim-area" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
+ <HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
+ <children>
+ <HBox id="menu-bar-area" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS" />
+ <TextField fx:id="searchField" promptText="Search..." />
+ </children>
+ </HBox>
+ </children>
+ </VBox>
+ </top>
+ <right>
+ <HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
+ <children>
+ <VBox minWidth="10.0" prefWidth="20.0" maxWidth="20.0" maxHeight="1.7976931348623157E308"
+ style="-fx-background-color: #1f0899;">
+ <children>
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <VBox maxHeight="1.7976931348623157E308" VBox.vgrow="ALWAYS" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ </children>
+ </VBox>
+ <HBox id="right-trim-area" minWidth="50.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
+ </children>
+ </HBox>
+ </right>
+ <left>
+ <HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
+ <children>
+ <HBox id="left-trim-area" minWidth="16.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
+ <VBox minWidth="10.0" prefWidth="20.0" maxWidth="20.0" maxHeight="1.7976931348623157E308"
+ style="-fx-background-color: #1f0899;">
+ <children>
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <VBox maxHeight="1.7976931348623157E308" VBox.vgrow="ALWAYS" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ </children>
+ </VBox>
+ </children>
+ </HBox>
+ </left>
+ <bottom>
+ <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
+ <children>
+ <HBox minHeight="10.0" prefHeight="20.0" maxHeight="20.0" maxWidth="1.7976931348623157E308"
+ style="-fx-background-color: #1f0899;">
+ <children>
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <VBox maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ <Circle fill="DODGERBLUE" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
+ </children>
+ </HBox>
+ <HBox id="bottom-trim-area" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="16.0" />
+ </children>
+ </VBox>
+ </bottom>
+ <center>
+ <BorderPane id="client-area" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
+ </center>
+</BorderPane>
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/plugin.xml b/demos/org.eclipse.fx.demo.customWindow.app/plugin.xml
new file mode 100644
index 000000000..d040318be
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+<extension id="product" point="org.eclipse.core.runtime.products">
+ <product name="Custom Window Demo" application="org.eclipse.fx.ui.workbench.fx.application" >
+ <property name="appName" value="Custom Window Demo" />
+
+ <property name="applicationXMI" value="org.eclipse.fx.demo.customWindow.app/Application.e4xmi" />
+
+ <property name="cssTheme" value="theme.default" />
+
+ </product>
+
+</extension>
+</plugin>
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/CustomWindowDemoConstants.java b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/CustomWindowDemoConstants.java
new file mode 100644
index 000000000..dba21baae
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/CustomWindowDemoConstants.java
@@ -0,0 +1,7 @@
+package org.eclipse.fx.demo.customWindow.app;
+
+import org.eclipse.fx.core.event.Topic;
+
+public interface CustomWindowDemoConstants {
+ public static final Topic<String> TOPIC_SEARCH = new Topic<>("app/event/search");
+}
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/controller/MainFrameController.java b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/controller/MainFrameController.java
new file mode 100644
index 000000000..76918ff24
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/controller/MainFrameController.java
@@ -0,0 +1,28 @@
+package org.eclipse.fx.demo.customWindow.app.controller;
+
+import java.net.URL;
+import java.util.ResourceBundle;
+
+import javax.inject.Inject;
+
+import org.eclipse.fx.core.event.EventBus;
+import org.eclipse.fx.demo.customWindow.app.CustomWindowDemoConstants;
+
+import javafx.fxml.FXML;
+import javafx.fxml.Initializable;
+import javafx.scene.control.TextField;
+
+public class MainFrameController implements Initializable {
+
+ @Inject private EventBus eventBus;
+
+ @FXML TextField searchField;
+
+ @Override
+ public void initialize(URL location, ResourceBundle resources) {
+ searchField.textProperty().addListener((o, oV, nV) -> {
+ eventBus.publish(CustomWindowDemoConstants.TOPIC_SEARCH, nV, true);
+ });
+ }
+
+}
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/HelloHandler.java b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/HelloHandler.java
new file mode 100644
index 000000000..c9851dc0a
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/HelloHandler.java
@@ -0,0 +1,17 @@
+
+package org.eclipse.fx.demo.customWindow.app.handler;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+
+import javafx.scene.control.Alert;
+import javafx.scene.control.Alert.AlertType;
+import javafx.scene.control.ButtonType;
+
+public class HelloHandler {
+
+ @Execute
+ public void execute() {
+ new Alert(AlertType.INFORMATION, "Hello!", ButtonType.OK).showAndWait();
+ }
+
+} \ No newline at end of file
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/ToggleTrimHandler.java b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/ToggleTrimHandler.java
new file mode 100644
index 000000000..2b9d42453
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/handler/ToggleTrimHandler.java
@@ -0,0 +1,28 @@
+
+package org.eclipse.fx.demo.customWindow.app.handler;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar;
+import org.eclipse.e4.ui.model.application.ui.menu.MToolItem;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
+
+public class ToggleTrimHandler {
+
+ @Execute
+ public void execute(MToolItem item, EModelService modelService, MApplication application) {
+ String side = item.getPersistedState().get("trim.side");
+ toggleTrim(item, modelService, application, side);
+ }
+
+ private void toggleTrim(MToolItem item, EModelService modelService, MApplication application, String side) {
+ MTrimBar trimBar = (MTrimBar)modelService.find("org.eclipse.fx.demo.customwindow.app.trimbar." + side, application);
+ trimBar.setToBeRendered(!trimBar.isToBeRendered());
+ if (trimBar.isToBeRendered()) {
+ item.setLabel("Remove " + side + " trim");
+ } else {
+ item.setLabel("Add " + side + " trim");
+ }
+ }
+
+} \ No newline at end of file
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/part/Part1.java b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/part/Part1.java
new file mode 100644
index 000000000..f872df7dd
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/part/Part1.java
@@ -0,0 +1,66 @@
+
+package org.eclipse.fx.demo.customWindow.app.part;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Stack;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+
+import org.eclipse.fx.core.Subscription;
+import org.eclipse.fx.core.event.EventBus;
+import org.eclipse.fx.demo.customWindow.app.CustomWindowDemoConstants;
+
+import javafx.scene.control.TextArea;
+import javafx.scene.layout.BorderPane;
+
+public class Part1 {
+
+ private static final String LOREM_IMSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla mauris nisl, vulputate in velit in, varius tempor sem. Suspendisse potenti. Morbi blandit, dui a tristique rhoncus, est elit varius massa, nec tincidunt risus risus in nisi. Cras egestas euismod diam, in dapibus quam feugiat non. Quisque cursus nulla id sollicitudin tempus. Suspendisse sit amet venenatis massa, vel pellentesque lacus. Ut diam ante, egestas quis eleifend sed, suscipit eu leo. Nulla facilisi. Nulla aliquam lacinia lorem, eu interdum lectus pretium vel. Nullam rutrum eros risus, vel suscipit neque maximus sit amet. Suspendisse malesuada euismod eleifend. Maecenas eros sapien, lobortis sed dolor eget, iaculis efficitur tellus. Nulla semper libero quis purus maximus, ac fermentum purus porta. Maecenas molestie id lacus nec tincidunt. Ut eleifend blandit neque, ac bibendum libero tristique quis. In vitae est vel mi dapibus condimentum pellentesque a diam.";
+
+ private ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);
+ private Subscription subscription;
+
+ private ScheduledFuture<?> scheduledFuture;
+
+ @PostConstruct
+ void postConstruct(BorderPane parent, EventBus eventBus) {
+ TextArea textArea = new TextArea();
+ textArea.setWrapText(true);
+ textArea.setText(LOREM_IMSUM);
+ parent.setCenter(textArea);
+
+ subscription = eventBus.subscribe(CustomWindowDemoConstants.TOPIC_SEARCH, searchText -> {
+ if (scheduledFuture != null) {
+ scheduledFuture.cancel(true);
+ }
+
+ textArea.setText("Searching for '" + searchText.getData() + "' ..." + "\n\n");
+
+ Stack<String> stack = new Stack<>();
+ List<String> wordsList = Arrays.asList(LOREM_IMSUM.split(" "));
+ Collections.reverse(wordsList);
+ stack.addAll(wordsList);
+ scheduledFuture = executorService.scheduleAtFixedRate(() -> {
+ String text = textArea.getText() + stack.pop() + " ";
+ textArea.setText(text);
+ }, 1200, 320, TimeUnit.MILLISECONDS);
+ });
+ }
+
+ @PreDestroy
+ void preDestroy() {
+ if (scheduledFuture != null) {
+ scheduledFuture.cancel(true);
+ }
+ executorService.shutdown();
+ subscription.dispose();
+ }
+
+} \ No newline at end of file
diff --git a/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/themes/DefaultTheme.java b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/themes/DefaultTheme.java
new file mode 100644
index 000000000..77980add6
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.customWindow.app/src/org/eclipse/fx/demo/customWindow/app/themes/DefaultTheme.java
@@ -0,0 +1,9 @@
+package org.eclipse.fx.demo.customWindow.app.themes;
+
+import org.eclipse.fx.ui.theme.AbstractTheme;
+
+public class DefaultTheme extends AbstractTheme {
+ public DefaultTheme() {
+ super("theme.default", "Default theme", DefaultTheme.class.getClassLoader().getResource("css/default.css"));
+ }
+}

Back to the top