com.amx.duet.tools.comm.component
Class VirtualSourceSelectComponent

java.lang.Object
  extended bycom.amx.duet.devicesdk.component.SourceSelectComponentImpl
      extended bycom.amx.duet.tools.comm.component.VirtualSourceSelectComponent
All Implemented Interfaces:
ICommonComponent, com.amx.duet.devicesdk.component.ISourceSelectComponent, com.amx.duet.devicesdk.component.ISourceSelectComponent2, com.amx.duet.devicesdk.component.ISourceSelectComponent3, com.amx.duet.devicesdk.component.ISourceSelectComponentListener, com.amx.duet.devicesdk.component.ISourceSelectComponentListener2, com.amx.duet.devicesdk.component.ISourceSelectComponentListener3

public abstract class VirtualSourceSelectComponent
extends com.amx.duet.devicesdk.component.SourceSelectComponentImpl
implements ICommonComponent

The VirtualSourceSelectComponent class store and maintains a list of selectable sources for the device. Each source is added to both an internal list within this class and a list stored in the parent class. Input select group number has a 1:1 correlation with input source inputNumber. The input source should only be set to active if it has been configured within the group to be the only selectable source. Thus, in a device where all sources are selectable (mutually exclusive) each source must be set as an active source. The active source can be changed with a call to the updateInputSource() method.


Constructor Summary
VirtualSourceSelectComponent(com.amx.duet.devicesdk.component.ISourceSelectComponent caller, int index)
           
 
Method Summary
 void addInputProperty(int groupNumber, java.lang.String deviceLabel, com.amx.duet.devicesdk.type.AVType avType, com.amx.duet.devicesdk.type.InputSourceSelect sourceType, boolean bActive)
          Adds an InputProperty object to the source select list.
 void dispose()
          Class destructor used for clean up
 int getInputCount()
           
 java.lang.String[] getInputProperties()
           
 java.lang.String getInputProperty(int index)
           
 java.util.Vector getInputs()
          Returns the entire list of inputs.
 int getInputSelect()
           
 int getSelectedInput()
          Returns the currently selected input.
 com.amx.duet.devicesdk.component.ISourceSelectComponent getSourceSelectComponent()
          Returns the currently stored SourceSelectComponent.
 boolean isValidInput(com.amx.duet.devicesdk.type.InputSourceSelect sourceSelect, int inputNumber)
          Check to see if the InputSourceSelect matches up with the input number.
 void refresh()
          Process events for all applicable events for the component.
 void reinitialize()
          Reset local variables for the component.
 void setInputSelect(int index)
           
 void setInputSource(com.amx.duet.devicesdk.type.InputSourceSelectInfo sourceSelectInfo)
           
 void setInputSource(com.amx.duet.devicesdk.type.InputSourceSelect sourceSelect, int inputNumber)
           
 void updateInputSelect(int index)
          Sets the current Source Select Input Source.
The new value is compared against the current value.
 void updateInputSource(com.amx.duet.devicesdk.type.InputSourceSelect sourceSelect, int inputNumber)
           
 
Methods inherited from class com.amx.duet.devicesdk.component.SourceSelectComponentImpl
addInputSourceSelectInfo, addInputSourceSelectInfo, addSourceSelectComponentListener, cycleInputSelect, cycleInputSource, getInputGroupSelect, getInputSource, getSourceSelectComponent, getSourceSelectComponentCount, getSourceSelectComponentIndex, getSourceSelectDisplayText, getSourceSelectDisplayText, getSourceSelectDisplayText, getSourceSelectValues, processInputCountEvent, processInputGroupSelectEvent, processInputPropertiesEvent, processInputPropertyEvent, processInputSelectEvent, processInputSourceEvent, removeAll, removeInputSourceSelectInfo, removeInputSourceSelectInfo, removeSourceSelectComponentListener, setInputGroupSelect, updateInputCount, updateInputProperties, updateInputProperty, updateInputSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualSourceSelectComponent

