Class ReportColumn

java.lang.Object
quadbase.reportdesigner.ReportElements.ReportElement
quadbase.reportdesigner.ReportElements.ReportColumn
All Implemented Interfaces:
Serializable

public class ReportColumn extends ReportElement implements Serializable
This class can be used to manipulate properties of the individual columns in the ReportTable--formula, border, background, font... etc.
See Also:
  • Field Details

  • Constructor Details

    • ReportColumn

      public ReportColumn()
      For internal use only
    • ReportColumn

      public ReportColumn(ReportColumn _col)
      For internal use only
    • ReportColumn

      public ReportColumn(ReportColumn _col, Properties treeProp)
    • ReportColumn

      public ReportColumn(String name, int noOfCol, boolean isTreeReport, Properties treeProp)
      For internal use only
    • ReportColumn

      public ReportColumn(String name, IFormat dataFormat, int noOfCol)
      For internal use only
    • ReportColumn

      public ReportColumn(String name, String tableName, IFormat dataFormat, int columnDisplaySize, int noOfCol, boolean isTreeReport)
      For internal use only
    • ReportColumn

      public ReportColumn(String name, String tableName, IFormat dataFormat, int columnDisplaySize, Hashtable<quadbase.reportdesigner.ReportElements.FormattedRowKey,quadbase.reportdesigner.ReportElements.FormattedCell> formattedCellsTable, int noOfCol, boolean isTreeReport)
      For internal use only
  • Method Details

    • contains

      public boolean contains(double cx, double cy)
      For internal use only
      Overrides:
      contains in class ReportElement
      Returns:
      false otherwise
    • containsX

      public boolean containsX(double cx, double w)
      For internal use only
      Overrides:
      containsX in class ReportElement
      Returns:
      true if the x coordinate is contained, false otherwisw
    • containsY

      public boolean containsY(double cy, double h)
      For internal use only
      Overrides:
      containsY in class ReportElement
      Returns:
      true if the y coordinate is contained, false otherwisw
    • inTopHalf

      public boolean inTopHalf(double cy)
      For internal use only
      Overrides:
      inTopHalf in class ReportElement
    • inBottomHalf

      public boolean inBottomHalf(double cy)
      For internal use only
      Overrides:
      inBottomHalf in class ReportElement
    • inLeftHalf

      public boolean inLeftHalf(double cx)
      For internal use only
      Overrides:
      inLeftHalf in class ReportElement
    • inRightHalf

      public boolean inRightHalf(double cx)
      For internal use only
      Overrides:
      inRightHalf in class ReportElement
    • inLeftEnd

      public boolean inLeftEnd(double cx)
      For internal use only
      Overrides:
      inLeftEnd in class ReportElement
    • inRightEnd

      public boolean inRightEnd(double cx, double w)
      For internal use only
      Overrides:
      inRightEnd in class ReportElement
    • copy

      public void copy(ReportColumn _col)
      For internal use only
    • copyTemplate

      public void copyTemplate(ReportColumn _col)
      For internal use only.
    • copyTemplate

      public void copyTemplate(ReportColumn _col, boolean applyFunction)
    • copyTemplate

      public void copyTemplate(ReportColumn _col, boolean applyFunction, boolean applyElementPosition)
    • copyTemplate

      public void copyTemplate(ReportColumn _col, boolean applyFunction, boolean applyElementPosition, boolean copyDrillDownName)
      For internal use only.
    • copyTemplateExceptOrigin

      public void copyTemplateExceptOrigin(ReportColumn _col)
      For internal use only.
    • deepCopy

      public void deepCopy(ReportColumn _col)
      For internal use only.
    • positionCopy

      public void positionCopy(ReportColumn _col)
      For internal use only. For resize to fit content
    • applyTemplate

      public void applyTemplate(ReportColumn _col)
    • applyTemplate

      public void applyTemplate(ReportColumn _col, boolean applyScript)
    • applyTemplate

      public void applyTemplate(ReportColumn _col, boolean applyScript, boolean applyElementPosition, boolean copyDrillDownName)
      Specifies the look and feel to be the same as another ReportCell object.
      Parameters:
      applyScript - Specifies whether or not to copy scripts applied the object
      _cell - the object to be emulated
    • getMaxCharForRecordFile

      public int getMaxCharForRecordFile()
      Gets max number of character for record in column when using record file to generate the report
    • setMaxCharForRecordFile

      public void setMaxCharForRecordFile(int cl) throws Exception
      set max number of character for record in column when using record file to generate the report
      Throws:
      Exception
    • setDBTableName

      public void setDBTableName(String name)
      For internal use only
    • getDBTableName

      public String getDBTableName()
      For internal use only
    • getAllColors

      public Vector<Color> getAllColors(Vector<Color> colors)
      For internal use only
      Overrides:
      getAllColors in class ReportElement
    • setAlternateRow

      public void setAlternateRow(int altRow)
      Sets the number of rows within sections that would have the same color before alternating to a different color.
    • getAlternateRow

      public int getAlternateRow()
      Gets the number of rows within sections that would have the same color before alternating to a different color.
    • setDualColorOnRowBreak

      public void setDualColorOnRowBreak(boolean state)
      Returns whether to change color from section to section
    • isDualColorOnRowBreak

      public boolean isDualColorOnRowBreak()
      Returns whether color is changed from section to section
    • setDualColorColInfoIndex

      public void setDualColorColInfoIndex(int[] colInfoIndex)
      Sets the column indices to use to change color. When value in any of the specified columns change, the color changes.
    • getDualColorColInfoIndex

      public int[] getDualColorColInfoIndex()
      Returns the ReportColumn index int array used for setting different colors when the value in any of these columns changes.
    • getDualColorColInfoCount

      public int getDualColorColInfoCount()
      Returns the number of members in the ReportColumn index int array used for setting different colors when the value in any of these columns changes.
    • setIsBGColor2

      public void setIsBGColor2(int index, boolean bool)
      For internal use only
    • getIsBGColor2

      public boolean getIsBGColor2(int index)
      For internal use only
    • getStyleName2

      public String getStyleName2()
      Gets the style name of the alternating sections. Use getStyleName method to get the other style name.
    • setStyleName2

      public void setStyleName2(String newStyleName2)
      Sets the style name of the alternating sections. Use setStyleName method to set the other style name.
    • getBgColor2

      public Color getBgColor2()
      Gets the background color of the alternating sections. Use getBgColor method to get the other background color.
    • setBgColor2

      public void setBgColor2(Color newColorBg)
      Sets the background color of the alternating sections. Use setBgColor method to set the other background color.
    • getFontColor2

      public Color getFontColor2()
      Gets the font color of the alternating sections. Use getFontColor method to get the other font color.
    • setFontColor2

      public void setFontColor2(Color newColorFt)
      Sets the font color of the alternate sections. Use setFontColor method to set the other font color.
    • isUnderline2

      public boolean isUnderline2()
      Check the status of underline text of the alternate sections.
      Returns:
      the status of underline text of the alternate sections.
    • setUnderline2

      public void setUnderline2(boolean underline)
      set the status of underline text of the alternate sections.
      Parameters:
      underline - the new status of underline text of the alternate sections
    • getFont2

      public Font getFont2()
      Gets the font of the alternating sections. Use getFont method to get the other font.
    • getRefFont2

      public Font getRefFont2()
      Internal Use Only
    • setFont2

      public void setFont2(Font newFont)
      Sets the font of the alternating sections. Use setFont method to set the other font.
    • getDataFormat

      public IFormat getDataFormat()
      Gets the data format of this ReportColumn.
    • setDataFormat

      public void setDataFormat(IFormat format)
      Sets the data format of this ReportColumn.
    • getCellScript

      public ICellScript getCellScript()
      Gets the ICellScript object used by this ReportColumn.
    • setCellScript

      public void setCellScript(ICellScript script)
      Sets the ICellScript object used by this ReportColumn.
    • getFormattedCells

      public Vector<quadbase.reportdesigner.ReportElements.FormattedCell> getFormattedCells()
      For internal use only
    • setFormattedCells

      public void setFormattedCells(Vector<quadbase.reportdesigner.ReportElements.FormattedCell> formattedCells)
      For internal use only
    • getFormattedCellsCount

      public int getFormattedCellsCount()
      For internal use only
    • getFormattedCellsTable

      public Hashtable<quadbase.reportdesigner.ReportElements.FormattedRowKey,quadbase.reportdesigner.ReportElements.FormattedCell> getFormattedCellsTable()
      For internal use only
    • setFormattedCellsTable

      public void setFormattedCellsTable(Hashtable<quadbase.reportdesigner.ReportElements.FormattedRowKey,quadbase.reportdesigner.ReportElements.FormattedCell> table)
      For internal use only
    • getFormattedCellsTableCount

      public int getFormattedCellsTableCount()
      For internal use only
    • getFormattedData

      public Object getFormattedData(int index)
      For internal use only
    • getFormattedCell

      public quadbase.reportdesigner.ReportElements.FormattedCell getFormattedCell(int index)
      For internal use only
    • getFormattedCellAtRow

      public quadbase.reportdesigner.ReportElements.FormattedCell getFormattedCellAtRow(int row)
      For internal use only
    • addFormattedCell

      public void addFormattedCell(quadbase.reportdesigner.ReportElements.FormattedCell formattedCell)
      For internal use only
    • setFormattedCell

      public void setFormattedCell(quadbase.reportdesigner.ReportElements.FormattedCell newCell)
      For internal use only
    • addFormattedCell

      public void addFormattedCell(int row, Vector<Integer> tree, quadbase.reportdesigner.ReportElements.FormattedCell formattedCell)
      For internal use only
    • addFormattedCell

      public void addFormattedCell(int row, int[] tree, quadbase.reportdesigner.ReportElements.FormattedCell formattedCell)
      For internal use only
    • addFormattedCell

      public void addFormattedCell(quadbase.reportdesigner.ReportElements.FormattedRowKey key, quadbase.reportdesigner.ReportElements.FormattedCell formattedCell)
      For internal use only
    • removeFormattedCell

      public void removeFormattedCell(int row, Vector<Integer> tree, quadbase.reportdesigner.ReportElements.FormattedCell formattedCell)
      For internal use only
    • getFormattedCellsTableSize

      public int getFormattedCellsTableSize()
      For internal use only
    • hasFormattedCell

      public boolean hasFormattedCell(int row, Vector<Integer> tree)
      For internal use only
    • hasFormattedCell

      public boolean hasFormattedCell(int row, Vector<Integer> tree, quadbase.reportdesigner.ReportElements.FormattedCell cell)
      For internal use only
    • isDataEmpty

      public boolean isDataEmpty()
      Returns true if this object does not use a data object.
    • getDataCount

      public int getDataCount()
      Gets the length of the data object used.
    • getDataSize

      public long getDataSize()
      Gets the length of the data object used.
    • getDataSet

      public quadbase.common.util.internal.IDataSet getDataSet()
    • getData

      public Object[] getData()
      Gets the data object used by this ReportColumn. This function is used by ReportTable to build the table data.
    • getData

      public Object getData(int index)
      Gets the data at the specified index.
    • getFormatData

      public String getFormatData(int index) throws Exception
      Gets the formatted data text at the specified index.
      Returns:
      formatted data, as String
      Throws:
      Exception
    • getFormatData

      public String getFormatData(int index, IFormat format) throws Exception
      used when a different format is desired.
      Throws:
      Exception
    • getFormatCell

      public ReportElement getFormatCell(int index) throws Exception
      For internal use only
      Throws:
      Exception
    • getFormatCell

      public ReportElement getFormatCell(int dataindex, int displayindex) throws Exception
      For internal use only
      Throws:
      Exception
    • getFormatCell

      public ReportElement getFormatCell(int dataindex, int displayindex, int tableNumber) throws Exception
      For internal use only
      Throws:
      Exception
    • getFormatCell

      public ReportElement getFormatCell(int dataindex, int displayindex, int tableNumber, boolean designMode) throws Exception
      For internal use only
      Throws:
      Exception
    • resetData

      public void resetData()
      For internal use only
    • setDataSet

      public void setDataSet(quadbase.common.util.internal.IDataSet dataSet)
      For internal use only
    • addData

      public void addData(Object obj)
      For internal use only
    • replaceData

      public void replaceData(Object obj, int index)
      For internal use only
    • removeAllData

      public void removeAllData()
      For internal use only
    • setData

      public void setData(int row, Object newData)
      For internal use only
    • addActualData

      public void addActualData(Object newData)
      For internal use only
    • isValid

      public boolean isValid()
    • cleanup

      public void cleanup()
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • releaseDiskBuffer

      public void releaseDiskBuffer()
    • getActualData

      public Object getActualData(int i)
      Returns the unformatted data used in this ReportColumn If a cell contains a formula or script, getActualData returns the calculated value instead of the the formula
    • addScriptedData

      public void addScriptedData(Object newData)
      For internal use only
    • insertScriptedDataAt

      public void insertScriptedDataAt(Object newData, int index)
      Inserts data with scripting information at the specified index.
    • hasScriptedData

      public boolean hasScriptedData(int i)
      Returns whether this object contains scripted data at the specified index.
    • getScriptedData

      public Object getScriptedData(int i)
      For internal use only
    • getScriptedDataCount

      public int getScriptedDataCount()
      Returns the size of the scripted data.
    • getActualDataCount

      public int getActualDataCount()
      For internal use only
    • getScriptedData

      public quadbase.common.util.internal.DataSet getScriptedData(ReportTable table, quadbase.reportdesigner.report.Report report, int col)
      For internal use only
    • getScriptedData

      public Object getScriptedData(ReportTable table, quadbase.reportdesigner.report.Report report, int col, int row)
      For internal use only
    • setDrillDownData

      public void setDrillDownData(Object data)
      For internal use only
    • getDrillDownData

      public Object getDrillDownData(int row)
      For internal use only
    • write

      public void write(DataOutput out) throws IOException
      For internal use only.
      Overrides:
      write in class ReportElement
      Throws:
      IOException
    • writeXML

      public void writeXML(Writer out, boolean writeElementTag) throws IOException
      For internal use only.
      Overrides:
      writeXML in class ReportElement
      Throws:
      IOException
    • createColumn

      public static ReportColumn createColumn(Node node, int version) throws Exception
      For internal use only.
      Throws:
      Exception
    • readXML

      public void readXML(Node node, int version) throws Exception
      For internal use only.
      Overrides:
      readXML in class ReportElement
      Throws:
      Exception
    • createColumn

      public static ReportColumn createColumn(DataInput in, int version) throws Exception
      For internal use only.
      Throws:
      Exception
    • read

      public void read(DataInput in, int version) throws Exception
      For internal use only.
      Overrides:
      read in class ReportElement
      Throws:
      Exception
    • setStringFormat

      public void setStringFormat(int code)
      Specifies whether to decode the Strings in this column to be a URL where an image file, or text file is located. Default is showing the String as is. Use IFormat.IMAGEURL to decode strings as image file locations, and IFormate.TEXTURL to decode strings as text file locations.
    • sort

      public int[] sort(boolean isAsc)
      Returns an index array that shows the order in which the rows would be in if the data were sorted. Example indexArray[0] would refer to the row object that is first in the sorting order.
      Parameters:
      isAsc - whether to sort in ascending or descending order
      Returns:
      An index array
    • sort

      public int[] sort(boolean isAsc, int[] indexArray)
      Returns an index array that shows the order in which the rows refered to in the indexArray would be in if the data were sorted. Example indexArray[0] would refer to the row object that is first in the sorting order.
      Parameters:
      isAsc - whether to sort in ascending or descending order
      Returns:
      An index array
    • sortActualdata

      public int[] sortActualdata(boolean isAsc)
      Returns an index array that shows the order in which the rows refered to in the indexArray would be in if the actual data were sorted. Example indexArray[0] would refer to the row object that is first in the sorting order.
      Parameters:
      isAsc - whether to sort in ascending or descending order
      Returns:
      An index array
    • scriptReferenced

      public boolean scriptReferenced(Script script)
      For internal use only
      Overrides:
      scriptReferenced in class ReportElement
    • setTopNData

      public void setTopNData(int[] sortedIndex, boolean isRowBreak, short aggr)
      For internal use only
    • recalculateFormulaColumnValue

      public void recalculateFormulaColumnValue(quadbase.reportdesigner.report.Report report, int i, ReportTable table)
      For internal use only
    • applyStyle

      public void applyStyle(ReportColumn _col)
      Applies the style information (font, font color, underline, horizontal and vertical alignment, wrap, border) from another cell.