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

Diff of /jsampler/trunk/src/org/jsampler/task/Global.java

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

revision 1203 by iliev, Mon Apr 2 21:39:15 2007 UTC revision 1204 by iliev, Thu May 24 21:43:45 2007 UTC
# Line 27  import java.util.logging.Level; Line 27  import java.util.logging.Level;
27  import org.jsampler.CC;  import org.jsampler.CC;
28  import org.jsampler.HF;  import org.jsampler.HF;
29    
30    import org.linuxsampler.lscp.ServerInfo;
31    
32  import static org.jsampler.JSI18n.i18n;  import static org.jsampler.JSI18n.i18n;
33    
34    
# Line 40  public class Global { Line 42  public class Global {
42          private Global() { }          private Global() { }
43                    
44          /**          /**
45             * This task retrieves information about the LinuxSampler instance.
46             * @author Grigor Iliev
47             */
48            public static class GetServerInfo extends EnhancedTask<ServerInfo> {
49                    /** Creates a new instance of <code>GetServerInfo</code>. */
50                    public
51                    GetServerInfo() {
52                            setTitle("Global.GetServerInfo_task");
53                            setDescription(i18n.getMessage("Global.GetServerInfo.desc"));
54                    }
55                    
56                    /** The entry point of the task. */
57                    public void
58                    run() {
59                            try { setResult(CC.getClient().getServerInfo()); }
60                            catch(Exception x) {
61                                    setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x));
62                                    CC.getLogger().log(Level.FINE, getErrorMessage(), x);
63                            }
64                    }
65            }
66            
67            /**
68             * This task resets the whole sampler.
69             * @author Grigor Iliev
70             */
71            public static class ResetSampler extends EnhancedTask {
72                    /** Creates a new instance of <code>ResetSampler</code>. */
73                    public
74                    ResetSampler() {
75                            setTitle("Global.ResetSampler_task");
76                            setDescription(i18n.getMessage("Global.ResetSampler.desc"));
77                    }
78                    
79                    /** The entry point of the task. */
80                    public void
81                    run() {
82                            try { CC.getClient().resetSampler(); }
83                            catch(Exception x) {
84                                    setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x));
85                                    CC.getLogger().log(Level.FINE, getErrorMessage(), x);
86                            }
87                    }
88            }
89            
90            /**
91           * This task gets the global volume of the sampler.           * This task gets the global volume of the sampler.
92           */           */
93          public static class GetVolume extends EnhancedTask<Float> {          public static class GetVolume extends EnhancedTask<Float> {

Legend:
Removed from v.1203  
changed lines
  Added in v.1204

  ViewVC Help
Powered by ViewVC