/[svn]/jsampler/trunk/src/org/jsampler/Prefs.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/Prefs.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1687 by iliev, Sat Sep 8 18:33:05 2007 UTC revision 1688 by iliev, Thu Feb 14 16:52:36 2008 UTC
# Line 47  public class Prefs { Line 47  public class Prefs {
47          private final static String INTERFACE_FONT = "iface.font";          private final static String INTERFACE_FONT = "iface.font";
48          private final static String DEF_INTERFACE_FONT = null;          private final static String DEF_INTERFACE_FONT = null;
49                    
         private final static String LS_ADDRESS = "LinuxSampler.address";  
         private final static String DEF_LS_ADDRESS = "127.0.0.1";  
           
         private final static String LS_PORT = "LinuxSampler.port";  
         private final static int DEF_LS_PORT = 8888;  
           
50                                    
51          private static Preferences userPrefs = Preferences.userRoot().node(prefNode);          private static Preferences userPrefs = Preferences.userRoot().node(prefNode);
52                    
# Line 182  public class Prefs { Line 176  public class Prefs {
176                  }                  }
177                  return false;                  return false;
178          }          }
           
         /**  
          * Gets the LinuxSampler address.  
          * @return The LinuxSampler address.  
          */  
         public static String  
         getLSAddress() { return user().get(LS_ADDRESS, DEF_LS_ADDRESS); }  
           
         /**  
          * Sets the LinuxSampler address.  
          * @param address The LinuxSampler address.  
          */  
         public static void  
         setLSAddress(String address) {  
                 if(address.length() == 0) user().remove(LS_ADDRESS);  
                 else if(!address.equals(getLSAddress()))  
                         user().put(LS_ADDRESS, address);  
         }  
   
         /**  
          * Gets the LinuxSampler port.  
          * @return The LinuxSampler port number.  
          */  
         public static int  
         getLSPort() { return user().getInt(LS_PORT, DEF_LS_PORT); }  
           
         /**  
          * Sets the LinuxSampler port number.  
          * This method das not check the validity of the port number.  
          * @param port the port number. Use -1 to reset to default value.  
          */  
         public static void  
         setLSPort(int port) {  
                 if(port == -1) user().remove(LS_PORT);  
                 else if(port != getLSPort()) user().putInt(LS_PORT, port);  
         }  
179  }  }

Legend:
Removed from v.1687  
changed lines
  Added in v.1688

  ViewVC Help
Powered by ViewVC