model
Interface ILightModelConnector

All Superinterfaces:
IUpdateChannel, IUpdateFadeProgress

public interface ILightModelConnector
extends IUpdateFadeProgress, IUpdateChannel

This metohd connects the model to the view.


Method Summary
 void deviceDisconnected()
          This method will notify the view if the device has disconnected without the view specifically telling it to disconnect.
 void raiseError(String error, String desc)
          This method will notify the user of the given error.
 void raiseError(Throwable error, String desc)
          This method will notify the user of the given error.
 void selectCueWithoutTransition(String cueNumber)
          This method will make the view select a cue, without triggering a transition to that cue.
 void setChannelSource(Channel channel, float[] source)
          This method will set the source for the given channel.
 void setChannelSource(short address, float[] source)
          This method sets the source for the given address.
 void setChannelSources(Channel[] channels, float[][] sources)
          This method will set the sources for the given channels to the given sources.
 void setChannelSources(short[] addresses, float[][] sources)
          This method will set the channel sources for the given addresses.
 void toggleDataEntry(boolean enabled)
          This method will toggle all data entry on the form.
 void updateChannel(Channel channel, float[] source)
          This method will update the given channel on the view, with the given value and source.
 void updateChannels(Channel[] channels, float[][] sources)
          This method will update the given channels on the view with the given values and sources.
 void updateCueList()
          This method will tell the view to update the cue list.
 
Methods inherited from interface model.IUpdateFadeProgress
updateFadeDownProgress, updateFadeUpProgress
 
Methods inherited from interface model.IUpdateChannel
updateChannel, updateChannels
 

Method Detail

updateChannel

void updateChannel(Channel channel,
                   float[] source)
This method will update the given channel on the view, with the given value and source.

Parameters:
channel - The address, value pair of the channel to be updated.
source - The sources of the given channel.

updateChannels

void updateChannels(Channel[] channels,
                    float[][] sources)
This method will update the given channels on the view with the given values and sources.

Parameters:
channels - The address, value pairs of the channels to be updated.
sources - The sources for the given channels.

updateCueList

void updateCueList()
This method will tell the view to update the cue list.

TODO: This metohd should probably just pass the current cues to the view, instead of making the view then call back to the model, which then passes the values on.


selectCueWithoutTransition

void selectCueWithoutTransition(String cueNumber)
This method will make the view select a cue, without triggering a transition to that cue.

Parameters:
cueNumber - The number of the cue to select.

toggleDataEntry

void toggleDataEntry(boolean enabled)
This method will toggle all data entry on the form. This is used to prevent data entry during a fade.

Parameters:
enabled - Passing in true will allow input, and pasing in false is disable input.

setChannelSource

void setChannelSource(short address,
                      float[] source)
This method sets the source for the given address.

Parameters:
address - The address to set the source for.
source - The source to set.

setChannelSource

void setChannelSource(Channel channel,
                      float[] source)
This method will set the source for the given channel. The channel's value will be ignored.

Parameters:
channel - The channel to set the source on. The channel's value will be ignored.
source - The source to set.

setChannelSources

void setChannelSources(short[] addresses,
                       float[][] sources)
This method will set the channel sources for the given addresses.

Parameters:
addresses - The addresses to set the sources for.
sources - The sources to set.

setChannelSources

void setChannelSources(Channel[] channels,
                       float[][] sources)
This method will set the sources for the given channels to the given sources.

Parameters:
channels - The channels to set the source on. The channel's value will be ignored.
sources - The sources to set.

raiseError

void raiseError(String error,
                String desc)
This method will notify the user of the given error.

Parameters:
error - The error, usually including the stack trace.
desc - The description of the error: why this might have occured, what to do about it, etc. This will be displayed above the error message to the user.

raiseError

void raiseError(Throwable error,
                String desc)
This method will notify the user of the given error. It will use the stack trace from the given exception as the error message.

Parameters:
error - The throwable error to use the stack trace from for the error message.
desc - The description of the error: why this might have occured, what to do about it, etc. This will be displayed above the error message to the user.

deviceDisconnected

void deviceDisconnected()
This method will notify the view if the device has disconnected without the view specifically telling it to disconnect.