tecgraf.javautils.excel.v2
Class TecExcel

java.lang.Object
  extended by tecgraf.javautils.excel.v2.TecExcel

public class TecExcel
extends Object

Estrutura que realiza toda a escrita de uma planilha excel e converte em operações primitivas capaz de ser representado em qualquer tipo de documento.

Author:
Tecgraf

Nested Class Summary
static class TecExcel.AlignEnum
          Alinhamento
 
Constructor Summary
TecExcel()
          Construtor
 
Method Summary
 TecExcel addTab(String name)
           
static void main(String[] args)
           
protected  void removeCellEqual(int row, int column, String tagName)
          Remove a ocorrencia de todas as tags de nome 'tagName' que possua o mesmo 'row' e 'column'.
protected  void removeRectEqual(int rowBegin, int columnBegin, int rowEnd, int columnEnd, String tagName)
           
protected  void removeRectIntersects(int rowBegin, int columnBegin, int rowEnd, int columnEnd, String tagName)
           
protected  void removeRectIntersects(int row, int column, String tagName)
          Remove a ocorrencia de todas as tags de nome 'tagName' que possua o mesmo 'row' e 'column' numa região de merge.
 TecExcel setAlign(int row, int column, TecExcel.AlignEnum align)
           
 TecExcel setBackColor(int row, int column, Color color)
           
 TecExcel setBox(int rowBegin, int columnBegin, int rowEnd, int columnEnd, int size, Color color)
           
 TecExcel setCell(int row, int column, String text)
           
 TecExcel setFont(int row, int column, Font font)
           
 TecExcel setForeColor(int row, int column, Color color)
           
 TecExcel setMerge(int rowBegin, int columnBegin, int rowEnd, int columnEnd)
           
 TecExcel setTabName(String name)
           
protected static String toString(Color color)
           
protected static String toString(Font font)
           
protected static String toString(int value)
           
protected static String toString(TecExcel.AlignEnum align)
           
 XmlNode toXmlNode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TecExcel

public TecExcel()
Construtor

Method Detail

setCell

public TecExcel setCell(int row,
                        int column,
                        String text)
Parameters:
row -
column -
text -
Returns:
this

setBackColor

public TecExcel setBackColor(int row,
                             int column,
                             Color color)
Parameters:
row -
column -
color -
Returns:
this

setForeColor

public TecExcel setForeColor(int row,
                             int column,
                             Color color)
Parameters:
row -
column -
color -
Returns:
this

setFont

public TecExcel setFont(int row,
                        int column,
                        Font font)
Parameters:
row -
column -
font -
Returns:
this

setAlign

public TecExcel setAlign(int row,
                         int column,
                         TecExcel.AlignEnum align)
Parameters:
row -
column -
align -
Returns:
this

addTab

public TecExcel addTab(String name)
Parameters:
name -
Returns:
this

setMerge

public TecExcel setMerge(int rowBegin,
                         int columnBegin,
                         int rowEnd,
                         int columnEnd)
Parameters:
rowBegin -
rowEnd -
columnBegin -
columnEnd -
Returns:
this

setBox

public TecExcel setBox(int rowBegin,
                       int columnBegin,
                       int rowEnd,
                       int columnEnd,
                       int size,
                       Color color)
Parameters:
rowBegin -
rowEnd -
columnBegin -
columnEnd -
size -
color -
Returns:
this

setTabName

public TecExcel setTabName(String name)
Parameters:
name -
Returns:
this

toXmlNode

public XmlNode toXmlNode()
Returns:
XmlNode

removeCellEqual

protected void removeCellEqual(int row,
                               int column,
                               String tagName)
Remove a ocorrencia de todas as tags de nome 'tagName' que possua o mesmo 'row' e 'column'.

Parameters:
row -
column -
tagName -

removeRectEqual

protected void removeRectEqual(int rowBegin,
                               int columnBegin,
                               int rowEnd,
                               int columnEnd,
                               String tagName)
Parameters:
rowBegin -
columnBegin -
rowEnd -
columnEnd -
tagName -

removeRectIntersects

protected void removeRectIntersects(int row,
                                    int column,
                                    String tagName)
Remove a ocorrencia de todas as tags de nome 'tagName' que possua o mesmo 'row' e 'column' numa região de merge.

Parameters:
row -
column -
tagName -

removeRectIntersects

protected void removeRectIntersects(int rowBegin,
                                    int columnBegin,
                                    int rowEnd,
                                    int columnEnd,
                                    String tagName)
Parameters:
rowBegin -
columnBegin -
rowEnd -
columnEnd -
tagName -

toString

protected static String toString(Color color)
Parameters:
color -
Returns:
string

toString

protected static String toString(Font font)
Parameters:
font -
Returns:
string

toString

protected static String toString(TecExcel.AlignEnum align)
Parameters:
align -
Returns:
string

toString

protected static String toString(int value)
Parameters:
value -
Returns:
string

main

public static void main(String[] args)
                 throws Exception
Parameters:
args -
Throws:
Exception


Copyright © 2014 Tecgraf/PUC-Rio. All rights reserved.