Package javax.swing

Examples of javax.swing.JFileChooser.showSaveDialog()


                filePanel.setDialogType(JFileChooser.SAVE_DIALOG);
                retVal = filePanel.showSaveDialog(mainWindow);
                break;
            case SAVE_AS:
                filePanel.setDialogType(JFileChooser.SAVE_DIALOG);
                retVal = filePanel.showSaveDialog(mainWindow);
                break;
            case DIRECTORY:
                filePanel.setDialogType(JFileChooser.SAVE_DIALOG);
                filePanel.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                retVal = filePanel.showDialog(mainWindow, "Select");
View Full Code Here


    JFileChooser chooser = new JFileChooser();
    chooser.setDialogTitle(BUNDLE.getString("CHOOSE_DIRECTORY_FOR_MODULE_JAR"));
    chooser.setApproveButtonText(BUNDLE.getString("CHOOSE_DIRECTORY"));
    chooser.setDialogType(JFileChooser.SAVE_DIALOG);
    chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    int returnVal = chooser.showSaveDialog(ImportSessionFrame.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
        File f = chooser.getSelectedFile();
        if (!f.isDirectory()) {
            JOptionPane.showMessageDialog(this, "Please select a directory into which your module jar will be deployed");
            return;
View Full Code Here

    JFileChooser fileChooser = new JFileChooser();
    if(currentPath!=null) {
      fileChooser.setCurrentDirectory(currentPath);
    }

    int result = fileChooser.showSaveDialog(null);
    fileChooser.setVisible(true);
   
    if(result == JFileChooser.APPROVE_OPTION) {
      currentPath = fileChooser.getCurrentDirectory();
      return fileChooser.getSelectedFile().getAbsolutePath();
View Full Code Here

      fileChooser.addChoosableFileFilter(pdfSaveContrib);
    } catch (Exception e) {
      e.printStackTrace();
    }

    int retValue = fileChooser.showSaveDialog(this);
    if (retValue == JFileChooser.APPROVE_OPTION) {
      FileFilter fileFilter = fileChooser.getFileFilter();
      File file = fileChooser.getSelectedFile();
      String lowerCaseFileName = file.getName().toLowerCase();
View Full Code Here

            fileChooser.setFileHidingEnabled(false);
            fileChooser.setFileSelectionMode
                (JFileChooser.FILES_ONLY);
            fileChooser.addChoosableFileFilter(new ImageFileFilter(".jpg"));

            int choice = fileChooser.showSaveDialog(JSVGViewerFrame.this);
            if (choice == JFileChooser.APPROVE_OPTION) {
                float quality =
                    JPEGOptionPanel.showDialog(JSVGViewerFrame.this);

                final File f = fileChooser.getSelectedFile();
View Full Code Here

            fileChooser.setFileHidingEnabled(false);
            fileChooser.setFileSelectionMode
                (JFileChooser.FILES_ONLY);
            fileChooser.addChoosableFileFilter(new ImageFileFilter(".png"));

            int choice = fileChooser.showSaveDialog(JSVGViewerFrame.this);
            if (choice == JFileChooser.APPROVE_OPTION) {

    // Start: By Jun Inamori (jun@oop-reserch.com)
                boolean isIndexed =
                    PNGOptionPanel.showDialog(JSVGViewerFrame.this);
View Full Code Here

            fileChooser.setFileHidingEnabled(false);
            fileChooser.setFileSelectionMode
                (JFileChooser.FILES_ONLY);
            fileChooser.addChoosableFileFilter(new ImageFileFilter(".tiff"));

            int choice = fileChooser.showSaveDialog(JSVGViewerFrame.this);
            if (choice == JFileChooser.APPROVE_OPTION) {
                final File f = fileChooser.getSelectedFile();
                BufferedImage buffer = svgCanvas.getOffScreen();
                if (buffer != null) {
                    statusBar.setMessage
View Full Code Here

                JMenuItem screenshot = new JMenuItem("Screenshot (png)");
                screenshot.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_0, InputEvent.CTRL_DOWN_MASK));
                screenshot.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent ae) {
                        JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));
                        if (fileChooser.showSaveDialog(frame) == JFileChooser.APPROVE_OPTION) {
                          File file = fileChooser.getSelectedFile();
                          BufferedImage img = getScreenShot(frame.getMainPanel());
                          try {
                              // write the image as a PNG
                              ImageIO.write(img, "png", file);
View Full Code Here

            fileChooser.setFileHidingEnabled(false);
            fileChooser.setFileSelectionMode
                (JFileChooser.FILES_ONLY);
            fileChooser.addChoosableFileFilter(new ImageFileFilter(".png"));

            int choice = fileChooser.showSaveDialog(JSVGViewerFrame.this);
            if (choice == JFileChooser.APPROVE_OPTION) {

    // Start: By Jun Inamori (jun@oop-reserch.com)
                boolean isIndexed =
                    PNGOptionPanel.showDialog(JSVGViewerFrame.this);
View Full Code Here

            fileChooser.setFileHidingEnabled(false);
            fileChooser.setFileSelectionMode
                (JFileChooser.FILES_ONLY);
            fileChooser.addChoosableFileFilter(new ImageFileFilter(".tiff"));

            int choice = fileChooser.showSaveDialog(JSVGViewerFrame.this);
            if (choice == JFileChooser.APPROVE_OPTION) {
                final File f = fileChooser.getSelectedFile();
                BufferedImage buffer = svgCanvas.getOffScreen();
                if (buffer != null) {
                    statusBar.setMessage
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.