ca.sqlpower.wabit.swingui.olap
Class OlapQueryPanel

java.lang.Object
  extended by ca.sqlpower.wabit.swingui.olap.OlapQueryPanel
All Implemented Interfaces:
ca.sqlpower.swingui.DataEntryPanel, WabitPanel

public class OlapQueryPanel
extends java.lang.Object
implements WabitPanel


Constructor Summary
OlapQueryPanel(WabitSwingSession session, javax.swing.JComponent parentComponent, OlapQuery query)
           
 
Method Summary
 boolean applyChanges()
           
 void discardChanges()
           
 javax.swing.JComponent getPanel()
           
 javax.swing.JComponent getSourceComponent()
          Returns the component (often a JTree or JList, but can be anything) that contains all the workspace items that can be dragged into this editor.
 java.lang.String getTitle()
          Returns a suitable string that can be used in the title of a containing window or frame.
 javax.swing.JToolBar getToolbar()
          Returns the toolbar.
 boolean hasUnsavedChanges()
           
 void setCurrentCube(org.olap4j.metadata.Cube currentCube)
          Sets the current cube to the given cube.
 void updateCellSet(org.olap4j.CellSet cellSet)
          This method will update the cell set in this panel.
 void updateMdxText(java.lang.String mdx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OlapQueryPanel

public OlapQueryPanel(WabitSwingSession session,
                      javax.swing.JComponent parentComponent,
                      OlapQuery query)
Method Detail

applyChanges

public boolean applyChanges()
Specified by:
applyChanges in interface ca.sqlpower.swingui.DataEntryPanel

updateMdxText

public void updateMdxText(java.lang.String mdx)

discardChanges

public void discardChanges()
Specified by:
discardChanges in interface ca.sqlpower.swingui.DataEntryPanel

getPanel

public javax.swing.JComponent getPanel()
Specified by:
getPanel in interface ca.sqlpower.swingui.DataEntryPanel

hasUnsavedChanges

public boolean hasUnsavedChanges()
Specified by:
hasUnsavedChanges in interface ca.sqlpower.swingui.DataEntryPanel

setCurrentCube

public void setCurrentCube(org.olap4j.metadata.Cube currentCube)
                    throws java.sql.SQLException
Sets the current cube to the given cube. This affects the tree of items that can be dragged into the query builder, and it resets the query builder. It also executes the (empty) query on the new cube.

Parameters:
currentCube - The new cube to make current. If this is already the current cube, the query will not be reset. Can be null to revert to the "no cube selected" state.
Throws:
java.sql.SQLException

updateCellSet

public void updateCellSet(org.olap4j.CellSet cellSet)
This method will update the cell set in this panel.


getTitle

public java.lang.String getTitle()
Description copied from interface: WabitPanel
Returns a suitable string that can be used in the title of a containing window or frame. Usually describes what the panel contains. (ex. "Query Editor" or "Report Editor")

Specified by:
getTitle in interface WabitPanel

getSourceComponent

public javax.swing.JComponent getSourceComponent()
Description copied from interface: WabitPanel
Returns the component (often a JTree or JList, but can be anything) that contains all the workspace items that can be dragged into this editor. The component will not be wrapped in a scroll pane; you get to do this yourself if your component needs one.

Specified by:
getSourceComponent in interface WabitPanel
Returns:
The component as described above, or null if nothing can be dropped on this panel.

getToolbar

public javax.swing.JToolBar getToolbar()
Description copied from interface: WabitPanel
Returns the toolbar. A null value means not to render the toolbar.

Specified by:
getToolbar in interface WabitPanel


Copyright © 2009. All Rights Reserved.