/[svn]/jsampler/trunk/src/org/jsampler/view/fantasia/ViewConfig.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/fantasia/ViewConfig.java

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

revision 1766 by iliev, Mon Aug 11 22:51:24 2008 UTC revision 1767 by iliev, Mon Sep 8 00:19:27 2008 UTC
# Line 74  public class ViewConfig extends JSViewCo Line 74  public class ViewConfig extends JSViewCo
74          public JSPrefs          public JSPrefs
75          preferences() { return FantasiaPrefs.preferences(); }          preferences() { return FantasiaPrefs.preferences(); }
76                    
77            /** Exports the view configuration of the current session. */
78            public String
79            exportSessionViewConfig() {
80                    StringBuffer sb = new StringBuffer();
81                    MainFrame frame = (MainFrame)CC.getMainFrame();
82                    
83                    for(int i = 0; i < frame.getChannelsPane(0).getChannelCount(); i++) {
84                            Channel c = (Channel)frame.getChannelsPane(0).getChannel(i);
85                            
86                            sb.append("#jsampler.fantasia: [channel]\r\n");
87                            
88                            switch(c.getViewTracker().getOriginalView().getType()) {
89                                    case SMALL:
90                                            sb.append("#jsampler.fantasia: viewType = SMALL\r\n");
91                                            break;
92                                            
93                                    case NORMAL:
94                                            sb.append("#jsampler.fantasia: viewType = NORMAL\r\n");
95                                            break;
96                            }
97                            
98                            sb.append("#jsampler.fantasia: \r\n");
99                    }
100                    
101                    MidiDevicesPane midi = frame.getRightSidePane().getDevicesPane().getMidiDevicesPane();
102                    
103                    for(int i = 0; i < midi.getDevicePaneCount(); i++) {
104                            sb.append("#jsampler.fantasia: [MIDI device]\r\n");
105                            
106                            if(midi.getDevicePaneAt(i).isOptionsPaneExpanded()) {
107                                    sb.append("#jsampler.fantasia: expanded = true\r\n");
108                            } else {
109                                    sb.append("#jsampler.fantasia: expanded = false\r\n");
110                            }
111                            
112                            sb.append("#jsampler.fantasia: \r\n");
113                    }
114                    
115                    return sb.toString();
116            }
117            
118          public InstrumentsDbTreeView          public InstrumentsDbTreeView
119          getInstrumentsDbTreeView() { return instrumentsDbTreeView; }          getInstrumentsDbTreeView() { return instrumentsDbTreeView; }
120                    
# Line 126  public class ViewConfig extends JSViewCo Line 167  public class ViewConfig extends JSViewCo
167                                    
168                  public Icon                  public Icon
169                  getPreferences16Icon() { return Res.iconPreferences16; }                  getPreferences16Icon() { return Res.iconPreferences16; }
170                    
171                    public Icon
172                    getWarning32Icon() { return Res.iconWarning32; }
173                    
174                    public Icon
175                    getQuestion32Icon() { return Res.iconQuestion32; }
176          }          }
177                    
178          public boolean          public boolean

Legend:
Removed from v.1766  
changed lines
  Added in v.1767

  ViewVC Help
Powered by ViewVC