74 |
*/ |
*/ |
75 |
public class NormalChannelView extends PixmapPane implements ChannelView { |
public class NormalChannelView extends PixmapPane implements ChannelView { |
76 |
private final Channel channel; |
private final Channel channel; |
77 |
private final ChannelOptionsView channelOptionsView; |
private ChannelOptionsView channelOptionsView = null; |
78 |
|
|
79 |
private final EnhancedDial dialVolume = new EnhancedDial(); |
private final EnhancedDial dialVolume = new EnhancedDial(); |
80 |
private final ChannelScreen screen; |
private final ChannelScreen screen; |
90 |
/** Creates a new instance of <code>NormalChannelView</code> */ |
/** Creates a new instance of <code>NormalChannelView</code> */ |
91 |
public |
public |
92 |
NormalChannelView(Channel channel) { |
NormalChannelView(Channel channel) { |
|
this(channel, new NormalChannelOptionsView(channel)); |
|
|
} |
|
|
|
|
|
/** Creates a new instance of <code>NormalChannelView</code> */ |
|
|
public |
|
|
NormalChannelView(Channel channel, ChannelOptionsView channelOptionsView) { |
|
93 |
super(Res.gfxChannel); |
super(Res.gfxChannel); |
94 |
setPixmapInsets(new Insets(3, 3, 3, 3)); |
setPixmapInsets(new Insets(3, 3, 3, 3)); |
95 |
|
|
96 |
components.add(this); |
components.add(this); |
97 |
|
|
98 |
this.channel = channel; |
this.channel = channel; |
|
this.channelOptionsView = channelOptionsView; |
|
99 |
|
|
100 |
btnPower = new Channel.PowerButton(channel); |
btnPower = new Channel.PowerButton(channel); |
101 |
components.add(btnPower); |
components.add(btnPower); |
239 |
public void |
public void |
240 |
uninstallView() { |
uninstallView() { |
241 |
screen.onDestroy(); |
screen.onDestroy(); |
242 |
|
btnOptions.onDestroy(); |
243 |
|
uninstallChannelOptionsView(); |
244 |
//removeEnhancedMouseListener(channel.getContextMenu()); |
//removeEnhancedMouseListener(channel.getContextMenu()); |
245 |
} |
} |
246 |
|
|
247 |
|
public void |
248 |
|
installChannelOptionsView() { |
249 |
|
if(channelOptionsView != null) return; |
250 |
|
|
251 |
|
channelOptionsView = new NormalChannelOptionsView(channel); |
252 |
|
channelOptionsView.installView(); |
253 |
|
|
254 |
|
} |
255 |
|
|
256 |
|
public void |
257 |
|
uninstallChannelOptionsView() { |
258 |
|
if(channelOptionsView == null) return; |
259 |
|
channelOptionsView.uninstallView(); |
260 |
|
channelOptionsView = null; |
261 |
|
} |
262 |
|
|
263 |
public ChannelOptionsView |
public ChannelOptionsView |
264 |
getChannelOptionsView() { return channelOptionsView; } |
getChannelOptionsView() { return channelOptionsView; } |
265 |
|
|
280 |
dialVolume.setEnabled(b); |
dialVolume.setEnabled(b); |
281 |
btnSolo.setEnabled(b); |
btnSolo.setEnabled(b); |
282 |
btnMute.setEnabled(b); |
btnMute.setEnabled(b); |
283 |
|
|
284 |
|
if(getChannelOptionsView() != null) getChannelOptionsView().updateChannelInfo(); |
285 |
} |
} |
286 |
|
|
287 |
public void |
public void |