|
|||||||||
| 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.
| Field Summary | |
|---|---|
static int |
CUE_VALUE_MODE
These modes relate to the status of specific channels at any given time. |
static int |
DEFAULT_VALUE_MODE
These modes relate to the status of specific channels at any given time. |
static int |
FADE_DOWN_MODE
These modes relate to the status of specific channels at any given time. |
static int |
FADE_UP_MODE
These modes relate to the status of specific channels at any given time. |
static int |
FADER_VALUE_MODE
These modes relate to the status of specific channels at any given time. |
static int |
SUBMASTER_VALUE_MODE
These modes relate to the status of specific channels at any given time. |
| 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 |
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. |
short[] |
getChannelValues(short startAddress,
short endAddress)
This method returns an array of channel values between, and including, 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,
int source)
This method will set the channel value to the given value. |
void |
setChannelValues(Channel[] channels,
int source)
This method will set a series of channel values. |
void |
transitionToCue(float cueNumber)
This method initiates the fade to a new cue from the current cue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_VALUE_MODE
The DEFAULT_VALUE_MODE is utilized when a channel does not have any value assigned to it, and is simply the default vale of 0.
public static final int FADER_VALUE_MODE
The FADER_VALUE_MODE is utilized when the value on this channel is manually set through the virual faders (or keyboard input).
public static final int CUE_VALUE_MODE
The CUE_VALUE_MODE is utilized when the value on this channel is from the current cue.
public static final int SUBMASTER_VALUE_MODE
The SUBMASTER_VALUE_MODE is utilized when the current value on this channel is from the submasters.
public static final int FADE_UP_MODE
The FADE_UP_MODE is utilized when a channel is being faded up in value by a cue transition.
public static final int FADE_DOWN_MODE
The FADE_DOWN_MODE is utilized when a channel is being faded down in value by a cue transition.
| 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 startAddress,
short endAddress)
startAddress - The first address for which a channel value will be returned.endAddress - The last address for which a channel 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,
int source)
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,
int 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 transitionToCue(float cueNumber)
cueNumber - The number of the cue to fade 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 | ||||||||