ilog.webui.dhtml

Class IlxWContainer

  • java.lang.Object
    • ilog.webui.dhtml.IlxWContainer
  • All Implemented Interfaces:
    ilog.webui.dhtml.IlxWCSSModelProvider, ilog.webui.dhtml.IlxWDependencyProvider, java.io.Serializable
    Direct Known Subclasses:
    IlxWComponent, IlxWManager


    public abstract class IlxWContainer
    extends java.lang.Object
    implements ilog.webui.dhtml.IlxWCSSModelProvider, java.io.Serializable, ilog.webui.dhtml.IlxWDependencyProvider
    Abstract class for component containers.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected ilog.webui.dhtml.event.IlxWEventListenerList listenerList 
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlxWContainer() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      IlxWComponent add(IlxWComponent component)
      Adds the specified component to the end of this container.
      IlxWComponent add(IlxWComponent component, int index)
      Adds the specified component to this container at the given position.
      java.lang.Object getAttribute(java.lang.String name)
      Returns the object bound with the specified name in this container, or null if no object is bound under that name.
      java.util.Enumeration getAttributeNames()
      Returns an enumeration of string objects which contains the names of all the objects bound to this container.
      IlxWComponent getComponent(int n)
      Gets the nth component in this container.
      int getComponentCount()
      Gets the number of components in this container.
      IlxWComponent getComponentNamed(java.lang.String name)
      Retrieves the component with the given name in the components of this container.
      IlxWComponent[] getComponents()
      Gets all the components in this container.
      IlxWManager getManager()
      Gets the manager containing this object.
      IlxWContainer getParent()
      Gets the parent of this container.
      protected IlxWCSSRuleset getUserAgentRules()
      Gets the "user-agent" CSS rules.
      int indexOf(IlxWComponent component)
      Retrieves the index of the given component in this container.
      boolean isAncestorOf(IlxWComponent c)
      Checks whether the component is contained in the component hierarchy of this container.
      void notifyDependencies(IlxWPort port) 
      void remove(IlxWComponent comp)
      Removes the specified component from this container.
      void remove(int index)
      Removes the component, specified by index, from this container.
      void removeAll()
      Removes all the components from this container.
      void removeAttribute(java.lang.String name)
      Removes the object bound with the specified name from this container.
      void setAttribute(java.lang.String name, java.lang.Object value)
      Binds an object to this container, using the specified name.
      void setAuthorRules(IlxWCSSRuleset ruleset)
      Sets the author CSS rules for this container.
      void setFinalizer(ilog.webui.dhtml.IlxWContainer.Finalizer finalizer) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • listenerList

        protected ilog.webui.dhtml.event.IlxWEventListenerList listenerList
    • Constructor Detail

      • IlxWContainer

        public IlxWContainer()
    • Method Detail

      • getAttribute

        public java.lang.Object getAttribute(java.lang.String name)
        Returns the object bound with the specified name in this container, or null if no object is bound under that name.
        Parameters:
        name - A string specifying the name of the object.
        Returns:
        The object with the specified name.
      • getAttributeNames

        public java.util.Enumeration getAttributeNames()
        Returns an enumeration of string objects which contains the names of all the objects bound to this container.
        Returns:
        An enumeration of string objects which specifies the names of all the objects bound to this container.
      • setAttribute

        public void setAttribute(java.lang.String name,
                        java.lang.Object value)
        Binds an object to this container, using the specified name. If an object of the same name is already bound to the container, the object is replaced.
        Parameters:
        name - The name to which the object is bound; cannot be null.
        value - The object to be bound; cannot be null.
      • removeAttribute

        public void removeAttribute(java.lang.String name)
        Removes the object bound with the specified name from this container. If the container does not have an object bound with the specified name, this method does nothing.
        Parameters:
        name - The name of the object to remove from this container.
      • add

        public IlxWComponent add(IlxWComponent component)
        Adds the specified component to the end of this container.
        Throws:
        IllegalStateException - if the given component already has a parent container.
        Parameters:
        component - The component to be added.
        Returns:
        The component passed as the argument.
      • add

        public IlxWComponent add(IlxWComponent component,
                        int index)
        Adds the specified component to this container at the given position.
        Throws:
        ArrayIndexOutOfBoundsException
        Parameters:
        component - The component to be added.
        index - The position at which to insert the component.
        Returns:
        The component passed as the argument.
      • getComponentCount

        public int getComponentCount()
        Gets the number of components in this container.
        Returns:
        The number of components in this container.
      • getComponents

        public IlxWComponent[] getComponents()
        Gets all the components in this container.
        Returns:
        An array of all the components in this container.
      • getComponent

        public IlxWComponent getComponent(int n)
        Gets the nth component in this container.
        Throws:
        ArrayIndexOutOfBoundsException - if the nth value does not exist.
        Parameters:
        n - The index of the component to get.
        Returns:
        The nth component in this container.
      • isAncestorOf

        public boolean isAncestorOf(IlxWComponent c)
        Checks whether the component is contained in the component hierarchy of this container.
        Parameters:
        c - The component.
        Returns:
        true if the component is an ancestor; false otherwise.
      • getParent

        public IlxWContainer getParent()
        Gets the parent of this container.
        Returns:
        The parent container or null if this container has no parent.
      • remove

        public void remove(int index)
        Removes the component, specified by index, from this container.
        Throws:
        ArrayIndexOutOfBoundsException
        Parameters:
        index - The index of the component to be removed.
        See Also:
        add(ilog.webui.dhtml.IlxWComponent)
      • getManager

        public IlxWManager getManager()
        Gets the manager containing this object.
        Returns:
        The manager containing this object or null if the container has not been added in a manager.
      • indexOf

        public int indexOf(IlxWComponent component)
        Retrieves the index of the given component in this container.
        Parameters:
        component - The component to search in this container.
        Returns:
        The index of the given component in this container.
      • getComponentNamed

        public IlxWComponent getComponentNamed(java.lang.String name)
        Retrieves the component with the given name in the components of this container.
        Parameters:
        name - The name of the component to find.
        Returns:
        The subcomponent with the given name or null if such a component does not exist.
      • getUserAgentRules

        protected IlxWCSSRuleset getUserAgentRules()
        Gets the "user-agent" CSS rules.
        User agent rules are a set of CSS rules which will apply by default to each instance of this container. They may be completed or overridden by the author rules, set via the setAuthorRules method.

        This method returns null by default but is intended to be redefined by subclasses.

        Returns:
        a CSS ruleset.
        See Also:
        setAuthorRules(ilog.webui.dhtml.IlxWCSSRuleset)
      • setAuthorRules

        public void setAuthorRules(IlxWCSSRuleset ruleset)
        Sets the author CSS rules for this container. Author rules are a set of CSS rules which will either complete or override the user agent CSS rules.
        Parameters:
        ruleset - the ruleset containing the CSS rules.
        See Also:
        getUserAgentRules()
      • notifyDependencies

        public void notifyDependencies(IlxWPort port)
        Specified by:
        notifyDependencies in interface ilog.webui.dhtml.IlxWDependencyProvider
      • setFinalizer

        public void setFinalizer(ilog.webui.dhtml.IlxWContainer.Finalizer finalizer)

© Copyright IBM Corp. 1987, 2015