Skip to content
Browse files

basic GUI skeleton created containing header and splitpane

  • Loading branch information...
1 parent ebd40b7 commit 4961b778625db9b5547002557e635514d2967151 tomek committed
View
76 src/main/frontend/source/class/helenos/Application.js
@@ -1,61 +1,51 @@
/* ************************************************************************
-
- Copyright:
-
- License:
-
- Authors:
-
-************************************************************************ */
-
+Copyright:
+ 2012 Tomek Kuprowski
+License:
+ GPLv2: http://www.gnu.org/licences/gpl.html
+Authors:
+ Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ ************************************************************************ */
/* ************************************************************************
-
#asset(helenos/*)
-
************************************************************************ */
-
/**
* This is the main application class of your custom application "helenos"
*/
qx.Class.define("helenos.Application",
{
- extend : qx.application.Standalone,
-
-
+ extend : qx.application.Standalone,
- /*
+ /*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
- members :
- {
- /**
- * This method contains the initial application code and gets called
- * during startup of the application
- *
- * @lint ignoreDeprecated(alert)
- */
- main : function()
+ members :
{
- // Call super class
- this.base(arguments);
-
- // Enable logging in debug variant
- if (qx.core.Environment.get("qx.debug"))
- {
- // support native logging capabilities, e.g. Firebug for Firefox
- qx.log.appender.Native;
- // support additional cross-browser console. Press F7 to toggle visibility
- qx.log.appender.Console;
- }
-
- // Document is the application root
- var doc = this.getRoot();
-
- var pane = new helenos.components.MainPane;
- doc.add(pane, {left: 100, top: 50});
+
+ __getTopComposite : function() {
+ return new helenos.components.TopComposite();
+ },
+
+ main : function()
+ {
+ // Call super class
+ this.base(arguments);
+
+ // Enable logging in debug variant
+ if (qx.core.Environment.get("qx.debug"))
+ {
+ // support native logging capabilities, e.g. Firebug for Firefox
+ qx.log.appender.Native;
+ // support additional cross-browser console. Press F7 to toggle visibility
+ qx.log.appender.Console;
+ }
+
+ this.getRoot().add(this.__getTopComposite(), {
+ edge : 0
+ });
+ }
}
- }
});
View
33 src/main/frontend/source/class/helenos/components/Header.js
@@ -0,0 +1,33 @@
+/* ************************************************************************
+Copyright:
+ 2012 Tomek Kuprowski
+License:
+ GPLv2: http://www.gnu.org/licences/gpl.html
+Authors:
+ Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ ************************************************************************ */
+qx.Class.define("helenos.components.Header",
+{
+ extend : qx.ui.container.Composite,
+
+ construct : function()
+ {
+ this.base(arguments);
+ this.set({
+ layout : new qx.ui.layout.HBox(5).set({
+ alignY : "middle"
+ }),
+ padding : 8,
+ backgroundColor : "#252525",
+ textColor : "#E8E8E8"
+ });
+
+ //TODO change components to appearance definitions
+ var label = new qx.ui.basic.Label().set({
+ value: "Helenos",
+ rich : true,
+ font : new qx.bom.Font(22, ["OpenSansRegular", "Helvetica Neue", "Helvetica", "Arial", "sans-serif"])
+ });
+ this.add(label );
+ }
+});
View
66 src/main/frontend/source/class/helenos/components/MainPane.js
@@ -1,44 +1,44 @@
/* ************************************************************************
-
- Copyright:
-
- License:
-
- Authors:
-
-************************************************************************ */
-
-/* ************************************************************************
-
-#asset(helenos/*)
-
-************************************************************************ */
-
-/**
- * This is the main application class of your custom application "helenos"
- */
+Copyright:
+ 2012 Tomek Kuprowski
+License:
+ GPLv2: http://www.gnu.org/licences/gpl.html
+Authors:
+ Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ ************************************************************************ */
qx.Class.define("helenos.components.MainPane",
{
- extend : qx.ui.splitpane.Pane,
+ extend : qx.ui.splitpane.Pane,
- /*
+ /*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
- construct : function()
- {
- this.base(arguments);
- this.setOrientation("horizontal");
+ construct : function()
+ {
+ this.base(arguments);
+ this.setOrientation("horizontal");
- pane.add(this.__treePane, 0);
- pane.add(this.__contentPane, 1);
- },
-
- members :
- {
- __treePane : null,
- __contentPane : null
- }
+ this.__createLeftPane();
+ this.__createRightPane();
+
+ this.add(this.__treePane, 0);
+ this.add(this.__contentPane, 1);
+ },
+
+ members :
+ {
+ __treePane : null,
+ __contentPane : null,
+
+ __createLeftPane : function() {
+ this.__treePane = new qx.ui.container.Composite();
+ },
+
+ __createRightPane : function() {
+ this.__contentPane = new qx.ui.container.Composite();
+ }
+ }
});
View
43 src/main/frontend/source/class/helenos/components/TopComposite.js
@@ -0,0 +1,43 @@
+/* ************************************************************************
+Copyright:
+ 2012 Tomek Kuprowski
+License:
+ GPLv2: http://www.gnu.org/licences/gpl.html
+Authors:
+ Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ ************************************************************************ */
+
+qx.Class.define("helenos.components.TopComposite",
+{
+ extend : qx.ui.container.Composite,
+
+ /*
+ *****************************************************************************
+ MEMBERS
+ *****************************************************************************
+ */
+
+ construct : function()
+ {
+ this.base(arguments);
+ this.set({
+ layout : new qx.ui.layout.VBox()
+ });
+
+ this.add(this.__getHeader());
+ this.add(this.__getMainContainer(), {
+ flex : 1
+ });
+ },
+
+ members :
+ {
+ __getHeader : function() {
+ return new helenos.components.Header();
+ },
+
+ __getMainContainer : function() {
+ return new helenos.components.MainPane();
+ }
+ }
+});
View
2 src/main/frontend/source/index.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>helenos</title>
+ <title>Helenos</title>
<script type="text/javascript" src="script/helenos.js"></script>
</head>
<body></body>

0 comments on commit 4961b77

Please sign in to comment.
Something went wrong with that request. Please try again.