Class AbstractEmbosser

    • Field Detail

      • defaultTable

        protected final Table defaultTable
      • setTable

        protected Table setTable
    • Constructor Detail

      • AbstractEmbosser

        public AbstractEmbosser​(TableCatalogService service,
                                EmbosserFactoryProperties emProps)
        Creates a new AbstractEmbosser with the supplied name, description and identifier.
        Parameters:
        service - the table catalog
        emProps - the properties
    • Method Detail

      • getPageFormat

        protected PageFormat getPageFormat()
        Gets the page format.
        Returns:
        returns the page format
      • getCellWidth

        protected abstract double getCellWidth()
        Gets cell width (2 x the horizontal dot-to-dot distance), in millimeters.
        Returns:
        returns cell width, in millimeters
      • getCellHeight

        protected abstract double getCellHeight()
        Gets cell height (4 x the vertical dot-to-dot distance), in millimeters. This value should not include any line spacing.
        Returns:
        returns cell height, in millimeters
      • getMaxHeight

        public int getMaxHeight​(PageFormat pageFormat)
        Description copied from interface: Embosser
        Gets the max height for the specified page format.
        Specified by:
        getMaxHeight in interface Embosser
        Parameters:
        pageFormat - the page format
        Returns:
        returns the max height for the specified page format
      • getMaxWidth

        public int getMaxWidth​(PageFormat pageFormat)
        Description copied from interface: Embosser
        Gets the max width for the specified page format.
        Specified by:
        getMaxWidth in interface Embosser
        Parameters:
        pageFormat - the page format
        Returns:
        returns the max width for the specified page format
      • getPrintableArea

        public Area getPrintableArea​(PageFormat pageFormat)
        Description copied from interface: Embosser
        Gets the printable area for the specified page format.
        Specified by:
        getPrintableArea in interface Embosser
        Parameters:
        pageFormat - the page format
        Returns:
        returns the printable area for the specified page format
      • getFeature

        public Object getFeature​(String key)
        Description copied from interface: Factory
        Gets the value of a feature used by this Factory.
        Specified by:
        getFeature in interface Factory
        Parameters:
        key - the key for the feature
        Returns:
        returns the current value of the feature
      • getProperty

        public Object getProperty​(String key)
        Description copied from interface: Factory
        Gets the value of a read-only property that applies to all objects returned by this Factory.
        Specified by:
        getProperty in interface Factory
        Parameters:
        key - the name of the property to get
        Returns:
        returns the value associated with this property or null if none is found
      • setFeature

        public void setFeature​(String key,
                               Object value)
        Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.
        Specified by:
        setFeature in interface Factory
        Parameters:
        key - key with which the specified value is to be associated.
        value - value to be associated with the specified key.
      • supportsTable

        public boolean supportsTable​(Table table)
        Description copied from interface: Embosser
        Returns true if table is supported.
        Specified by:
        supportsTable in interface Embosser
        Parameters:
        table - the table to test
        Returns:
        returns true if table is supported