The New Presentation Wizard sample application enables an end user to define new Crosstabs and Graphs. After the wizard is completed, the newly created presentation is added to a tabbed display. This Crosstab or Graph can then be used to analyze data.
The NewPresentation
class provides a menu with access to a simple
connection dialog which prompts a user for security credentials. It then makes
a connection to Oracle OLAP and - optionally - to the BI Beans Catalog. After
the connection is established, the New Presentation Wizard can be invoked from
the New menu item.
The NewPresentationWizard
class contains most of the application
logic. It extends the BI Beans QueryBuilder, adding the ability to 1) specify
a presentation type (i.e. a Crosstab or a Graph) and 2) manages the wizard page
navigation - ensuring the appropriate wizard pages appear and are configured
appropriately (e.g. show a Graph Type panel when creating a new Graph).
The NewPresentation
class extends BIFrame
. It adds
a New menu item to the File
menu. The New item invokes the New Presentation
Wizard. The following API calls invoke and configure the wizard:
NewPresentationWizard npw = new NewPresentationWizard(this);
npw.setQueryManager(getQueryManager());
if (npw.run()) {...
Through the QueryManager
, the NewPresentationWizard
retrieves the MetadataManager object and sets it on the QueryBuilder. The MetadataManager
provides access to the OLAP Catalog and BI Beans Catalog metadata that drives
the QueryBuilder user interface.
The NewPresentationWizard
manages the user's progress through
the wizard. It specifies that the QueryBuilder should be run in wizard mode.
Then, it creates an instance of the PresentationTypePanel
, which
asks the user for the type of presentation to create, and the NewPresentationWizard
adds the it to the QueryBuilder:
setMode(QueryBuilder.WIZARD);
initialize();
m_prezType = new PresentationTypePanel(this);
this.addPanel((StandardPanel)
m_prezType, QueryBuilder.ITEMS_PANEL_ID);
Navigation through the
wizard is managed in the wizardSelectionChanged
method. This method
will add, remove and modify panels based on whether the presentation is a Graph
or a Crosstab.
Copyright © 2004 Oracle Corporation. All Rights Reserved. |