|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
jdbreport.grid.JReportGrid
public class JReportGrid
| Nested Class Summary | |
|---|---|
protected static class |
JReportGrid.AbstractReportRenderer
|
static class |
JReportGrid.DateRenderer
|
static class |
JReportGrid.HTMLEditor
|
static class |
JReportGrid.HTMLReportRenderer
|
static class |
JReportGrid.PageNumberRenderer
PageNumber Renderer |
static class |
JReportGrid.StyledEditor
Default editors |
static class |
JReportGrid.TextReportRenderer
|
| Nested classes/interfaces inherited from class javax.swing.JTable |
|---|
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected ReportCellRenderer |
htmlReportRenderer
|
static int |
ROW_MARGIN
|
protected ReportCellRenderer |
textReportRenderer
|
protected UndoListener |
undoListener
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JReportGrid()
|
|
JReportGrid(TableModel tm)
|
|
| Method Summary | |
|---|---|
void |
addAction(Action action)
|
void |
addBorder(boolean[] positions)
Sets the borders at the specified positions for the selected cells |
void |
addCellSelectListener(CellSelectListener l)
|
void |
addCellValueChangeListener(CellValueChangeListener l)
|
void |
addColumns()
|
void |
addRows(int count,
int index)
|
void |
addUndoListener(UndoListener l)
|
void |
autoHeightCell()
Auto height row |
int |
calcRowHeight(ReportModel model,
Cell cell,
int row,
int column)
|
protected boolean |
canEdit(Cell cell)
|
protected boolean |
canUndo()
|
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
|
void |
columnMoved(TableColumnModelEvent e)
|
void |
columnMoving(TableColumnModelEvent e)
|
protected void |
configureEnclosingScrollPane()
|
int |
convertColumnIndexToModel(int viewColumnIndex)
|
void |
copy()
|
String |
copy(GridRect selectionRect)
|
Image |
copyImage(GridRect selectionRect)
|
String |
copyText(GridRect selectionRect)
|
protected CellPropertiesDlg |
createCellProperties()
|
protected ClipboardParser |
createClipboardWriter()
|
protected TableColumnModel |
createDefaultColumnModel()
|
void |
createDefaultColumnsFromModel()
|
protected void |
createDefaultEditors()
|
protected void |
createDefaultRenderers()
|
protected RowHeader |
createDefaultRowHeader()
|
protected JTableHeader |
createDefaultTableHeader()
|
DefaultHandler |
createGridHandler(XMLReader reader)
|
GridParser |
createGridWriter()
|
protected DefaultHandler |
createPasteHandler(XMLReader reader,
int selectRow,
int selectCol)
|
void |
cut()
|
void |
decDecimals()
Decrements decimal position of the numeric value for selected cells. |
void |
delete()
|
void |
deleteIcon()
|
boolean |
downCell()
|
void |
editingStopped(ChangeEvent e)
|
void |
endUpdate()
|
boolean |
find(and.finder.FindParams findParams)
|
void |
fireCellSelectChanged()
|
void |
fireCellSelectChanged(CellSelectChangedEvent e)
|
protected void |
fireCellValueChanged(CellValueChangedEvent e)
|
TableCellEditor |
getCellEditor(int row,
int column)
|
Rectangle |
getCellRect(int row,
int column,
boolean includeSpacing)
|
TableCellRenderer |
getCellRenderer(Cell cell)
|
TableCellRenderer |
getCellRenderer(int row,
int column)
|
CellStyle |
getCellStyle(Object index)
Returns the CellStyle by index |
protected and.finder.Finder |
getFinder()
|
ReportCellRenderer |
getHTMLReportRenderer()
|
Printable |
getPrintable(JTable.PrintMode printMode,
MessageFormat headerFormat,
MessageFormat footerFormat)
|
PrintRequestAttributeSet |
getPrintAttributes()
|
ReportModel |
getReportModel()
|
Printable |
getReportPrintable(boolean isPreview)
|
RowHeader |
getRowHeader()
|
int |
getRowHeight(int row)
|
int |
getRowMargin()
|
String |
getRowName(int row)
Returns the row's header value |
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
Cell |
getSelectedCell()
Returns the first selected cell |
GridRect |
getSelectionRect()
|
StringMetrics |
getStringMetrics()
|
TableRowModel |
getTableRowModel()
|
ReportCellRenderer |
getTextReportRenderer()
|
String |
getUIClassID()
|
void |
horizontalPageBreak()
|
void |
incDecimals()
Increments decimal position of the numeric value for selected cells. |
boolean |
incrementalFind(and.finder.FindParams findParams)
|
protected void |
initializeLocalVars()
|
void |
insertIcon()
|
boolean |
isCellSelected(int row,
int column)
|
boolean |
isPrintLeftToRight()
Direction of an output of pages on the printer. |
boolean |
isPrintState()
|
boolean |
isShowGrid()
|
void |
loadFragment(Reader reader,
int selectRow,
int selectCol)
|
boolean |
nextCell()
|
void |
pageSetup()
|
void |
paste()
|
void |
paste(String data,
int selectRow,
int selectCol)
|
void |
pasteImage(Image image,
int selectedRow,
int selectedColumn)
|
void |
pasteText(String data,
int selectedRow,
int selectedColumn)
|
Component |
prepareEditor(TableCellEditor editor,
int row,
int column)
|
boolean |
print()
|
boolean |
print(boolean showPrintDialog,
PrintRequestAttributeSet attr)
|
void |
propertyChange(PropertyChangeEvent evt)
|
protected void |
pushUndo(UndoItem undo)
|
void |
removeAction(Action action)
|
void |
removeBorder(boolean[] positions)
Removes the borders at the specified positions for the selected cells |
void |
removeCellSelectListener(CellSelectListener l)
|
void |
removeCellValueChangeListener(CellValueChangeListener l)
|
void |
removeColumns()
|
void |
removeRows(int count,
int index)
|
void |
removeUndoListener(UndoListener l)
|
boolean |
rightCell()
|
void |
rowAdded(TableRowModelEvent e)
Tells listeners that a row was added to the model. |
int |
rowAtPoint(Point point)
|
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 |
saveIcon()
|
void |
scaleIcon()
|
void |
setCellBackground(Color color)
Sets background color for the selected cells |
void |
setColumnsWidth(int minColumn,
int maxColumn,
int width)
|
void |
setFontName(String fontName)
Sets the font's name for the selected cells. |
void |
setFontSize(int fontSize)
Sets the font's size for the selected cells |
void |
setFontStyle(int fontStyle)
Changes the font's style for the selected cells on the inverse one |
void |
setHorzAlign(int align)
Sets the horizontal alignment for the selected cells The horizontal alignment is a constant that may be LEFT, RIGHT, CENTER or JUSTIFY |
protected void |
setLazyRenderer(Class<?> c,
String s)
|
void |
setModel(TableModel dataModel)
|
void |
setRowHeader(RowHeader rowHeader)
|
void |
setRowHeight(int rowHeight)
|
void |
setRowHeight(int row,
int rowHeight)
|
void |
setRowModel(TableRowModel rowModel)
Sets the TableRowModel |
void |
setRowsHeight(int minRow,
int maxRow,
int height)
|
void |
setSelectedRect(GridRect rect)
Selects cells by rect |
void |
setShowPrintDialog(boolean show)
|
void |
setSize(Dimension newSize)
|
void |
setTableHeader(JTableHeader tableHeader)
|
void |
setVertAlign(int align)
Sets the vertical alignment for the selected cells The vertical alignment is a constant that may be TOP, BOTTOM or CENTER |
void |
showCellEditor()
|
void |
showCellProperty()
|
void |
startUpdate()
|
void |
tableChanged(TableModelEvent e)
|
protected void |
unconfigureEnclosingScrollPane()
|
void |
unionCell()
Unions the selected cells |
protected void |
unionUndo(UndoItem undo)
|
void |
updatePages(int startRow)
Calculates pages' size |
void |
updateRowHeight(ReportModel model)
|
void |
updateRowHeight(ReportModel model,
int row,
int column)
Compares text's height and row's height. |
void |
updateUI()
|
void |
valueChanged(ListSelectionEvent e)
|
void |
verticalPageBreak()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.event.TableColumnModelListener |
|---|
columnAdded, columnMarginChanged, columnRemoved, columnSelectionChanged |
| Field Detail |
|---|
public static final int ROW_MARGIN
protected ReportCellRenderer htmlReportRenderer
protected ReportCellRenderer textReportRenderer
protected UndoListener undoListener
| Constructor Detail |
|---|
public JReportGrid()
public JReportGrid(TableModel tm)
| Method Detail |
|---|
public void addAction(Action action)
public void removeAction(Action action)
public int getRowMargin()
getRowMargin in class JTablepublic void rowUpdated(TableRowModelEvent e)
TableRowModelListener
rowUpdated in interface TableRowModelListenerpublic void rowAdded(TableRowModelEvent e)
TableRowModelListener
rowAdded in interface TableRowModelListenerpublic void rowRemoved(TableRowModelEvent e)
rowRemoved in interface TableRowModelListenerpublic void rowMoved(TableRowModelEvent e)
rowMoved in interface TableRowModelListenerpublic void rowResized(TableRowModelEvent e)
rowResized in interface TableRowModelListenerpublic void rowMarginChanged(ChangeEvent e)
rowMarginChanged in interface TableRowModelListenerpublic void rowSelectionChanged(ListSelectionEvent e)
rowSelectionChanged in interface TableRowModelListenerpublic ReportModel getReportModel()
public TableRowModel getTableRowModel()
public int getRowHeight(int row)
getRowHeight in class JTablepublic void setRowHeight(int rowHeight)
setRowHeight in class JTable
public void setRowHeight(int row,
int rowHeight)
setRowHeight in class JTablepublic int rowAtPoint(Point point)
rowAtPoint in class JTablepublic String getUIClassID()
getUIClassID in class JTablepublic void updateUI()
updateUI in class JTable
public Rectangle getCellRect(int row,
int column,
boolean includeSpacing)
getCellRect in class JTablepublic void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListenertableChanged in class JTablepublic void setModel(TableModel dataModel)
setModel in class JTablepublic void setTableHeader(JTableHeader tableHeader)
setTableHeader in class JTablepublic void setRowModel(TableRowModel rowModel)
rowModel - the TableRowModelpublic String getRowName(int row)
row - the row's number
public void updatePages(int startRow)
startRow - the first row for calculationpublic void createDefaultColumnsFromModel()
createDefaultColumnsFromModel in class JTablepublic void setRowHeader(RowHeader rowHeader)
rowHeader - the RowHeaderpublic RowHeader getRowHeader()
public boolean isShowGrid()
protected TableColumnModel createDefaultColumnModel()
createDefaultColumnModel in class JTableprotected JTableHeader createDefaultTableHeader()
createDefaultTableHeader in class JTablepublic int convertColumnIndexToModel(int viewColumnIndex)
convertColumnIndexToModel in class JTable
public void changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
changeSelection in class JTable
public boolean isCellSelected(int row,
int column)
isCellSelected in class JTablepublic void columnMoving(TableColumnModelEvent e)
columnMoving in interface ReportColumnModelListenerpublic void columnMoved(TableColumnModelEvent e)
columnMoved in interface TableColumnModelListenercolumnMoved in class JTablepublic void unionCell()
public void autoHeightCell()
public void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListenervalueChanged in class JTablepublic CellStyle getCellStyle(Object index)
index - the CellStyle's id
public void setHorzAlign(int align)
align - the new horizontal alignment for the cellspublic void setVertAlign(int align)
align - the new vertical alignment for the cellspublic void addBorder(boolean[] positions)
positions - positions - boolean values, where true sets border, otherwise
does nothing. Position's index can be from Border.LINE_LEFT to
Border.LINE_HMIDDLEpublic void removeBorder(boolean[] positions)
positions - positions - boolean values, where true sets border, otherwise
does nothing. Position's index can be from Border.LINE_LEFT to
Border.LINE_HMIDDLEpublic void setFontName(String fontName)
fontName - the font's namepublic void setFontSize(int fontSize)
fontSize - the new font's sizepublic void setFontStyle(int fontStyle)
fontStyle - the font's style The style argument is an integer bitmask that
may be PLAIN, or a bitwise union of BOLD, ITALIC, UNDERLINE,
STRIKETHROUGHpublic void setCellBackground(Color color)
color - the new background color for the cellspublic void incDecimals()
public void decDecimals()
public Cell getSelectedCell()
public GridRect getSelectionRect()
public void setSelectedRect(GridRect rect)
rect - coordinates
public TableCellEditor getCellEditor(int row,
int column)
getCellEditor in class JTableprotected void initializeLocalVars()
initializeLocalVars in class JTableprotected RowHeader createDefaultRowHeader()
protected void configureEnclosingScrollPane()
configureEnclosingScrollPane in class JTablepublic void setSize(Dimension newSize)
setSize in class Componentprotected void unconfigureEnclosingScrollPane()
unconfigureEnclosingScrollPane in class JTablepublic void addUndoListener(UndoListener l)
public void removeUndoListener(UndoListener l)
protected void pushUndo(UndoItem undo)
protected void unionUndo(UndoItem undo)
protected boolean canUndo()
public void addCellSelectListener(CellSelectListener l)
public void removeCellSelectListener(CellSelectListener l)
l - CellSelectListenerpublic void fireCellSelectChanged()
public void fireCellSelectChanged(CellSelectChangedEvent e)
public boolean print(boolean showPrintDialog,
PrintRequestAttributeSet attr)
throws PrinterException
PrinterException
public boolean print()
throws PrinterException
print in class JTablePrinterExceptionpublic PrintRequestAttributeSet getPrintAttributes()
public void setShowPrintDialog(boolean show)
public Printable getPrintable(JTable.PrintMode printMode,
MessageFormat headerFormat,
MessageFormat footerFormat)
getPrintable in class JTablepublic Printable getReportPrintable(boolean isPreview)
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic void editingStopped(ChangeEvent e)
editingStopped in interface CellEditorListenereditingStopped in class JTablepublic void addCellValueChangeListener(CellValueChangeListener l)
public void removeCellValueChangeListener(CellValueChangeListener l)
l - CellValueChangeListenerprotected void fireCellValueChanged(CellValueChangedEvent e)
public int getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface ScrollablegetScrollableUnitIncrement in class JTablepublic boolean downCell()
public boolean rightCell()
public boolean nextCell()
public void horizontalPageBreak()
public void verticalPageBreak()
public void delete()
public Component prepareEditor(TableCellEditor editor,
int row,
int column)
prepareEditor in class JTable
public String copyText(GridRect selectionRect)
throws SaveReportException
SaveReportExceptionpublic Image copyImage(GridRect selectionRect)
public void copy()
public String copy(GridRect selectionRect)
throws SaveReportException
SaveReportExceptionprotected ClipboardParser createClipboardWriter()
public void pasteText(String data,
int selectedRow,
int selectedColumn)
throws IOException
IOException
public void pasteImage(Image image,
int selectedRow,
int selectedColumn)
public void paste(String data,
int selectRow,
int selectCol)
throws ParserConfigurationException,
SAXException,
IOException
ParserConfigurationException
SAXException
IOExceptionpublic GridParser createGridWriter()
public DefaultHandler createGridHandler(XMLReader reader)
public void loadFragment(Reader reader,
int selectRow,
int selectCol)
throws ParserConfigurationException,
SAXException,
IOException
reader - selectRow - selectCol -
ParserConfigurationException
SAXException
IOException
protected DefaultHandler createPasteHandler(XMLReader reader,
int selectRow,
int selectCol)
public void cut()
public void paste()
public void insertIcon()
public void saveIcon()
public void scaleIcon()
public void deleteIcon()
public void pageSetup()
public void addColumns()
public void removeColumns()
public void addRows(int count,
int index)
public void removeRows(int count,
int index)
public void setColumnsWidth(int minColumn,
int maxColumn,
int width)
public void setRowsHeight(int minRow,
int maxRow,
int height)
public int calcRowHeight(ReportModel model,
Cell cell,
int row,
int column)
calcRowHeight in interface HeighCalculator
public void updateRowHeight(ReportModel model,
int row,
int column)
model - row - the row's numbercolumn - the column's numberpublic void startUpdate()
public void endUpdate()
public void updateRowHeight(ReportModel model)
protected boolean canEdit(Cell cell)
public void showCellEditor()
public void showCellProperty()
protected CellPropertiesDlg createCellProperties()
throws HeadlessException
HeadlessExceptionpublic boolean isPrintState()
protected and.finder.Finder getFinder()
public boolean find(and.finder.FindParams findParams)
find in interface and.finder.Finderpublic boolean incrementalFind(and.finder.FindParams findParams)
incrementalFind in interface and.finder.Finderpublic ReportCellRenderer getHTMLReportRenderer()
public ReportCellRenderer getTextReportRenderer()
protected void setLazyRenderer(Class<?> c,
String s)
public TableCellRenderer getCellRenderer(int row,
int column)
getCellRenderer in class JTablepublic TableCellRenderer getCellRenderer(Cell cell)
protected void createDefaultRenderers()
createDefaultRenderers in class JTablepublic boolean isPrintLeftToRight()
protected void createDefaultEditors()
createDefaultEditors in class JTablepublic StringMetrics getStringMetrics()
getStringMetrics in interface HeighCalculator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||