Package org.apache.tools.ant.gui.core

Examples of org.apache.tools.ant.gui.core.PropertiesManager$NoSuchPropertyException


    /**
     * Save the window size for the next session
     */
    protected void persistSize () {
        Dimension d = getSize();
        PropertiesManager pm = _context.getPropertiesManager();
        pm.setProperty("MainFrame.height", new Integer(new Double(d.getHeight()).intValue()).toString());
        pm.setProperty("MainFrame.width", new Integer(new Double(d.getWidth()).intValue()).toString());
        try {
        _context.saveProperties();
        }
        catch (java.io.FileNotFoundException e) {
            // log it?
View Full Code Here


   
     /**
     * Restore the window size from the previous session
     */
    protected void restorePersistentSize () {
      PropertiesManager pm = _context.getPropertiesManager();
      try {
      setSize(pm.get_int_property("MainFrame.width"), pm.get_int_property("MainFrame.height"));
      }
      catch (PropertiesManager.NoSuchPropertyException e) {
       // Just means that it's never been saved to persistent properties yet.  
      }
     
View Full Code Here

    /**
     * Saves the list to the global PropertiesManager and causes a props file save.
     */
    protected void saveList() {
        Iterator i = _fileList.keySet().iterator();
        PropertiesManager pm = getContext().getPropertiesManager();
        while(i.hasNext()) {
            String key = (String) i.next();
            String value = (String) _fileList.get(key);
            pm.setProperty(makeReopenerFilelistKey(key), value);
        }
        try {
            getContext().saveProperties();
        }
        catch (java.io.FileNotFoundException e) {
View Full Code Here

    /**
     * Refreshes the Properties used by the Reopened from the global PropertiesManager.
     */
    protected void loadList() {
        _fileList.clear();
        PropertiesManager pm = getContext().getPropertiesManager();
        Iterator i = pm.keySet().iterator();
        String key = null;
        String value = null;
        while(i.hasNext()) {
            key = (String) i.next();
            if (isReopenerFilelistKey(key)) {
                value = (String) pm.getProperty(key);
                _fileList.setProperty(stripReopenerFilelistKey(key), value);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.gui.core.PropertiesManager$NoSuchPropertyException

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.