* 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");
properties.setContent("SchemaData");
// Go, my child, go, see the world...
/**
* Copyright (C) 2006 CINCOM SYSTEMS, INC.
* All Rights Reserved
* Copyright (C) 2006 Igor Mekterovic
* All Rights Reserved
*/
frame = new JFrame(I18n.getString("frameTitle.mdxEditor2")
+ " " + selectedItem.getCatalogName()
+ ":" + selectedItem.getCubeName()
);
/* end of modification for I18n */
frame.setGlassPane(new DragElement());// By Prakash.
//Jules Grengbondai: to allow releasing resources
final MdxEditor editor = new MdxEditor( restrictions
, properties
, selectedItem.getServerMetaData()
, selectedItem.getCubeName());
frame.getContentPane().add(editor
, BorderLayout.CENTER);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
/**
* Lines inserted by prakash
* Disposing frame
* 3rd August 2006
*/
editor.removeLanguageListener();
JFrame frm=(JFrame)e.getSource();
frm.dispose();
/**
* End of the insertion made by prakash
*/