Examples of OwnPreferences


Examples of xplanetconfigurator.util.OwnPreferences

        int y = this.getY();
        Dimension d = this.getSize();
        int h = (int) d.getHeight();
        int w = (int) d.getWidth();

        OwnPreferences prefs =
                OwnPreferences.userNodeForPackage(this.getClass());

        prefs.putInt(FRAME_X, x);
        prefs.putInt(FRAME_Y, y);
        prefs.putInt(FRAME_HEIGHT, h);
        prefs.putInt(FRAME_WITH, w);
    }
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

        prefs.putInt(FRAME_HEIGHT, h);
        prefs.putInt(FRAME_WITH, w);
    }

    private void loadUserPrefs() {
        OwnPreferences prefs =
                OwnPreferences.userNodeForPackage(this.getClass());

        int x = prefs.getInt(FRAME_X, 10);
        int y = prefs.getInt(FRAME_Y, 10);
        int h = prefs.getInt(FRAME_HEIGHT, 600);
        int w = prefs.getInt(FRAME_WITH, 500);

        this.setSize(new Dimension(w, h));
        // System.out.println("Start info = " + info);
        if (x == 10 && y == 10) // First use
        {
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

       
        logger.finer("Setting the System Property 'java.util.logging.config.file' to file: '" + file + "'...");
        System.setProperty("java.util.logging.config.file", file);
       
        logger.finer("Setting the user pref '" + LoggingInitializer.FILE_NAME + "' to file: '" + file + "'...");
        OwnPreferences prefs = OwnPreferences.userNodeForPackage(this.getClass());
        prefs.put(LoggingInitializer.FILE_NAME, file);
       
    }
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

                logger.finer("Did not found logging configuratin file: " + externallySetLogfile);
            }
        }
       
        // Find the file store in user prefs.
        OwnPreferences prefs = OwnPreferences.userNodeForPackage(this.getClass());
        String file = prefs.get(LoggingInitializer.FILE_NAME, null);
        logger.finer("Preferences gave logging configuration file: '" + file + "'.");
        if(file != null)
        {
            File f = new File(file);
            if(f.exists())
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

     * Fills the components like text fielsd. Leaves the default values if no
     * value is found in the user preferences. The values where set prior to this
     * operation to default values.
     */
    private void loadUserPrefsGUI() {
        OwnPreferences prefs =
                OwnPreferences.userNodeForPackage(this.getClass());

        // Position frame
        int x = prefs.getInt(JFrameLogginConfigurator.FRAME_X, 10);
        int y = prefs.getInt(JFrameLogginConfigurator.FRAME_Y, 10);
        int w = prefs.getInt(JFrameLogginConfigurator.FRAME_W, 10);
        int h = prefs.getInt(JFrameLogginConfigurator.FRAME_H, 10);

        // Fill components. Leave value if user pref not found.
        String s = prefs.get(JFrameLogginConfigurator.USE_FILE_HANDLER, "");
        if (!"".equals(s)) {
            this.jCheckBoxUseFileHandler.setSelected(false);
            if (s.equalsIgnoreCase("true")) {
                this.jCheckBoxUseFileHandler.setSelected(true);
            }
        }

        s = prefs.get(JFrameLogginConfigurator.USE_CONSOLE_HANDLER, "");
        if (!"".equals(s)) {
            this.jCheckBoxUseConsoleHandler.setSelected(false);
            if (s.equalsIgnoreCase("true")) {
                this.jCheckBoxUseConsoleHandler.setSelected(true);
            }
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_LEVEL, "");
        if (!"".equals(s)) {
            this.jComboBoxLogLevel.setSelectedItem(s);
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_DIRECTORY, "");
        if (!"".equals(s)) {
            this.jTextFieldDirectory.setText(s);
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_FILE_NAME, "");
        if (!"".equals(s)) {
            this.jTextFieldFileName.setText(s);
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_FILE_COUNT, "");
        if (!"".equals(s)) {
            this.jTextFieldMaxFileCount.setText(s);
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_FILE_SIZE, "");
        if (!"".equals(s)) {
            this.jTextFieldMaxFileSize.setText(s);
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_FILE_APPEND, "");
        if (!"".equals(s)) {
            this.jCheckBoxAppendFile.setSelected(false);
            if (s.equalsIgnoreCase("true")) {
                this.jCheckBoxAppendFile.setSelected(true);
            }
        }

        s = prefs.get(JFrameLogginConfigurator.FORMATTER, "");
        if (!"".equals(s)) {
            this.jTextFieldFormatter.setText(s);
        }

        s = prefs.get(JFrameLogginConfigurator.LOG_CONFIG_FILE, "");
        if (!"".equals(s)) {
            this.jTextFieldLogConfigFile.setText(s);
        }

        this.pack();
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

                    "Formatter class not found in classpath.\n\n" + "Class name is:\n" + className);
        }

        // Store in user prefs

        OwnPreferences prefs =
                OwnPreferences.userNodeForPackage(this.getClass());

        boolean b = this.jCheckBoxUseFileHandler.isSelected();
        prefs.put(JFrameLogginConfigurator.USE_FILE_HANDLER, Boolean.toString(b));

        b = this.jCheckBoxUseConsoleHandler.isSelected();
        prefs.put(JFrameLogginConfigurator.USE_CONSOLE_HANDLER, Boolean.toString(b));

        String s = (String) this.jComboBoxLogLevel.getSelectedItem();
        prefs.put(JFrameLogginConfigurator.LOG_LEVEL, s);

        s = this.jTextFieldDirectory.getText();
        prefs.put(JFrameLogginConfigurator.LOG_DIRECTORY, s);

        s = this.jTextFieldFileName.getText();
        prefs.put(JFrameLogginConfigurator.LOG_FILE_NAME, s);

        s = this.jTextFieldMaxFileCount.getText();
        prefs.put(JFrameLogginConfigurator.LOG_FILE_COUNT, s);

        s = this.jTextFieldMaxFileSize.getText();
        prefs.put(JFrameLogginConfigurator.LOG_FILE_SIZE, s);

        b = this.jCheckBoxAppendFile.isSelected();
        prefs.put(JFrameLogginConfigurator.LOG_FILE_APPEND, Boolean.toString(b));

        s = this.jTextFieldFormatter.getText();
        prefs.put(JFrameLogginConfigurator.FORMATTER, s);

        s = this.jTextFieldLogConfigFile.getText();
        prefs.put(JFrameLogginConfigurator.LOG_CONFIG_FILE, s);

        return this.modifyLoggingConfigurationFile();
    }
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

        int y = this.getY();
        java.awt.Dimension d = this.getSize();
        int h = (int) d.getHeight();
        int w = (int) d.getWidth();

        OwnPreferences prefs =
                OwnPreferences.userNodeForPackage(this.getClass());

        // Frame position an size
        prefs.putInt(JFrameLogginConfigurator.FRAME_X, x);
        prefs.putInt(JFrameLogginConfigurator.FRAME_Y, y);
        prefs.putInt(JFrameLogginConfigurator.FRAME_H, h);
        prefs.putInt(JFrameLogginConfigurator.FRAME_W, w);
    }
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

        this.sendDownloadParamterWaitMinusOne();
    }

    private void loadUserPrefs() {
        logger.finer("Getting user preferences...");
        OwnPreferences prefs = OwnPreferences.userNodeForPackage(this.getClass())// Position an size of frame

        int i = prefs.getInt(JPanelControlDownloaderMaps.GUI_DIVIDER_LOCATION_HORIZONTAL, 300);
        this.jSplitPaneMain.setDividerLocation(i);
    }
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

        int i = prefs.getInt(JPanelControlDownloaderMaps.GUI_DIVIDER_LOCATION_HORIZONTAL, 300);
        this.jSplitPaneMain.setDividerLocation(i);
    }

    private void saveUserPrefs() {
        OwnPreferences prefs = OwnPreferences.userNodeForPackage(this.getClass());
        prefs.putInt(JPanelControlDownloaderMaps.GUI_DIVIDER_LOCATION_HORIZONTAL, this.jSplitPaneMain.getDividerLocation());
    }
View Full Code Here

Examples of xplanetconfigurator.util.OwnPreferences

        int y = this.getY();
        Dimension d = this.getSize();
        int h = (int) d.getHeight();
        int w = (int) d.getWidth();

        OwnPreferences prefs = OwnPreferences.userNodeForPackage(this.getClass());

        prefs.putInt(JDialogFind.FRAME_X, x);
        prefs.putInt(JDialogFind.FRAME_Y, y);
        prefs.putInt(JDialogFind.FRAME_HEIGHT, h);
        prefs.putInt(JDialogFind.FRAME_WIDTH, w);
    }
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.