Package net.datacrow.console.windows

Examples of net.datacrow.console.windows.BrowserDialog


        } else if (e.getActionCommand().equals("locateFileMP")) {
            locateFile(DriveManager._PRECISION_MEDIUM);
        } else if (e.getActionCommand().equals("locateFileLP")) {
            locateFile(DriveManager._PRECISION_LOWEST);
        } else if (e.getActionCommand().equals("moveFile")) {
            BrowserDialog dialog = new BrowserDialog(DcResources.getText("msgSelectnewLocation"), null);
            File newDir = dialog.showSelectDirectoryDialog(this, null);
       
            if (newDir != null) {
                try {
                    File newFile = new File(newDir, file.getName());
                    Utilities.rename(file, newFile);
View Full Code Here


    public void setEditable(boolean b) {
        buttonBrowse.setEnabled(b);
    }

    private void showFileOpenDialog() {
        BrowserDialog dialog = new BrowserDialog(DcResources.getText("lblFileBrowser"), null);
        File fileNew = dialog.showOpenFileDialog(this, null);
        file = fileNew != null ? fileNew : file;
        text.setText(getFileAsString());

        dialog.dispose();
        dialog = null;
    }
View Full Code Here

        } else if (e.getActionCommand().equals("locateFileMP")) {
            locateFile(DriveManager._PRECISION_MEDIUM);
        } else if (e.getActionCommand().equals("locateFileLP")) {
            locateFile(DriveManager._PRECISION_LOWEST);
        } else if (e.getActionCommand().equals("moveFile")) {
            BrowserDialog dialog = new BrowserDialog(DcResources.getText("msgSelectnewLocation"), null);
            File newDir = dialog.showSelectDirectoryDialog(this, null);
       
            if (newDir != null) {
                try {
                    File newFile = new File(newDir, file.getName());
                    Utilities.rename(file, newFile);
View Full Code Here

        this.file = new File(filename);
        text.setText(Utilities.getMappedFilename(filename));
    }

    protected void showFileSaveDialog() {
        BrowserDialog dialog = new BrowserDialog(title, filter);
        dialog.setFont(ComponentFactory.getStandardFont());
        File fileNew = dialog.showCreateFileDialog(this, file);
        file = fileNew != null ? fileNew : file;
        text.setText(getFilename());

        if (fileNew != null) {
            try {
                RandomAccessFile random = new RandomAccessFile(file, "rw");
                random.close();
            } catch (Exception exp) {
                DcSwingUtilities.displayErrorMessage("msgFileCouldNotbeCreated");
                logger.error(DcResources.getText("msgFileCouldNotbeCreated"), exp);
            }
        }
        dialog.dispose();
        dialog = null;
    }
View Full Code Here

        dialog.dispose();
        dialog = null;
    }

    protected void showFileOpenDialog() {
        BrowserDialog dialog = new BrowserDialog(title, filter);
        dialog.setFont(ComponentFactory.getStandardFont());
       
        if (previewPanel != null)
            dialog.setPreview(previewPanel);

        file = dialog.showOpenFileDialog(this, null);
        text.setText(getFilename());

        if (al != null) {
          al.actionPerformed(new ActionEvent(this.getParent(), 1, ""));
        }

        dialog.dispose();
        dialog = null;
    }
View Full Code Here

        dialog.dispose();
        dialog = null;
    }

    protected void showDirectoryOpenDialog() {
        BrowserDialog dialog = new BrowserDialog(title, filter);
        dialog.setFont(ComponentFactory.getStandardFont());
       
        file = dialog.showSelectDirectoryDialog(this, null);
        text.setText(getFilename());

        dialog.dispose();
        dialog = null;
    }
View Full Code Here

        }
    }
   
    private void openImageFromFile() {
        try {
            BrowserDialog dialog = new BrowserDialog("Select a new Image", new PictureFileFilter());
            File file = dialog.showOpenFileDialog(this, null);
            if (file != null) {
               
                if (file.toString().toLowerCase().endsWith(".svg")) {
                    SVGtoBufferedImageConverter converter = new SVGtoBufferedImageConverter();
                    BufferedImage bi = converter.renderSVG(file.toString());
View Full Code Here

        }
    }
   
    private void saveToFile() {
        if (picture != null) {
            BrowserDialog dlg = new BrowserDialog(DcResources.getText("lblSelectFile"),
                                                  new DcFileFilter("jpg"));
           
            File file = dlg.showCreateFileDialog(this, null);

            try {
                if (file != null) {
                    String filename = file.toString();
                    filename += filename.toLowerCase().endsWith("jpg") || filename.toLowerCase().endsWith("jpeg") ? "" : ".jpg";
View Full Code Here

    public void setEditable(boolean b) {}
   
    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getActionCommand().equals("addDirectory")) {
            BrowserDialog dlg = new BrowserDialog(DcResources.getText("msgSelectDirectory"));
            File directory = dlg.showSelectDirectoryDialog(this, null);
           
            if (directory != null) {
                tableDirectoriesAsDrives.addRow(new Object[] {directory.toString()});
            }
           
View Full Code Here

        return size;
    }
   
    private void loadImage() {
        PictureFileFilter filter = new PictureFileFilter();
        BrowserDialog dlg = new BrowserDialog("", filter);
        File file = dlg.showOpenFileDialog(this, null);
       
        if (file == null)
            return;
       
        try {
View Full Code Here

TOP

Related Classes of net.datacrow.console.windows.BrowserDialog

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.