Package org.pentaho.reporting.engine.classic.core.designtime

Examples of org.pentaho.reporting.engine.classic.core.designtime.DesignTimeContext


      wizardController.registerMainXULContainer(mainWizardContainer);

      final Document documentRoot = mainWizardContainer.getDocumentRoot();
      final XulDialog root = (XulDialog) documentRoot.getRootElement();
      final Window window = (Window) root.getRootObject();
      final DesignTimeContext designTimeContext = new DefaultWizardDesignTimeContext(wizardController.getEditorModel(), window);
      wizardController.setDesignTimeContext(designTimeContext);

      final XulRunner runner = new SwingXulRunner();
      runner.addContainer(mainWizardContainer);
View Full Code Here


      }

      dialog = (XulDialog) root;
      // This is a hack to get the JDialog (this wizard) to become the parent window of windows/dialogs
      // that the wizard creates.
      final DesignTimeContext context = new DefaultWizardDesignTimeContext(wizardController.getEditorModel(), (Window) dialog.getRootObject());
      wizardController.setDesignTimeContext(context);

      // if we're doing an edit drop into the layout step
      if (wizardController.getEditorModel().isEditing())
      {
View Full Code Here

      wizardController.registerMainXULContainer(mainWizardContainer);

      final Document documentRoot = mainWizardContainer.getDocumentRoot();
      final XulDialog root = (XulDialog) documentRoot.getRootElement();
      final Window window = (Window) root.getRootObject();
      final DesignTimeContext designTimeContext =
          new DefaultWizardDesignTimeContext(wizardController.getEditorModel(), window);
      dataSourceAndQueryStep.setDesignTimeContext(designTimeContext);
      wizardController.setDesignTimeContext(designTimeContext);

      final XulRunner runner = new SwingXulRunner();
View Full Code Here

      }

      dialog = (XulDialog) root;
      // This is a hack to get the JDialog (this wizard) to become the parent window of windows/dialogs
      // that the wizard creates.
      final DesignTimeContext context = new DefaultWizardDesignTimeContext
          (wizardController.getEditorModel(), (Window) dialog.getRootObject(), designTimeContext);
      dataSourceAndQueryStep.setDesignTimeContext(context);
      wizardController.setDesignTimeContext(context);

      // if we're doing an edit drop into the layout step
View Full Code Here

    /**
     * Invoked when an action occurs.
     */
    public void actionPerformed(final ActionEvent e)
    {
      final DesignTimeContext designTimeContext = getDesignTimeContext();
      final DataSourceDialogModel dialogModel = getDialogModel();
      if (securityDialog == null)
      {
        final Window window = LibSwingUtil.getWindowAncestor(OlapConnectionPanel.this);
        if (window instanceof Frame)
View Full Code Here

    /**
     * Invoked when an action occurs.
     */
    public void actionPerformed(final ActionEvent e)
    {
      final DesignTimeContext designTimeContext = getDesignTimeContext();
      final DataSourceDialogModel dialogModel = getDialogModel();
      if (securityDialog == null)
      {
        final Window window = LibSwingUtil.getWindowAncestor(JdbcConnectionPanel.this);
        if (window instanceof Frame)
View Full Code Here

    public void actionPerformed(final ActionEvent e)
    {
      final JdbcConnectionDefinition existingConnection =
          (JdbcConnectionDefinition) dataSourceList.getSelectedValue();

      final DesignTimeContext designTimeContext = getDesignTimeContext();
      try
      {
        final Window parentWindow = LibSwingUtil.getWindowAncestor(ConnectionPanel.this);
        final XulDatabaseDialog connectionDialog = new XulDatabaseDialog(parentWindow, designTimeContext);
        final JdbcConnectionDefinition connectionDefinition = connectionDialog.open(existingConnection);

        // See if the edit completed...
        if (connectionDefinition != null)
        {
          // If the name changed, delete it before the update is performed
          if (existingConnection.getName().equals(connectionDefinition.getName()) == false)
          {
            getDialogModel().getConnectionDefinitionManager().removeSource(existingConnection.getName());
          }
          final DataSourceDialogModel dialogModel = getDialogModel();
          // Add / update the JNDI source
          getDialogModel().getConnectionDefinitionManager().updateSourceList(connectionDefinition);

          dialogModel.editConnection(existingConnection, connectionDefinition);
          dataSourceList.setSelectedValue(connectionDefinition, true);
        }
      }
      catch (XulException e1)
      {
        designTimeContext.error(e1);
      }
    }
View Full Code Here

        setPanelEnabled(false, datasourcePanel);
        lastSelectedQuery = null;
        return;
      }

      final DesignTimeContext designTimeContext = getDesignTimeContext();
      final Action editParameterAction = getEditParameterAction();
      try
      {
        final EmbeddedKettleQueryEntry selectedQuery = (EmbeddedKettleQueryEntry) value;
        setPanelEnabled(true, datasourcePanel);

        // This change event gets fired twice, causing the dialog to update twice.. let's stop that.
        if ((lastSelectedQuery == null) || (selectedQuery != lastSelectedQuery))
        {
          lastSelectedQuery = selectedQuery;
          updateQueryName(selectedQuery.getName());
          datasourcePanel.removeAll();
          datasourcePanel.add(selectedQuery.createUI(), BorderLayout.CENTER);
          datasourcePanel.revalidate();
          datasourcePanel.repaint();
        }

        getStopOnErrorsCheckBox().setSelected(selectedQuery.isStopOnErrors());
        editParameterAction.setEnabled(true);
      }
      catch (Exception e1)
      {
        designTimeContext.error(e1);
        editParameterAction.setEnabled(false);
      }
      catch (Throwable t1)
      {
        designTimeContext.error(new RuntimeException("Fatal error", t1));
        editParameterAction.setEnabled(false);
      }
    }
View Full Code Here

      putValue(Action.SHORT_DESCRIPTION, bundleSupport.getString("ConnectionPanel.Add.Description"));
    }

    public void actionPerformed(final ActionEvent e)
    {
      final DesignTimeContext designTimeContext = getDesignTimeContext();
      try
      {
        final Window parentWindow = LibSwingUtil.getWindowAncestor(ConnectionPanel.this);
        final XulDatabaseDialog connectionDialog = new XulDatabaseDialog(parentWindow, designTimeContext);
        final JdbcConnectionDefinition connectionDefinition = connectionDialog.open(null);

        if (connectionDefinition != null &&
            !StringUtils.isEmpty(connectionDefinition.getName()))
        {
          // A new JNDI source was created
          if (getDialogModel().getConnectionDefinitionManager().updateSourceList(connectionDefinition) == false)
          {
            getDialogModel().addConnection(connectionDefinition);
            dataSourceList.setSelectedValue(connectionDefinition, true);
          }
        }
      }
      catch (XulException e1)
      {
        designTimeContext.error(e1);
      }
    }
View Full Code Here

    /**
     * Invoked when an action occurs.
     */
    public void actionPerformed(final ActionEvent e)
    {
      final DesignTimeContext designTimeContext = getDesignTimeContext();
      final DataSourceDialogModel dialogModel = getDialogModel();
      if (securityDialog == null)
      {
        final Window window = SwingUtil.getWindowAncestor(JdbcConnectionPanel.this);
        if (window instanceof Frame)
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.designtime.DesignTimeContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.