Package org.pentaho.ui.xul

Examples of org.pentaho.ui.xul.XulDomContainer


    wizardController.addStep(new FormatStep());


    try
    {
      final XulDomContainer mainWizardContainer = new SwingXulLoader().loadXul(MAIN_WIZARD_PANEL);
      new WizardContentPanel(wizardController).addContent(mainWizardContainer);

      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);
View Full Code Here


    try
    {
      final SwingXulLoader loader = new SwingXulLoader();
      loader.setOuterContext(owner);

      final XulDomContainer mainWizardContainer = new SwingXulLoader().loadXul(MAIN_WIZARD_PANEL);
      new WizardContentPanel(wizardController).addContent(mainWizardContainer);
      mainWizardContainer.setOuterContext(this.owner);
      wizardController.registerMainXULContainer(mainWizardContainer);
      wizardController.onLoad();

      final Document documentRoot = mainWizardContainer.getDocumentRoot();
      final XulComponent root = documentRoot.getRootElement();

      if (!(root instanceof XulDialog))
      {
        throw new XulException(Messages.getInstance().getString("EMBEDDED_WIZARD.Root_Error") + " " + root); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

      final ResourceManager resourceManager = new ResourceManager();
      final Resource resource = resourceManager.createDirectly(xulDocument, Document.class);
      final Document document = (Document) resource.getResource();
      final DOMReader domReader = new DOMReader();
      final XulDomContainer container = loader.loadXulFragment(domReader.read(document));


      // Create our main Controller
      final String className = configuration.getConfigProperty
          ("org.pentaho.reporting.designer.core.editor.drilldown.xul-controller." + configurationTag, // NON-NLS
              DefaultXulDrillDownController.class.getName());
      controller =
          ObjectUtilities.loadAndInstantiate(className, XulDrillDownController.class, XulDrillDownController.class);
      if (controller != null)
      {
        controller.setName("controller"); // NON-NLS
        controller.setXulDomContainer(container);
        controller.init(reportDesignerContext, model, extraFields);
        container.addEventHandler(controller);
      }

      // Start it up!
      final XulRunner runner = new SwingXulRunner();
      runner.addContainer(container);
View Full Code Here

    if (parent != null)
    {
      loader.setOuterContext(parent);
    }
    final XulDomContainer container = loader.loadXul(DIALOG_DEFINITION_FILE, Messages.getBundle());
    container.getDocumentRoot().addOverlay(OVERLAY_DEFINITION_FILE);
    container.initialize();

    handler = new XulDatabaseHandler();
    container.addEventHandler(handler);   //$NON-NLS-1$

    final Document documentRoot = container.getDocumentRoot();
    final XulComponent root = documentRoot.getRootElement();

    if (root instanceof XulDialog)
    {
      dialog = (XulDialog) root;
View Full Code Here

    wizardController.addStep(new FormatStep());


    try
    {
      final XulDomContainer mainWizardContainer = new SwingXulLoader().loadXul(MAIN_WIZARD_PANEL);
      new WizardContentPanel(wizardController).addContent(mainWizardContainer);

      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);
View Full Code Here

    try
    {
      final SwingXulLoader loader = new SwingXulLoader();
      loader.setOuterContext(owner);

      final XulDomContainer mainWizardContainer = new SwingXulLoader().loadXul(MAIN_WIZARD_PANEL);
      new WizardContentPanel(wizardController).addContent(mainWizardContainer);
      mainWizardContainer.setOuterContext(this.owner);
      wizardController.registerMainXULContainer(mainWizardContainer);
      wizardController.onLoad();

      final Document documentRoot = mainWizardContainer.getDocumentRoot();
      final XulComponent root = documentRoot.getRootElement();

      if (!(root instanceof XulDialog))
      {
        throw new XulException(Messages.getInstance().getString("EMBEDDED_WIZARD.Root_Error") + " " + root); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    if (parent != null)
    {
      loader.setOuterContext(parent);
    }
    final XulDomContainer container = loader.loadXul(DIALOG_DEFINITION_FILE, Messages.getBundle());
    container.getDocumentRoot().addOverlay(OVERLAY_DEFINITION_FILE);
    container.initialize();

    handler = new XulDatabaseHandler();
    container.addEventHandler(handler);   //$NON-NLS-1$

    final Document documentRoot = container.getDocumentRoot();
    final XulComponent root = documentRoot.getRootElement();

    if (root instanceof XulDialog)
    {
      dialog = (XulDialog) root;
View Full Code Here

        final Map.Entry<String, String> entry = entryIterator.next();
        loader.register(entry.getKey(), entry.getValue());
      }
    }

    final XulDomContainer container = loader.loadXul(DIALOG_DEFINITION_FILE);
    final Document documentRoot = container.getDocumentRoot();

    for (int i = 0; i < plugins.length; i++)
    {
      final ReportDesignerUiPlugin plugin = plugins[i];
      final String[] strings = plugin.getOverlaySources();
      for (int j = 0; j < strings.length; j++)
      {
        final String source = strings[j];
        documentRoot.addOverlay(source);
      }
    }
    for (int i = 0; i < plugins.length; i++)
    {
      final ReportDesignerUiPlugin plugin = plugins[i];
      final XulEventHandler[] xulEventHandlers = plugin.createEventHandlers();
      for (int j = 0; j < xulEventHandlers.length; j++)
      {
        final XulEventHandler eventHandler = xulEventHandlers[j];
        container.addEventHandler(eventHandler);
      }
    }

    container.initialize();

    final XulComponent root = documentRoot.getRootElement();
    if (root instanceof XulWindow)
    {
      window = (XulWindow) root;
View Full Code Here

    }
  }

  @SuppressWarnings("unchecked")
  public void start(ApplicationContext context) throws XulException {
    XulDomContainer container;
   
    //check to see if they've specified an alternate resource bundle
    String bundleStr = configuration.getResourceBundle();
    ResourceBundle bundle = null;
    if(bundleStr != null){
      try{
        bundle = ResourceBundle.getBundle(bundleStr);
      } catch (MissingResourceException e){
        logger.error("Could not load Resource Bundle: "+bundleStr); //$NON-NLS-1$
      }
    }
   
    //Set the look and feel based on configuration
    setLAF();
   
    if(bundle != null){
      container = xulLoader.loadXul("org/pentaho/aggdes/ui/resources/mainFrame.xul", bundle); //$NON-NLS-1$
    } else {
      container = xulLoader.loadXul("org/pentaho/aggdes/ui/resources/mainFrame.xul"); //$NON-NLS-1$
    }
   
    //generically register all Spring-initialized XulEventHandlers
    Map handlerMap = context.getBeansOfType(XulEventHandler.class);
    for(Object handler : handlerMap.values()) {
      container.addEventHandler((XulEventHandler)handler);
    }
   
    xulRunner.addContainer(container);
    xulRunner.initialize();
    xulRunner.start();
View Full Code Here

        if (connectionDialog == null) {
            dbMeta = getDbMeta(null);
            connectionDialogController = new DataHandler();
            connectionDialogController.setName("dataHandler");

            XulDomContainer container = null;

            try {
                XulLoader loader = new SwingXulLoader();
                container = loader.loadXul(
                        DatabaseConnectionDialog.DIALOG_DEFINITION_FILE,
                        Messages.getBundle());
            } catch (XulException e) {
                throw new RuntimeException("Xul failed to initialize", e);
            }
            container.addEventHandler(connectionDialogController);
            connectionDialogController.loadConnectionData();
            connectionDialogController.setData(dbMeta);
            connectionDialog = (XulDialog) container.getDocumentRoot()
                    .getRootElement();
        }

        connectionDialog.show();
View Full Code Here

TOP

Related Classes of org.pentaho.ui.xul.XulDomContainer

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.