Examples of XulFileDialog


Examples of org.pentaho.ui.xul.components.XulFileDialog

    public void selectFile()
    {
      try
      {
        final XulFileDialog fd = (XulFileDialog) document.createElement("filedialog"); //$NON-NLS-1$
        fd.setModalParent(LookAndFeelStep.this.getDesignTimeContext().getParentWindow());
        fd.showOpenDialog();
        file = (File) fd.getFile();
        if (file != null)
        { // If the file is null then the user hit cancel
          final String filePath = file.getAbsolutePath();
          final XulTextbox fileTextBox = (XulTextbox) document.getElementById(WIZARD_FILENAME_TB_ID);
          fileTextBox.setValue(filePath);
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

    public void selectFile()
    {
      try
      {
        final XulFileDialog fd = (XulFileDialog) document.createElement("filedialog"); //$NON-NLS-1$
        fd.setModalParent(LookAndFeelStep.this.getDesignTimeContext().getParentWindow());
        fd.showOpenDialog();
        file = (File) fd.getFile();
        if (file != null)
        { // If the file is null then the user hit cancel
          final String filePath = file.getAbsolutePath();
          final XulTextbox fileTextBox = (XulTextbox) document.getElementById(WIZARD_FILENAME_TB_ID);
          fileTextBox.setValue(filePath);
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

      return;
    }

    File selectedFile = workspace.getWorkspaceLocation();
   
    XulFileDialog fc = (XulFileDialog) document.createElement("filedialog");
   
    RETURN_CODE retVal = fc.showOpenDialog(selectedFile);
   
    if (retVal == RETURN_CODE.OK) {
      selectedFile = (File) fc.getFile();
      try {
        String xml = FileUtils.readFileToString(selectedFile);
        String connAndAgg[] = serializationService.getConnectionAndAggListElements(xml);
       
        serializationService.deserializeConnection(connectionModel.getSchema(), connAndAgg[0], connAndAgg[1]);
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

    }
   
    File selectedFile = workspace.getWorkspaceLocation();
    if (saveAs || selectedFile == null) {
      // display file dialog
      XulFileDialog fc = (XulFileDialog) document.createElement("filedialog");
      // TODO: last browsed in directory?
      RETURN_CODE retVal = fc.showSaveDialog();
      if (retVal == RETURN_CODE.OK) {
        selectedFile = (File) fc.getFile();
      } else {
        return false;
      }
    }
    try {
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

      logger.debug("exit executeDdlDmlDone");
    }
  }

  public void saveDdl() throws XulException {
    XulFileDialog fc = (XulFileDialog) document.createElement(ELEM_ID_FILEDIALOG);
    fc.setModalParent(((XulDialog)document.getElementById(ELEM_ID_EXPORT_DIALOG)).getRootObject());
   
    RETURN_CODE retVal = fc.showSaveDialog();
    File selectedFile = null;
    if (retVal == RETURN_CODE.OK) {
      selectedFile = (File) fc.getFile();
      if (logger.isDebugEnabled()) {
        logger.debug("Selected Save file: " + selectedFile.getAbsolutePath());
      }

      StringBuilder data = new StringBuilder();
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

    }
  }

  public void saveDml() throws XulException {
    XulFileDialog fc = (XulFileDialog) document.createElement(ELEM_ID_FILEDIALOG);
    fc.setModalParent(((XulDialog)document.getElementById(ELEM_ID_EXPORT_DIALOG)).getRootObject());

    RETURN_CODE retVal = fc.showSaveDialog();
    File selectedFile = null;
    if (retVal == RETURN_CODE.OK) {
      selectedFile = (File) fc.getFile();
      if (logger.isDebugEnabled()) {
        logger.debug("Selected Save file: " + selectedFile.getAbsolutePath());
      }

      StringBuilder data = new StringBuilder();
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

      msgBox.open();
      logger.error("Inconsistent application state: Only MondrianFileSchemaModel should call into this method");
      return null;
    }
   
    XulFileDialog fc = (XulFileDialog) document.createElement(ELEM_ID_FILEDIALOG);
    fc.setModalParent(((XulDialog)document.getElementById(ELEM_ID_EXPORT_DIALOG)).getRootObject());


    MondrianFileSchemaModel schemaModel = (MondrianFileSchemaModel) connectionModel.getSelectedSchemaModel();

    RETURN_CODE retVal = fc.showSaveDialog(new File(schemaModel.getMondrianSchemaFilename()));

    File selectedFile = null;
    if (retVal == RETURN_CODE.OK) {
      selectedFile = (File) fc.getFile();
      if (logger.isDebugEnabled()) {
        logger.debug("Selected Save file: " + selectedFile.getAbsolutePath());
      }

      StringBuilder data = new StringBuilder();
View Full Code Here

Examples of org.pentaho.ui.xul.components.XulFileDialog

    this.firePropertyChange("mondrianSchemaFilename", oldVal, mondrianSchemaFilename);
  }

  public void chooseFile() throws AggDesignerException {
    try {
      XulFileDialog fc = (XulFileDialog) document.createElement("filedialog");

      RETURN_CODE retVal;
      if (getLastFile() != null) {
        retVal = fc.showOpenDialog(getLastFile());
      } else {
        retVal = fc.showOpenDialog();
      }

      if (retVal == RETURN_CODE.OK) {
        File selectedFile = (File) fc.getFile();
        setLastFile(selectedFile);
        setMondrianSchemaFilename(((File)fc.getFile()).getAbsolutePath());
       
      }
    } catch (Exception e) {
      logger.error("Error showing file chooser", e);
      throw new AggDesignerException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.