|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
be.lassi.domain
Class Groups
java.lang.Object be.lassi.base.SaveableObject be.lassi.domain.Groups
- All Implemented Interfaces:
- java.lang.Iterable<Group>
public class Groups
- extends SaveableObject
- implements java.lang.Iterable<Group>
- extends SaveableObject
Collection of channel groups.
Constructor Summary | |
---|---|
Groups()
Constructs a new instance. |
|
Groups(Dirty dirty)
Constructs a new instance. |
Method Summary | |
---|---|
void |
add(Group group)
Adds a new channel group. |
void |
addGroupsListener(LListListener<Group> listener)
|
boolean |
equals(java.lang.Object object)
|
Group |
get(int index)
Gets the channel group at given index. |
Channel |
getChannel(int index)
Gets the channel with given index, within the channels of the currently enabled groups. |
int |
getChannelCount(int totalChannelCount)
Gets the overall number of channels all of the groups. |
int[] |
getChannelsNotInGroup(boolean any,
int groupIndex,
int totalChannelCount)
Gets the indexes of the channels that are not included in the currently selected group. |
int |
getChannelsNotInGroupCount(boolean any,
int groupIndex,
int totalChannelCount)
|
int |
getEnabledGroupCount()
Gets the number of channel groups that are currently enabled. |
int |
getEnabledGroupsChannelCount()
Gets the number of channels in all currently enabled groups. |
int |
getIndexOfChannelWithId(int id)
|
Listeners |
getListeners()
Gets the listeners that are interested in group changes. |
int |
hashCode()
|
boolean |
includes(Channel channel)
|
boolean |
isEnabled()
Indicates whether at least one of the channel groups is currently enabled. |
boolean |
isEnabled(int index)
Indicates whether group with given index is enabled. |
java.util.Iterator<Group> |
iterator()
|
SelectionInterval |
moveDown(int[] indexes)
Move the groups at given indexes in the collection down. |
SelectionInterval |
moveUp(int[] indexes)
Move the groups at given indexes in the collection up. |
void |
remove(int index)
Removes the channel group at given index. |
void |
removeGroupsListener(LListListener<Group> listener)
|
void |
setAllEnabled(boolean enabled)
Sets the 'enabled' switch to given value for all channel groups. |
void |
setEnabled(int index,
boolean enabled)
Set enabled indicator for group with given index. |
void |
setName(int index,
java.lang.String name)
Sets the name of group with given index. |
int |
size()
Gets the number of channel groups. |
java.lang.String |
toString()
|
Methods inherited from class be.lassi.base.SaveableObject |
---|
doNotMarkDirty, getDirty, isDirty, markDirty, setDirty |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
Groups
public Groups()
- Constructs a new instance.
Groups
public Groups(Dirty dirty)
- Constructs a new instance.
- Parameters:
dirty
- the dirty indicator
Method Detail |
---|
add
public void add(Group group)
- Adds a new channel group.
- Parameters:
group
- the channel group to be added
addGroupsListener
public void addGroupsListener(LListListener<Group> listener)
equals
public boolean equals(java.lang.Object object)
-
- Overrides:
equals
in classjava.lang.Object
get
public Group get(int index)
- Gets the channel group at given index.
- Parameters:
index
- the index in the channel group collection- Returns:
- the channel group at given index
getChannel
public Channel getChannel(int index)
- Gets the channel with given index, within the channels of the currently
enabled groups.
- Parameters:
index
-- Returns:
getChannelCount
public int getChannelCount(int totalChannelCount)
- Gets the overall number of channels all of the groups. Note that
even when a channel can be included in more than one group, it is
counted only once.
- Parameters:
totalChannelCount
- the total number of channels in the show- Returns:
- the number of channels in the groups
getChannelsNotInGroup
public int[] getChannelsNotInGroup(boolean any, int groupIndex, int totalChannelCount)
- Gets the indexes of the channels that are not included in the currently selected group.
- Parameters:
totalChannelCount
- the total number of channels in the show- Returns:
- the indexes of the channels that are not included in any group
getChannelsNotInGroupCount
public int getChannelsNotInGroupCount(boolean any, int groupIndex, int totalChannelCount)
getEnabledGroupCount
public int getEnabledGroupCount()
- Gets the number of channel groups that are currently enabled.
- Returns:
- the number of enabled channel groups
getEnabledGroupsChannelCount
public int getEnabledGroupsChannelCount()
- Gets the number of channels in all currently enabled groups.
Note that when a channel is included in more than one group, it is
counted multiple times.
- Returns:
- the number of channels in the groups
getIndexOfChannelWithId
public int getIndexOfChannelWithId(int id)
getListeners
public Listeners getListeners()
- Gets the listeners that are interested in group changes.
- Returns:
- the listeners
hashCode
public int hashCode()
-
- Overrides:
hashCode
in classjava.lang.Object
includes
public boolean includes(Channel channel)
isEnabled
public boolean isEnabled()
- Indicates whether at least one of the channel groups is currently enabled.
- Returns:
- true if at least one of the channel groups is enabled
isEnabled
public boolean isEnabled(int index)
- Indicates whether group with given index is enabled.
- Parameters:
index
- group index- Returns:
- true if given group is enabled
iterator
public java.util.Iterator<Group> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Group>
moveDown
public SelectionInterval moveDown(int[] indexes)
- Move the groups at given indexes in the collection down.
- Parameters:
indexes
- the selected channel group indexes- Returns:
- the indexes of the channel groups after the move
moveUp
public SelectionInterval moveUp(int[] indexes)
- Move the groups at given indexes in the collection up.
- Parameters:
indexes
- the selected channel group indexes- Returns:
- the indexes of the channel groups after the move
remove
public void remove(int index)
- Removes the channel group at given index.
- Parameters:
index
- the index of the channel group to be removed
removeGroupsListener
public void removeGroupsListener(LListListener<Group> listener)
setAllEnabled
public void setAllEnabled(boolean enabled)
- Sets the 'enabled' switch to given value for all channel groups.
- Parameters:
enabled
- indicates whether all channels groups should be enabled or not
setEnabled
public void setEnabled(int index, boolean enabled)
- Set enabled indicator for group with given index.
- Parameters:
index
- group indexenabled
- true if group is enabled
setName
public void setName(int index, java.lang.String name)
- Sets the name of group with given index.
- Parameters:
index
- group indexname
- group name
size
public int size()
- Gets the number of channel groups.
- Returns:
- the number of channel groups
toString
public java.lang.String toString()
-
- Overrides:
toString
in classjava.lang.Object
|
Lighting Assistant 1.2 | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |