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

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

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

revision 1736 by iliev, Sun May 4 18:58:16 2008 UTC revision 1737 by iliev, Thu May 8 17:26:19 2008 UTC
# Line 59  import static org.jsampler.view.fantasia Line 59  import static org.jsampler.view.fantasia
59   */   */
60  public class SmallChannelView extends PixmapPane implements ChannelView {  public class SmallChannelView extends PixmapPane implements ChannelView {
61          private final Channel channel;          private final Channel channel;
62          private final ChannelOptionsView channelOptionsView;          private ChannelOptionsView channelOptionsView = null;
63                    
64          private final ChannelScreen screen;          private final ChannelScreen screen;
65          private final Channel.PowerButton btnPower;          private final Channel.PowerButton btnPower;
# Line 69  public class SmallChannelView extends Pi Line 69  public class SmallChannelView extends Pi
69                    
70          private final Vector<JComponent> components = new Vector<JComponent>();          private final Vector<JComponent> components = new Vector<JComponent>();
71                    
         /** Creates a new instance of <code>SmallChannelView</code> */  
         public  
         SmallChannelView(Channel channel) {  
                 this(channel, new NormalChannelOptionsView(channel));  
         }  
72                    
73          /** Creates a new instance of <code>SmallChannelView</code> */          /** Creates a new instance of <code>SmallChannelView</code> */
74          public          public
75          SmallChannelView(Channel channel, ChannelOptionsView channelOptionsView) {          SmallChannelView(Channel channel) {
76                  super(Res.gfxDeviceBg);                  super(Res.gfxDeviceBg);
                   
77                  setPixmapInsets(new Insets(1, 1, 1, 1));                  setPixmapInsets(new Insets(1, 1, 1, 1));
78                                    
79                  components.add(this);                  components.add(this);
80                                    
81                  this.channel = channel;                  this.channel = channel;
                 this.channelOptionsView = channelOptionsView;  
82                                    
83                  screen = new ChannelScreen(channel);                  screen = new ChannelScreen(channel);
84                                    
# Line 161  public class SmallChannelView extends Pi Line 154  public class SmallChannelView extends Pi
154          public void          public void
155          uninstallView() {          uninstallView() {
156                  //removeEnhancedMouseListener(channel.getContextMenu());                  //removeEnhancedMouseListener(channel.getContextMenu());
157                    btnOptions.onDestroy();
158                    uninstallChannelOptionsView();
159            }
160            
161            public void
162            installChannelOptionsView() {
163                    if(channelOptionsView != null) return;
164                    
165                    channelOptionsView = new NormalChannelOptionsView(channel);
166                    channelOptionsView.installView();
167                    
168            }
169            
170            public void
171            uninstallChannelOptionsView() {
172                    if(channelOptionsView == null) return;
173                    channelOptionsView.uninstallView();
174                    channelOptionsView = null;
175          }          }
176                    
177          public ChannelOptionsView          public ChannelOptionsView
# Line 180  public class SmallChannelView extends Pi Line 191  public class SmallChannelView extends Pi
191                  boolean b = sc.getEngine() != null;                  boolean b = sc.getEngine() != null;
192                  btnSolo.setEnabled(b);                  btnSolo.setEnabled(b);
193                  btnMute.setEnabled(b);                  btnMute.setEnabled(b);
194                    
195                    if(getChannelOptionsView() != null) getChannelOptionsView().updateChannelInfo();
196          }          }
197                    
198          public void          public void

Legend:
Removed from v.1736  
changed lines
  Added in v.1737

  ViewVC Help
Powered by ViewVC