|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdbreport.model.ReportBook
public class ReportBook
Field Summary | |
---|---|
static String |
CURRENT_VERSION
|
protected static DateFormat |
dateFormatter
|
static String |
DOCX
|
static boolean |
enableSVG
|
static String |
EXCEL
|
static String |
HTML
|
static String |
HTML_BODY
|
static String |
JRPT
|
protected EventListenerList |
listenerList
|
static String |
ODS
|
static String |
ODT
|
static String |
PDF
|
protected static TreeMap<Object,String> |
READERS_MAP
|
static String |
RPT
|
protected static TreeMap<Object,String> |
WRITERS_MAP
|
static String |
XLS
|
static String |
XLSX
|
static String |
XML
|
Constructor Summary | |
---|---|
ReportBook()
|
Method Summary | |
---|---|
int |
add()
Appends the default ReportModel to the end of the list of the ReportModel |
void |
add(int index,
ReportModel reportModel)
Inserts the element representing the ReportModel at the specified position in the list of the ReportModel |
void |
add(ReportBook book)
Appends the other reportbook |
void |
add(ReportBook book,
int index)
Appends the other reportbook |
int |
add(ReportModel reportModel)
Appends the ReportModel to the end of the list of the ReportModel |
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
|
void |
addReportListListener(ReportListListener x)
|
Object |
addStyle(CellStyle style)
Looks for style in the list of styles if doesn't find, adds it to the list otherwise returns the id of the founded style If style's id is null, a new id is appropriated to the style |
Object |
appendStyle(CellStyle style)
Adds the style to the list of styles. |
void |
clear()
Removes all the report models. |
protected ReportModel |
createDefaultModel()
|
protected void |
doAfterLoad()
|
protected ReportModel |
doCreateDefaultModel()
|
static boolean |
fileTypeExists(String key)
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
protected void |
fireReportAdded(ReportListEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireReportMoved(ReportListEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireReportRemoved(ReportListEvent e)
Notifies all listeners that have registered interest for notification on this event type. |
Date |
getCreationDate()
Returns the date of report's creating |
String |
getCreator()
Returns the name of the report's creator |
static DateFormat |
getDateFormatter()
|
protected String |
getDefaultReaderKey()
|
protected String |
getDefaultWriterKey()
|
static FileType |
getFileTypeClass(String key)
|
String |
getKeyByFile(String filename)
Returns ReportReader's or ReportWriter's key by extension of the file |
String |
getMimeType()
|
ReportReader |
getReaderClass(Object key)
Returns the value that represents the superclass of the ReportReader by key |
String |
getReaderClassName(Object key)
Returns the name of the class representing the superclass of the ReportReader by key |
Collection<String> |
getReaderNames()
Returns collection of names of classes representing the superclass of the ReportReader |
protected Map<Object,String> |
getReaders()
|
String |
getReportCaption()
Returns the report's title |
ReportListListener[] |
getReportListListeners()
|
JReportModel |
getReportModel(int index)
Returns the ReportModel at the specified position in this list. |
String |
getSourceTemplate()
|
Map<Object,CellStyle> |
getStyleList()
Returns the styles' map |
CellStyle |
getStyles(Object index)
Returns the CellStyle by the index |
int |
getStylesCount()
Returns the styles' count |
ReportWriter |
getWriterClass(Object key)
Returns the value that represents the superclass of the ReportWriter by key |
String |
getWriterClassName(Object key)
Returns the name of class representing the superclass of the ReportWriter by key |
Collection<String> |
getWriterNames()
Returns collection of the names of classes representing the superclass of the ReportWriter |
protected Map<Object,String> |
getWriters()
|
static boolean |
isEnableSVG()
|
boolean |
isGlobalPageNumber()
Returns type of numbering of pages |
protected boolean |
isLocked()
|
boolean |
isPrintThroughPdf()
Printing through conversion to PDF |
boolean |
isShowGrid()
Returns true if the report draws lines between cells, false if it doesn't. |
Iterator<ReportModel> |
iterator()
Returns an iterator over the ReportModel |
protected void |
lockUpdate()
|
void |
move(int fromIndex,
int toIndex)
Moves the ReportModel from fromIndex to the position toIndex |
void |
newReport()
Creates a new report |
void |
open(byte[] buf,
String readerId)
Opens the report from the bytes |
void |
open(File file)
Opens the report by the file The ReportReader is determined by extension of the file |
void |
open(File file,
ReportReader reader)
Opens the report from the file |
void |
open(InputStream stream,
ReportReader reader)
Opens the report from the stream |
void |
open(String fileName)
Opens the report by the fileName |
void |
open(URL url)
Opens the report from the URL The ReportReader is determined by extension of the file |
void |
open(URL url,
ReportReader reader)
Opens the report from URL |
static boolean |
pdfExists()
|
void |
putReaderClassName(Object key,
String className)
Puts the name of the class that represents the superclass of the ReportReader to READERS_MAP |
void |
putWriterClassName(Object key,
String className)
Puts the name of the class that represents the superclass of the ReportWriter to WRITERS_MAP |
ReportModel |
remove(int index)
Removes the ReportModel |
boolean |
remove(ReportModel model)
Removes the ReportModel |
void |
removeDoubleBorders(ReportModel model)
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
|
void |
removeReportListListener(ReportListListener x)
|
void |
replaceStyles(Object oldId,
Object newId)
|
protected void |
revalidatePageNumbers()
Revalidate numbers of pages |
void |
rowAdded(TableRowModelEvent e)
Tells listeners that a row was added to the model. |
void |
rowMarginChanged(ChangeEvent e)
Tells listeners that a row was moved due to a margin change. |
void |
rowMoved(TableRowModelEvent e)
Tells listeners that a row was repositioned. |
void |
rowRemoved(TableRowModelEvent e)
Tells listeners that a row was removed from the model. |
void |
rowResized(TableRowModelEvent e)
Tells listeners that a row was resized. |
void |
rowSelectionChanged(ListSelectionEvent e)
Tells listeners that the selection model of the TableRowModel changed. |
void |
rowUpdated(TableRowModelEvent e)
Tells listeners that a rows was change. |
void |
save(File file)
Saves the report in the file |
void |
save(File file,
ReportWriter writer)
Saves the report in the file |
void |
setCreationDate(Date date)
Sets the date of report's creating |
void |
setCreator(String creator)
Sets the name of the report's creator |
void |
setGlobalPageNumber(boolean globalPageNumber)
Sets type of numbering of pages If globalPageNumber - it is true, the common indexing of pages in all report is set, differently in each sheet numbering starts with 1 |
void |
setPrintThroughPdf(boolean printThroughPdf)
Printing through conversion to PDF |
void |
setReportCaption(String value)
Sets the report's title |
void |
setShowGrid(boolean b)
Sets whether the report draws lines between cells. |
void |
setShowPageNumber(boolean show)
|
void |
setSourceTemplate(String sourceTemplate)
|
int |
size()
Returns count of the ReportModel in the list |
protected void |
unlockUpdate()
|
void |
updateRowAndPageHeight(HeighCalculator hCalc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String HTML
public static final String HTML_BODY
public static final String ODS
public static final String ODT
public static final String RPT
public static final String JRPT
public static final String EXCEL
public static final String XML
public static final String PDF
public static final String XLS
public static final String XLSX
public static final String DOCX
public static boolean enableSVG
protected static DateFormat dateFormatter
protected static TreeMap<Object,String> WRITERS_MAP
protected static TreeMap<Object,String> READERS_MAP
public static final String CURRENT_VERSION
protected EventListenerList listenerList
Constructor Detail |
---|
public ReportBook()
Method Detail |
---|
public static boolean isEnableSVG()
public static boolean pdfExists()
public static DateFormat getDateFormatter()
protected Map<Object,String> getReaders()
protected Map<Object,String> getWriters()
public static boolean fileTypeExists(String key)
key
-
public static FileType getFileTypeClass(String key)
key
-
public ReportReader getReaderClass(Object key)
key
- key whose associated ReportReader is to be returned. It is
usually extension of Report file
public ReportWriter getWriterClass(Object key)
key
- key whose associated ReportWriter is to be returned. It is
usually extension of Report file
public void putReaderClassName(Object key, String className)
key
- key whose associated ReportReader is to be returned. it is
usually extension of Report fileclassName
- ReportReader class namepublic void putWriterClassName(Object key, String className)
key
- ReportWriter key it is usually extension of Report fileclassName
- ReportWriter class namepublic String getReaderClassName(Object key)
key
- ReportReader key it is usually extension of Report file
public String getWriterClassName(Object key)
key
- ReportWriter key it is usually extension of Report file
public Collection<String> getReaderNames()
public Collection<String> getWriterNames()
protected String getDefaultReaderKey()
protected String getDefaultWriterKey()
protected void lockUpdate()
protected void unlockUpdate()
protected boolean isLocked()
public int add(ReportModel reportModel)
reportModel
- ReportModel instance
public int add()
public void add(int index, ReportModel reportModel)
index
- index at which the reportModel is to be inserted.reportModel
- element instance of the ReportModel to be insertedpublic void add(ReportBook book)
book
- public void add(ReportBook book, int index)
book
- index
- public ReportModel remove(int index)
index
- the index of the ReportModel to removed.
public boolean remove(ReportModel model)
model
- to be removed from list.
protected void revalidatePageNumbers()
public boolean isGlobalPageNumber()
public void setGlobalPageNumber(boolean globalPageNumber)
globalPageNumber
- public JReportModel getReportModel(int index)
index
- index of ReportModel to return.
public int size()
public void move(int fromIndex, int toIndex)
fromIndex
- the index of ReportModel to be movedtoIndex
- the new index of the ReportModelpublic CellStyle getStyles(Object index)
index
- the id of the CellStyle
public void clear()
public void replaceStyles(Object oldId, Object newId)
public String getKeyByFile(String filename)
filename
- the file's name
public void save(File file) throws IOException
file
- the file in which the report will be saved
IOException
public void save(File file, ReportWriter writer) throws IOException
file
- the file in which the report will be savedwriter
- the ReportWriter that is used to save the report
IOException
public void open(String fileName) throws LoadReportException
fileName
- the file's name
LoadReportException
public void newReport()
public void open(File file) throws LoadReportException
file
- the report's file
LoadReportException
public void open(File file, ReportReader reader) throws LoadReportException
file
- the report's filereader
- the ReportReader that is used to read the report
LoadReportException
public void open(URL url) throws LoadReportException
url
- the report's URL
LoadReportException
public void open(URL url, ReportReader reader) throws LoadReportException
url
- the report's URLreader
- the ReportReader that is used to read the report
LoadReportException
public void open(InputStream stream, ReportReader reader) throws LoadReportException
stream
- the report's streamreader
- the ReportReader that is used to read the report
LoadReportException
IOException
protected void doAfterLoad()
public void open(byte[] buf, String readerId) throws LoadReportException
buf
- the bytes' arrayreaderId
- the ReportReader's id
LoadReportException
protected ReportModel doCreateDefaultModel()
protected ReportModel createDefaultModel()
public void addReportListListener(ReportListListener x)
public void removeReportListListener(ReportListListener x)
public ReportListListener[] getReportListListeners()
protected void fireReportAdded(ReportListEvent e)
e
- the event receivedEventListenerList
protected void fireReportRemoved(ReportListEvent e)
e
- the event receivedEventListenerList
protected void fireReportMoved(ReportListEvent e)
e
- the event receivedpublic String getReportCaption()
public void setReportCaption(String value)
value
- the new report's titleprotected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
public void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
public int getStylesCount()
public Object addStyle(CellStyle style)
style
- adding style
public Object appendStyle(CellStyle style)
style
- adding style
public Map<Object,CellStyle> getStyleList()
public Iterator<ReportModel> iterator()
iterator
in interface Iterable<ReportModel>
public String getCreator()
public void setCreator(String creator)
creator
- report's creatorpublic Date getCreationDate()
public void setCreationDate(Date date)
date
- the date of report's creatingpublic void setShowGrid(boolean b)
b
- true if report view should draw linespublic boolean isShowGrid()
public void removeDoubleBorders(ReportModel model)
public void rowAdded(TableRowModelEvent e)
TableRowModelListener
rowAdded
in interface TableRowModelListener
public void rowMarginChanged(ChangeEvent e)
TableRowModelListener
rowMarginChanged
in interface TableRowModelListener
public void rowMoved(TableRowModelEvent e)
TableRowModelListener
rowMoved
in interface TableRowModelListener
public void rowRemoved(TableRowModelEvent e)
TableRowModelListener
rowRemoved
in interface TableRowModelListener
public void rowResized(TableRowModelEvent e)
TableRowModelListener
rowResized
in interface TableRowModelListener
public void rowSelectionChanged(ListSelectionEvent e)
TableRowModelListener
rowSelectionChanged
in interface TableRowModelListener
public void rowUpdated(TableRowModelEvent e)
TableRowModelListener
rowUpdated
in interface TableRowModelListener
public void setShowPageNumber(boolean show)
public String getMimeType()
public void updateRowAndPageHeight(HeighCalculator hCalc)
public String getSourceTemplate()
public void setSourceTemplate(String sourceTemplate)
public boolean isPrintThroughPdf()
public void setPrintThroughPdf(boolean printThroughPdf)
printThroughPdf
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |