chemaxon.alchemist.utils
Class AlchemistComponentSet

java.lang.Object
  extended by chemaxon.alchemist.utils.AlchemistComponentSet

public class AlchemistComponentSet
extends java.lang.Object


Constructor Summary
AlchemistComponentSet()
          Creates a new AlchemistComponentSet The components in this set will be initialized as visible and enabled
AlchemistComponentSet(boolean enabled)
          Creates a new AlchemistComponentSet The components in this set will be initialized as visible, and will be enabled depending on parameter
AlchemistComponentSet(boolean enabled, boolean visible)
          Creates a new AlchemistComponentSet The components in this set will be initialized as given in parameters
 
Method Summary
 void addComponent(java.awt.Component component)
          Adds a component to the set
 java.util.Collection getComponents()
          Returns an immutable collection of elements in set
 boolean isEnabled()
          Returns true if components in set are enabled
 boolean isVisible()
          Returns true if components in set are visible
 boolean removeComponent(java.awt.Component component)
          Removes a component from the set
 void setEnabled(boolean enabled)
          Sets all components in set enabled
 void setVisible(boolean visible)
          Sets all components in set visible
 int size()
          Returns the number of components in the set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlchemistComponentSet

public AlchemistComponentSet()
Creates a new AlchemistComponentSet The components in this set will be initialized as visible and enabled


AlchemistComponentSet

public AlchemistComponentSet(boolean enabled)
Creates a new AlchemistComponentSet The components in this set will be initialized as visible, and will be enabled depending on parameter

Parameters:
enabled - is the initial enabled status of components

AlchemistComponentSet

public AlchemistComponentSet(boolean enabled,
                             boolean visible)
Creates a new AlchemistComponentSet The components in this set will be initialized as given in parameters

Parameters:
enabled - is the initial enabled status of components
visible - is the initial visibility status of components
Method Detail

isEnabled

public boolean isEnabled()
Returns true if components in set are enabled

Returns:
true if components in set are enabled

setEnabled

public void setEnabled(boolean enabled)
Sets all components in set enabled

Parameters:
enabled -

isVisible

public boolean isVisible()
Returns true if components in set are visible

Returns:
true if components in set are visible

setVisible

public void setVisible(boolean visible)
Sets all components in set visible

Parameters:
visible -

addComponent

public void addComponent(java.awt.Component component)
Adds a component to the set

Parameters:
component - is the component to be added

removeComponent

public boolean removeComponent(java.awt.Component component)
Removes a component from the set

Parameters:
component - is the component to be removed
Returns:
true if set has changed due to operation

getComponents

public java.util.Collection getComponents()
Returns an immutable collection of elements in set

Returns:
an immutable collection of elements in set

size

public int size()
Returns the number of components in the set

Returns:
the number of components in the set