Package aohara.utilities

Examples of aohara.utilities.PropertyManager


//////////////////////////////////Constructor///////////////////////////////////
    public OptionsWindow(TrustGrapher trustGrapher) {
        this.trustGrapher = trustGrapher;
        initComponents();

        PropertyManager config = trustGrapher.getPropertyManager();

        if (config.containsKey(DELAY)) { //Load current delay from properties
            if (config.getProperty(DELAY).equals("" + EventPlayer.DEFAULT_DELAY)) { //If the current delay is the default delay
                defaultDelayButton.doClick();
                delayField.setText("");
            } else { //Otherwise, the delay is custom
                customDelayButton.doClick();
                delayField.setText(config.getProperty(DELAY));
            }
        }
        if (config.containsKey(SCRUB_MODE)) { //Load current playbackSlider mode from properties
            if (Boolean.parseBoolean(config.getProperty(SCRUB_MODE))) { //If the mode is set to scrub
                scrubButton.doClick();
            } else { //Othwerise, it must be set to drag & drop
                dragDropButton.doClick();
            }
        }
View Full Code Here


            PlaybackPanel playbackPanel = eventThread.getPlaybackPanel();
            if (playbackPanel != null) { //If the playbackPanel exists too
                playbackPanel.setScrubMode(scrubButton.isSelected()); //Set the scrub mode
            }
        }
        PropertyManager config = trustGrapher.getPropertyManager(); //Set the properties
        config.setProperty(DELAY, "" + delay);
        config.setProperty(SCRUB_MODE, scrubButton.isSelected() ? "true" : "false");
        config.save();
        dispose();
        //If there is an error with the customDelayField, give an error message, but don't do anything
    } catch (NumberFormatException ex) {
        ChatterBox.alert("You must enter an integer between 1 and 9 000");
    }
View Full Code Here

     */
    public final void setProperties(File propertyFile) {
        if (propertyFile == null){
            properties= null;
        }else{
            properties = (propertyFile.exists()) ? new PropertyManager(propertyFile) : null;
            if(algorithm!=null)
            {
              algorithm.setConfig(properties);
            }
        }
View Full Code Here

TOP

Related Classes of aohara.utilities.PropertyManager

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.