Class TableauFactory

    • Method Detail

      • createTableau

        public Tableau createTableau​(Effigy effigy)
                              throws java.lang.Exception
        Create a tableau for the specified effigy. The tableau will be created with a new unique name with the specified effigy as its container. If this factory cannot create a tableau for the given effigy (perhaps because the effigy is not of the appropriate subclass), then return null. This base class assumes that it contains other tableau factories. This method defers to each contained factory in order until one is capable of creating a tableau for the specified effigy. As with all attributes, the order is simply the order of creation. Subclasses of this class will usually be inner classes of a Tableau, and will create the Tableau. A subclass that actually creates a tableau is responsible for setting the container of the tableau to the specified effigy, and for naming the tableau. Subclasses should not call show() in createTableau(), it is the responsibility of the caller to check the return value and call show() after doing things like adjusting the size.
        Parameters:
        effigy - The model effigy.
        Returns:
        A tableau for the effigy, or null if one cannot be created.
        Throws:
        java.lang.Exception - If the factory should be able to create a Tableau for the effigy, but something goes wrong.
      • configure

        public void configure​(java.net.URL base,
                              java.lang.String source,
                              java.lang.String text)
                       throws java.lang.Exception
        Configure the tableau factory with data from the specified input source (a URL) and/or textual data. The data is recorded locally without parsing.
        Specified by:
        configure in interface Configurable
        Parameters:
        base - The base relative to which references within the input are found, or null if this is not known, or there is none.
        source - The input source, which specifies a URL, or null if none.
        text - Configuration information given as text, or null if none.
        Throws:
        java.lang.Exception - If something goes wrong. No thrown in this class.
      • getConfigureSource

        public java.lang.String getConfigureSource()
        Return the input source that was specified the last time the configure method was called.
        Specified by:
        getConfigureSource in interface Configurable
        Returns:
        The string representation of the input URL, or null if the no source has been used to configure this object, or null if no external source need be used to configure this object.
      • getConfigureText

        public java.lang.String getConfigureText()
        Return the text string that represents the current configuration of this object. Note that any configuration that was previously specified using the source attribute need not be represented here as well.
        Specified by:
        getConfigureText in interface Configurable
        Returns:
        A configuration string, or null if no configuration has been used to configure this object, or null if no configuration string need be used to configure this object.
      • _configureTableau

        protected void _configureTableau​(Tableau tableau)
        Configure the given tableau with the configuration data attached to this tableau factory, if any.
        Parameters:
        tableau - The tableau to be configured.