|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.LightModel
public class LightModel
This is the main class for the Model part of the program. All communcations between the model and controller go through this class. Additionally, this class contains the current Show, ADMXDevice, and ChannelValues.
Constructor Summary | |
---|---|
LightModel(ILightModelConnector _connector,
ADMXDevice _dmxDevice,
Show _show)
This constructor instaniates the LightModel with a link to the connector, the current dmx device, and the default Show. |
Method Summary | |
---|---|
void |
addCue(ACue cue)
This method adds a new cue to the current show. |
boolean |
connect()
This method will tell the view to the connect to the USBDMX.com device. |
void |
cueTransition(float oldCueNumber,
float newCueNumber)
This method will start a transition from the old cue to the new cue. |
void |
disconnect()
This method will tell the model to disconnect from the current device, and switch to the dummy DMX device. |
Channel[] |
getChannels()
This method will return an array of Channel objects for every channel with a non-zero value. |
Channel[] |
getChannelsForCue()
This is a specilized form of getChannels() used when creating new cues. |
short |
getChannelValue(short address)
This method returns the value of the given channel address. |
short[] |
getChannelValues(short[] addresses)
This method will return the channel values for the given addresses. |
String[] |
getCueNames()
This method will return an array containing the summary of every cue in the show. |
float |
getHighestCueNumber()
This method will return the highest cue number in the show. |
void |
goToCue(float cueNumber)
This method will move to a cue without a transition. |
void |
loadShow(String filename)
This method will load the saved show back into the program. |
void |
resetFaderValues()
This method will reset all the fader values to their defaults, and update the view to reflect this change. |
void |
saveShow(String filename)
This method will save the current show to a file. |
void |
setChannelValue(Channel channel,
float source)
This method will set the channel value to the given value. |
void |
setChannelValues(Channel[] channels,
float source)
This method will set a series of channel values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LightModel(ILightModelConnector _connector, ADMXDevice _dmxDevice, Show _show)
Method Detail |
---|
public short getChannelValue(short address)
address
- The address whos value will be returned.
public short[] getChannelValues(short[] addresses)
addresses
- The array of channel addresses.
public Channel[] getChannels()
public Channel[] getChannelsForCue()
public void setChannelValue(Channel channel, float source)
TODO: Change this method so an exception won't screw up the stored values.
channel
- The Channel object with the new address, value pair.source
- An int representing the source of this channel value.public void setChannelValues(Channel[] channels, float source)
channels
- The Channel objects with the new address, value pairs.source
- An int value representing the source of these channel values.public void addCue(ACue cue)
public void resetFaderValues()
public String[] getCueNames()
TODO: Rename this method from getCueNames() to getCueSummaries()
public float getHighestCueNumber()
public void cueTransition(float oldCueNumber, float newCueNumber)
TODO: It appears this method is no longer necessary.
oldCueNumber
- The number of the cue to transition away from.newCueNumber
- The number of the cue to transition to.public void goToCue(float cueNumber)
cueNumber
- The cue number to go to.public boolean connect()
TODO: This method needs to be redone so that the user can select what device they want to connect to.
public void disconnect()
public void saveShow(String filename)
filename
- The file name and path to save the show to.public void loadShow(String filename)
filename
- The file name and path to load the show from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |