Examples of XPlanetRessourceFinder


Examples of xplanetconfigurator.util.XPlanetRessourceFinder

        this.myRepaint();
    }

    private void showPreviewPanel() {
        this.hidePreviewPanel();
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String previewImage = rf.getPreviewImage();
        File f = new File(previewImage);
        if (f.exists() && f.isFile()) {
            long modified = f.lastModified();
            String timeStamp = TimeStamp.getTimestamp("yyyy-MM-dd HH:mm:ss.SSS", new Date(modified));
            Dimension d = this.getDimensionPreviewImage();
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * Insert (into parameters) the preview image as output.
     * @return the modified parameters
     */
    private String insertPreviewImage(String parameters) {
        // "-output", "(?i)(-output\\b)(\\s*)([^-]*)"
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String previewImage = rf.getPreviewImage();
        // Check if exists
        // Make directory if not exist.
        String output = "-output" + " " + previewImage;
        parameters = replaceParameter(parameters, output, "(?i)(-output\\b)(\\s*)([^-]*)");
        return parameters;
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * downloader config. Why? The proxy configuration is an exeption to other
     * configurations. The user does not want to type in the proxy all the time
     * he chooses an example from the list.
     */
    public void insertProxyConfigurationFromFile() {
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String configDir = rf.getRessourceDirectory("proxy");
        String file = configDir + File.separator + MainFrame.FILE_NAME_PROXY_CONFIG;
        File f = new File(file);
        if (f.exists()) {
            String proxyConfig = null;
            FileUtil util = new FileUtil();
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

        if (!"".equals(found) && buf.length() > 0) {
            buf.append("\n");
        }
        buf.append(found);

        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String configDir = rf.getRessourceDirectory("proxy");
        String file = configDir + File.separator + MainFrame.FILE_NAME_PROXY_CONFIG;
        FileUtil util = new FileUtil();
        try {
            util.printFile(file, buf.toString());
        } catch (Exception ex) {
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

    private void writeExampleConfigurationFromJarToFileSystem(String exampleName) {
        FileUtil util = new FileUtil();
        String dirInClasspath = "/xplanetconfigurator/gui/resources/examples/";
        String fileInClasspath = dirInClasspath + exampleName;
        XPlanetRessourceFinder f = new XPlanetRessourceFinder();
        String dirOnDisc = f.getRessourceDirectory("config");
        String fileOnDisc = dirOnDisc + File.separator + exampleName;
        String msg = "Copy example config file from classpath to file system... '" + fileInClasspath + "' > '" + fileOnDisc + "'";
        this.logger.finer(msg);
        try {
            util.copyRessourceFileToFileSystem(fileInClasspath, fileOnDisc);
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * add a marker file.
     */
    private void chooseSatfilesFromDirectory() {
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String downloaderRootDir = rf.getRootDirectoryForDownloads();
        String dir = downloaderRootDir + File.separator + "satellites";
        // Select the directory
        File f = new File(dir);
        String selectedFileName = (String) this.jComboBoxSatFile.getSelectedItem();
        if (selectedFileName != null) {
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * add a marker file.
     */
    private void chooseMarkerFromDirectory() {
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String downloaderRootDir = rf.getRootDirectoryForDownloads();
        String dir = downloaderRootDir + File.separator + "arcs";
        // Select the directory
        File f = new File(dir);
        String selectedFileName = (String) this.jComboBoxMarkerFile.getSelectedItem();
        if (selectedFileName != null) {
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * @param markerType e.g. 'image', 'bump_map',...
     */
    private void chooseFileFromDirectory(JTextField textField, String markerType) {
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String downloaderRootDir = rf.getRootDirectoryForDownloads();
        String dir = downloaderRootDir + File.separator + "images";
        // Select the directory
        File f = new File(dir);
        String selectedFileName = (String) textField.getText();
        if (selectedFileName != null) {
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * add a marker file.
     */
    private void chooseMarkerFromDirectory() {
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String downloaderRootDir = rf.getRootDirectoryForDownloads();
        String dir = downloaderRootDir + File.separator + "images";
        // Select the directory
        File f = new File(dir);
        String selectedFileName = (String) this.jTextFieldParameterCloudMap.getText();
        if (selectedFileName != null) {
View Full Code Here

Examples of xplanetconfigurator.util.XPlanetRessourceFinder

     * add a marker file.
     */
    private void chooseMarkerFromDirectory() {
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        XPlanetRessourceFinder rf = new XPlanetRessourceFinder();
        String downloaderRootDir = rf.getRootDirectoryForDownloads();
        String dir = downloaderRootDir + File.separator + "markers";
        // Select the directory
        File f = new File(dir);
        String selectedFileName = (String) this.jComboBoxMarkerFile.getSelectedItem();
        if (selectedFileName != null) {
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.