001: /**
002: * ===========================================
003: * JFreeReport : a free Java reporting library
004: * ===========================================
005: *
006: * Project Info: http://reporting.pentaho.org/
007: *
008: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
009: *
010: * This library is free software; you can redistribute it and/or modify it under the terms
011: * of the GNU Lesser General Public License as published by the Free Software Foundation;
012: * either version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
015: * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: * See the GNU Lesser General Public License for more details.
017: *
018: * You should have received a copy of the GNU Lesser General Public License along with this
019: * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: *
022: * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
023: * in the United States and other countries.]
024: *
025: * ------------
026: * LayoutSupport.java
027: * ------------
028: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
029: */package org.jfree.report.layout;
030:
031: import org.jfree.report.style.FontDefinition;
032:
033: /**
034: * The LayoutSupport contains all methods required to estaminate sizes for the content-creation.
035: *
036: * @author Thomas Morgner
037: * @deprecated This one should be removed. It is no longer needed by the system and may lead to invalid results.
038: * Functions should not make assumptions about the size of the report elements.
039: */
040: public interface LayoutSupport {
041:
042: /**
043: * Creates a size calculator for the current state of the output target. The calculator is used to calculate the
044: * string width and line height and later maybe more...
045: *
046: * @param font the font.
047: * @return the size calculator.
048: * @throws SizeCalculatorException if there is a problem with the output target.
049: */
050: public SizeCalculator createTextSizeCalculator(FontDefinition font)
051: throws SizeCalculatorException;
052:
053: /**
054: * Returns the element alignment. Elements will be layouted aligned to this border, so that <code>mod(X,
055: * horizontalAlignment) == 0</code> and <code>mod(Y, verticalAlignment) == 0</code>. Returning 0 will disable the
056: * alignment.
057: *
058: * @return the vertical alignment grid boundry
059: */
060: public float getVerticalAlignmentBorder();
061:
062: /**
063: * Returns the element alignment. Elements will be layouted aligned to this border, so that <code>mod(X,
064: * horizontalAlignment) == 0</code> and <code>mod(Y, verticalAlignment) == 0</code>. Returning 0 will disable the
065: * alignment.
066: *
067: * @return the vertical alignment grid boundry
068: */
069: public float getHorizontalAlignmentBorder();
070:
071: /**
072: * Returns the element alignment. Elements will be layouted aligned to this border, so that <code>mod(X,
073: * horizontalAlignment) == 0</code> and <code>mod(Y, verticalAlignment) == 0</code>. Returning 0 will disable the
074: * alignment.
075: * <p/>
076: * Q&D Hack: Save some cycles of processor time by computing that thing only once.
077: *
078: * @return the vertical alignment grid boundry
079: */
080: public long getInternalVerticalAlignmentBorder();
081:
082: /**
083: * Returns the element alignment. Elements will be layouted aligned to this border, so that <code>mod(X,
084: * horizontalAlignment) == 0</code> and <code>mod(Y, verticalAlignment) == 0</code>. Returning 0 will disable the
085: * alignment.
086: * <p/>
087: * Q&D Hack: Save some cycles of processor time by computing that thing only once.
088: *
089: * @return the vertical alignment grid boundry
090: */
091: public long getInternalHorizontalAlignmentBorder();
092:
093: /**
094: * Checks, if the layouter uses the System's native resolution to compute the size of images. This fixes problems with
095: * the HTML output, which assumes that images are rendered with a resolution of 96dpi.
096: *
097: * @return true, if the image-resolution mapping is active, false otherwise.
098: */
099: public boolean isImageResolutionMappingActive();
100: }
|