Overview  Package   Class  Tree  Index 

be.lassi.domain
Class Group

java.lang.Object
  extended by be.lassi.base.SaveableObject
      extended by be.lassi.domain.Group

public class Group
extends SaveableObject

A collection with a subset of all available channels that can be controlled through the lanbox. These groups can be used to limit the number of channels that are shown on the sheet and patch definition windows.


Constructor Summary
Group()
          Constructs a new group.
Group(Dirty dirty)
          Constructs a new group.
Group(Dirty dirty, java.lang.String name)
          Constructs a new group with given name.
Group(java.lang.String name)
          Constructs a new group with given name.
 
Method Summary
 void add(Channel channel)
          Adds given channel.
 boolean equals(java.lang.Object object)
          
 Channel get(int index)
          Gets the channel at given index.
 Channel[] getChannels()
          Gets the channels in this group.
 java.lang.String getComment()
          Gets the group comment text.
 Listeners getListeners()
          Gets the listeners that observe changes in the channel collection.
 java.lang.String getName()
          Gets the group name.
 int hashCode()
          
 boolean includes(Channel channel)
           
 boolean includes(int channelId)
          Indicates whether this channel group includes the channel with given id.
 boolean isEnabled()
          Indicates whether this group is enabled.
 SelectionInterval moveDown(int[] indexes)
          Moves the channels at given indexes down in the channel collection.
 SelectionInterval moveUp(int[] indexes)
          Moves the channels at given indexes up in the channel collection.
 void remove(int index)
          Removes the channel at given index.
 void setComment(java.lang.String comment)
          Sets the group comment text.
 void setEnabled(boolean enabled)
          Sets the group 'enabled' switch.
 void setName(java.lang.String name)
          Sets the group name.
 int size()
          Gets the number of channels in this group.
 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

Group

public Group()
Constructs a new group.


Group

public Group(Dirty dirty)
Constructs a new group.

Parameters:
dirty - the dirty indicator

Group

public Group(Dirty dirty,
             java.lang.String name)
Constructs a new group with given name.

Parameters:
dirty - the dirty indicator
name - the group name

Group

public Group(java.lang.String name)
Constructs a new group with given name.

Parameters:
name - the group name
Method Detail

add

public void add(Channel channel)
Adds given channel.

Parameters:
channel - the channel to be added

equals

public boolean equals(java.lang.Object object)

Overrides:
equals in class java.lang.Object

get

public Channel get(int index)
Gets the channel at given index.

Parameters:
index - the index in the channel collection (not the channel id)
Returns:
the channel at given index

getChannels

public Channel[] getChannels()
Gets the channels in this group.

Returns:
the channels in this group

getComment

public java.lang.String getComment()
Gets the group comment text.

Returns:
the comment text

getListeners

public Listeners getListeners()
Gets the listeners that observe changes in the channel collection.

Returns:
the listeners

getName

public java.lang.String getName()
Gets the group name.

Returns:
the group name

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

includes

public boolean includes(Channel channel)

includes

public boolean includes(int channelId)
Indicates whether this channel group includes the channel with given id.

Parameters:
channelId - the identifier of the channel to be tested
Returns:
true if this group contains given channel

isEnabled

public boolean isEnabled()
Indicates whether this group is enabled.

Returns:
true if this group is enabled

moveDown

public SelectionInterval moveDown(int[] indexes)
Moves the channels at given indexes down in the channel collection.

Parameters:
indexes - the indexes of the channels to be moved down
Returns:
the new indexes of the channels that have been moved down

moveUp

public SelectionInterval moveUp(int[] indexes)
Moves the channels at given indexes up in the channel collection.

Parameters:
indexes - the indexes of the channels to be moved up
Returns:
the new indexes of the channels that have been moved up

remove

public void remove(int index)
Removes the channel at given index.

Parameters:
index - the index of the channel to be removed

setComment

public void setComment(java.lang.String comment)
Sets the group comment text.

Parameters:
comment - the comment text

setEnabled

public void setEnabled(boolean enabled)
Sets the group 'enabled' switch.

Parameters:
enabled - true if this group is enabled

setName

public void setName(java.lang.String name)
Sets the group name.

Parameters:
name - the group name

size

public int size()
Gets the number of channels in this group.

Returns:
the number of channels in this group

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2