if (parent != null){
// I'm constructing new restrictions and properties objects for
// new tab (Dimension Tree) to take away with it.
// Also, must pass a reference to ServerMetadata object, one object to rule them all
XMLADiscoverRestrictions restrictions = XMLAObjectsFactory.newXMLADiscoverRestrictions();
XMLADiscoverProperties properties = XMLAObjectsFactory.newXMLADiscoverProperties();
// only cube element could have started an explore action:
// (for the time being, if I find a meaning in exploring catalogs and datasources, I'll move those getCubeName annd getCatalogName to interface)
CubeElement selectedItem = ((CubeElement)((TreeElement)(popUpSource.getPathComponent(popUpSource.getPathCount()-1))).getUserObject());
restrictions.setCatalog(selectedItem.getCatalogName());
restrictions.setCubeName(selectedItem.getCubeName());
properties.setDataSourceInfo(selectedItem.getDataSourceInfo());
properties.setCatalog(selectedItem.getCatalogName());
properties.setFormat("Tabular");
properties.setContent("SchemaData");
/**
* Copyright (C) 2006 CINCOM SYSTEMS, INC.
* All Rights Reserved
* Copyright (C) 2006 Igor Mekterovic
* All Rights Reserved
*/
Viewer viewer = new Viewer(restrictions, properties, selectedItem.getServerMetaData(), (JTabbedPane)parent);
// Go, my child, go, see the world...
((JTabbedPane)parent).addTab(
selectedItem.getCubeName()
, selectedItem.getIcon()
, viewer
, I18n.getString("toolTip.exploring") + selectedItem.getDataSourceInfo() + ":" + selectedItem.getCatalogName() + ":" + selectedItem.getCubeName());
((JTabbedPane)parent).setSelectedComponent(viewer);
viewer = null;
/* end of modification for I18n */
}
/**
* Copyright (C) 2006 CINCOM SYSTEMS, INC.
* All Rights Reserved
* Copyright (C) 2006 Igor Mekterovic
* All Rights Reserved
*/
}else if(I18n.getString("menu.explore2").equals(e.getActionCommand())){ //sbalda
/* end of modification for I18n */
if (parent != null){
// I'm constructing new restrictions and properties objects for
// new tab (MdxEditor) to take away with it.
// Also, must pass a reference to ServerMetadata object, one object to rule them all
XMLADiscoverRestrictions restrictions = XMLAObjectsFactory.newXMLADiscoverRestrictions();
XMLADiscoverProperties properties = XMLAObjectsFactory.newXMLADiscoverProperties();
// only cube element could have started an explore action:
// (for the time being, if I find a meaning in exploring catalogs and datasources, I'll move those getCubeName annd getCatalogName to interface)
CubeElement selectedItem = ((CubeElement)((TreeElement)(popUpSource.getPathComponent(popUpSource.getPathCount()-1))).getUserObject());
restrictions.setCatalog(selectedItem.getCatalogName());
restrictions.setCubeName(selectedItem.getCubeName());
properties.setDataSourceInfo(selectedItem.getDataSourceInfo());
properties.setCatalog(selectedItem.getCatalogName());
properties.setFormat("Tabular");
properties.setContent("SchemaData");
/**
* Copyright (C) 2006 CINCOM SYSTEMS, INC.
* All Rights Reserved
* Copyright (C) 2006 Igor Mekterovic
* All Rights Reserved
*/
MdxEditor editor = new MdxEditor( restrictions
, properties
, selectedItem.getServerMetaData()
, selectedItem.getCubeName(), (JTabbedPane)parent);
((JTabbedPane)parent).addTab(
selectedItem.getCubeName()
, selectedItem.getIcon()
, editor
, I18n.getString("toolTip.exploring") + selectedItem.getDataSourceInfo() + ":" + selectedItem.getCatalogName() + ":" + selectedItem.getCubeName());
//To automatically select the tab. Cincom Systems, Inc. March 2009 by Jules Grengbondai.
((JTabbedPane)parent).setSelectedComponent(editor);
editor = null;
/* end of modification for I18n */
}
/**
* Copyright (C) 2006 CINCOM SYSTEMS, INC.
* All Rights Reserved
* Copyright (C) 2006 Igor Mekterovic
* All Rights Reserved
*/
}else if(I18n.getString("menu.explore3").equals(e.getActionCommand())){ //sbalda
/* end of modification for I18n */
if (parent != null){
// I'm constructing new restrictions and properties objects for
// new tab (MdxEditor) to take away with it.
// Also, must pass a reference to ServerMetadata object, one object to rule them all
XMLADiscoverRestrictions restrictions = XMLAObjectsFactory.newXMLADiscoverRestrictions();
XMLADiscoverProperties properties = XMLAObjectsFactory.newXMLADiscoverProperties();
// only cube element could have started an explore action:
// (for the time being, if I find a meaning in exploring catalogs and datasources, I'll move those getCubeName annd getCatalogName to interface)
CubeElement selectedItem = ((CubeElement)((TreeElement)(popUpSource.getPathComponent(popUpSource.getPathCount()-1))).getUserObject());
restrictions.setCatalog(selectedItem.getCatalogName());
restrictions.setCubeName(selectedItem.getCubeName());
properties.setDataSourceInfo(selectedItem.getDataSourceInfo());
properties.setCatalog(selectedItem.getCatalogName());
properties.setFormat("Tabular");