|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.page.JCPageTableFromJTable
Creates a JCPageTable
from a swing JTable
.
Field Summary | |
protected static int[][] |
alignment_map
|
protected static int |
defaultColumnWidth
|
Constructor Summary | |
JCPageTableFromJTable()
|
Method Summary | |
protected static int |
convertSwingToTextStyleAlignment(int alignment)
Converts the SwingConstants alignment to a JCTextStyle alignment. |
static com.klg.jclass.page.JCPageTable |
createTable(com.klg.jclass.page.JCDocument doc,
JTable jTable,
boolean populate)
Creates a JCPageTable from a swing JTable . |
static com.klg.jclass.page.JCPageTable |
createTable(com.klg.jclass.page.JCDocument doc,
TableModel tableModel,
boolean populate)
Creates a JCPageTable from a swing TableModel . |
protected static com.klg.jclass.page.JCPageTable |
createTable(com.klg.jclass.page.JCDocument doc,
TableModel tableModel,
JTable jTable,
boolean populate)
Creates a JCPageTable from either a swing TableModel or
a swing JTable . |
protected static JLabel |
getLabelComponent(Component comp)
Searches for a JLabel and returns it. |
static void |
populateTable(com.klg.jclass.page.JCPageTable table,
JTable jTable)
Populates an empty JCPageTable from the view of the specified
JTable , copying certain style elements (alignment, font). |
static void |
populateTable(com.klg.jclass.page.JCPageTable table,
JTable jTable,
boolean applyJTableStyles)
Populates an empty JCPageTable from the view of the specified JTable . |
static void |
populateTable(com.klg.jclass.page.JCPageTable table,
TableModel tableModel)
Populates an empty JCPageTable from the specified TableModel . |
protected static void |
populateTable(com.klg.jclass.page.JCPageTable table,
TableModel tableModel,
JTable jTable)
Populates an empty JCPageTable from the specified TableModel
or JTable . |
protected static void |
populateTable(com.klg.jclass.page.JCPageTable table,
TableModel tableModel,
JTable jTable,
boolean applyJTableStyles)
Populates an empty JCPageTable from the specified TableModel
or JTable . |
protected static com.klg.jclass.page.JCTextStyle |
setFontAndAlignment(TableCellRenderer renderer,
com.klg.jclass.page.JCTextStyle currentStyle,
JTable jTable,
Object object,
int rowIdx,
int colIdx)
Given a renderer, the font and alignment will be set in the style. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static int defaultColumnWidth
protected static int[][] alignment_map
Constructor Detail |
public JCPageTableFromJTable()
Method Detail |
public static com.klg.jclass.page.JCPageTable createTable(com.klg.jclass.page.JCDocument doc, JTable jTable, boolean populate)
JCPageTable
from a swing JTable
.
The JCPageTable
will have the same number of columns and the
same column widths as the list of columns in the JTable
view.
doc
- current JCDocument
instancejTable
- JTable
instance being converted to JCPageTable
populate
- if true
, the created JCPageTable
is immediately populated
with the contents and certain style elements (alignment,
font) of the JTable
; if false
, a
JCPageTable
is created but no data is placed within it
public static com.klg.jclass.page.JCPageTable createTable(com.klg.jclass.page.JCDocument doc, TableModel tableModel, boolean populate)
JCPageTable
from a swing TableModel
.
The JCPageTable
will have the same number of columns as the
TableModel
and will use the default column size.
doc
- current JCDocument
instancetableModel
- TableModel
instance being converted to JCPageTable
populate
- if true
, the created JCPageTable
is immediately
populated with the contents of the TableModel
; if false
,
a JCPageTable
is created but no data is placed within it
protected static com.klg.jclass.page.JCPageTable createTable(com.klg.jclass.page.JCDocument doc, TableModel tableModel, JTable jTable, boolean populate)
JCPageTable
from either a swing TableModel
or
a swing JTable
. If the JTable
is non-null, the number of
columns and column widths are determined from the JTable
view. If
JTable
is null, the number of columns are determined from the
TableModel
and the default column width is used.
doc
- current JCDocument
instancetableModel
- TableModel
instance being converted to JCPageTable
jTable
- JTable
instance being converted to JCPageTable
populate
- if true
, the created JCPageTable
is immediately
populated with the contents of either the JTable
or the
TableModel
(if the JTable
is non-null, certain
style elements (alignment, font) are also copied); if false
,
a JCPageTable
is created but no data is placed within it
public static void populateTable(com.klg.jclass.page.JCPageTable table, JTable jTable)
JCPageTable
from the view of the specified
JTable
, copying certain style elements (alignment, font).
table
- JCPageTable
instance to populatejTable
- JTable
instance to populate frompublic static void populateTable(com.klg.jclass.page.JCPageTable table, JTable jTable, boolean applyJTableStyles)
JCPageTable
from the view of the specified JTable
.
table
- JCPageTable
instance to populatejTable
- JTable
instance to populate fromapplyJTableStyles
- true
if certain style elements (alignment, font)
should be applied to the JCPageTable
cells
from the JTable
cellspublic static void populateTable(com.klg.jclass.page.JCPageTable table, TableModel tableModel)
JCPageTable
from the specified TableModel
.
table
- JCPageTable
instance to populatetableModel
- TableModel
instance to populate fromprotected static int convertSwingToTextStyleAlignment(int alignment)
SwingConstants
alignment to a JCTextStyle
alignment.
alignment
-
protected static JLabel getLabelComponent(Component comp)
JLabel
and returns it. If no JLabel
is found,
null is returned.
comp
-
protected static com.klg.jclass.page.JCTextStyle setFontAndAlignment(TableCellRenderer renderer, com.klg.jclass.page.JCTextStyle currentStyle, JTable jTable, Object object, int rowIdx, int colIdx)
colIdx
- currentStyle
- jTable
- object
- renderer
- rowIdx
-
protected static void populateTable(com.klg.jclass.page.JCPageTable table, TableModel tableModel, JTable jTable)
JCPageTable
from the specified TableModel
or JTable
. If both a JTable
and TableModel
are
specified, the table will be populated as per the 'view' of the JTable
,
although data is obtained by querying the TableModel
. If the JTable
is non-null, certain style elements (alignment, font) will be copied to the JCPageTable
.
No longer used. Provided for backwards compatibility.
table
- JCPageTable
instance to populatetableModel
- TableModel
instance to populate fromjTable
- JTable
instance to populate fromprotected static void populateTable(com.klg.jclass.page.JCPageTable table, TableModel tableModel, JTable jTable, boolean applyJTableStyles)
JCPageTable
from the specified TableModel
or JTable
. If both a JTable
and TableModel
are specified,
the table will be populated as per the 'view' of the JTable
, although data is
obtained by querying the TableModel
. If the JTable
is non-null
and applyJTableStyles
is true
, certain style elements (alignment, font)
will be copied to the JCPageTable
.
table
- JCPageTable
instance to populatetableModel
- TableModel
instance to populate fromjTable
- JTable
instance to populate fromapplyJTableStyles
- true
if certain style elements (alignment, font)
should be applied to the JCPageTable
cells
from the JTable
cells
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |