Permalink
Browse files

view data page - skeleton

  • Loading branch information...
tomek
tomek committed Jul 26, 2012
1 parent 94d5912 commit 7868e15cad63f261080c770601133ebc4e2d35b6
@@ -29,6 +29,7 @@ qx.Class.define("helenos.components.menu.ColumnFamilyContextMenu",
var viewDataButton = new qx.ui.menu.Button("View data", "icon/16/apps/office-spreadsheet.png");
viewDataButton.setUserData('KSNAME', ksName);
viewDataButton.setUserData('CFNAME', cfName);
+ viewDataButton.addListener("execute", this.__showDataPane);
this.add(viewDataButton);
this.add(new qx.ui.menu.Separator());
@@ -65,6 +66,12 @@ qx.Class.define("helenos.components.menu.ColumnFamilyContextMenu",
}, this);
},
+ __showDataPane : function(e) {
+ var ksName = e.getTarget().getUserData('KSNAME');
+ var cfName = e.getTarget().getUserData('CFNAME');
+ helenos.util.GuiObserver.showViewDataTab(ksName, cfName);
+ },
+
__dropColumnFamily : function(e) {
var ksName = e.getTarget().getUserData('KSNAME');
var cfName = e.getTarget().getUserData('CFNAME');
@@ -0,0 +1,29 @@
+/* ************************************************************************
+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.tab.ViewDataPage",
+{
+ extend : helenos.components.tab.AbstractCloseablePage,
+
+ construct : function(ksName, cfName)
+ {
+ this.base(arguments);
+ this.set({
+ layout : new qx.ui.layout.VBox(3, 'top'),
+ icon : 'icon/16/apps/office-spreadsheet.png',
+ label: (ksName + ' : ' + cfName)
+ });
+
+ },
+
+ members :
+ {
+
+ }
+});
@@ -29,6 +29,13 @@ qx.Class.define("helenos.util.GuiObserver",
this.__tabbedPane.setSelection([ksPage]);
},
+ showViewDataTab : function(keyspaceName, columnFamily) {
+ qx.core.Assert.assertNotNull(this.__tabbedPane,'tabbed pane not registered yet');
+ var dataPage = new helenos.components.tab.ViewDataPage(keyspaceName, columnFamily);
+ this.__tabbedPane.add(dataPage);
+ this.__tabbedPane.setSelection([dataPage]);
+ },
+
showColumnFamilyInfoTab : function(keyspaceName, columnFamilyName) {
qx.core.Assert.assertNotNull(this.__tabbedPane,'tabbed pane not registered yet');

0 comments on commit 7868e15

Please sign in to comment.