public VirtualSourceSelectComponent(com.amx.duet.devicesdk.component.ISourceSelectComponent caller,
                                    int index)
Parameters:
caller -
index -
Method Detail

dispose

public void dispose()
Description copied from interface: ICommonComponent
Class destructor used for clean up

Specified by:
dispose in interface ICommonComponent

getInputCount

public int getInputCount()
Specified by:
getInputCount in interface com.amx.duet.devicesdk.component.ISourceSelectComponent2

addInputProperty

public void addInputProperty(int groupNumber,
                             java.lang.String deviceLabel,
                             com.amx.duet.devicesdk.type.AVType avType,
                             com.amx.duet.devicesdk.type.InputSourceSelect sourceType,
                             boolean bActive)
Adds an InputProperty object to the source select list. Each object is added to both an internal list within this class and the list stored in the parent class. Input select group number has a 1:1 correlation with input source inputNumber. The input source should only be set to active if it has been configured within the group to be the only selectable source. Thus, in a device where all sources are selectable (mutually exclusive) each source must be set as an active source.

Parameters:
groupNumber - integer value representing the selectable source
deviceLabel - description provided by device to represent source
avType - Audio/Video type
sourceType - type of input source (NamedInput or SignalType)
bActive - specifies that this is a selectable source

getInputProperties

public java.lang.String[] getInputProperties()
Specified by:
getInputProperties in interface com.amx.duet.devicesdk.component.ISourceSelectComponent2

getInputProperty

public java.lang.String getInputProperty(int index)
Specified by:
getInputProperty in interface com.amx.duet.devicesdk.component.ISourceSelectComponent2

getInputSelect

public int getInputSelect()
Specified by:
getInputSelect in interface com.amx.duet.devicesdk.component.ISourceSelectComponent2

getSelectedInput

public int getSelectedInput()
Returns the currently selected input.

Returns:
int selected input value.

getInputs

public java.util.Vector getInputs()
Returns the entire list of inputs.

Returns:
Vector

isValidInput

public boolean isValidInput(com.amx.duet.devicesdk.type.InputSourceSelect sourceSelect,
                            int inputNumber)
Check to see if the InputSourceSelect matches up with the input number.

Parameters:
sourceSelect - type of input source (NamedInput or SignalType)
inputNumber - input source select group number
Returns:
true if the two values go together; false otherwise.

setInputSelect

public void setInputSelect(int index)
Specified by:
setInputSelect in interface com.amx.duet.devicesdk.component.ISourceSelectComponent2

setInputSource

public void setInputSource(com.amx.duet.devicesdk.type.InputSourceSelect sourceSelect,
                           int inputNumber)
Specified by:
setInputSource in interface com.amx.duet.devicesdk.component.ISourceSelectComponent3

setInputSource

public void setInputSource(com.amx.duet.devicesdk.type.InputSourceSelectInfo sourceSelectInfo)
Specified by:
setInputSource in interface com.amx.duet.devicesdk.component.ISourceSelectComponent3

updateInputSelect

public void updateInputSelect(int index)
Sets the current Source Select Input Source.
The new value is compared against the current value. If the value has changed, the new value is saved and a process event for the Source Select Input Source is called.
This method should not be overridden by the programmer unless non-standard behavior is desired.

Parameters:
index - int the selected index within the source list

updateInputSource

public void updateInputSource(com.amx.duet.devicesdk.type.InputSourceSelect sourceSelect,
                              int inputNumber)

refresh

public void refresh()
Description copied from interface: ICommonComponent
Process events for all applicable events for the component.

Specified by:
refresh in interface ICommonComponent

reinitialize

public void reinitialize()
Description copied from interface: ICommonComponent
Reset local variables for the component.

Specified by:
reinitialize in interface ICommonComponent

getSourceSelectComponent

public com.amx.duet.devicesdk.component.ISourceSelectComponent getSourceSelectComponent()
Returns the currently stored SourceSelectComponent.

Returns:
ISourceSelectComponent


Copyright © 2008 AMX LLC. All Rights Reserved.