本文整理汇总了Java中org.jdesktop.swingx.table.TableColumnModelExt类的典型用法代码示例。如果您正苦于以下问题:Java TableColumnModelExt类的具体用法?Java TableColumnModelExt怎么用?Java TableColumnModelExt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TableColumnModelExt类属于org.jdesktop.swingx.table包,在下文中一共展示了TableColumnModelExt类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getColumnExt
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Returns the first <code>TableColumnExt</code> with the given
* <code>identifier</code>. The return value is null if there is no
* contained column with <b>identifier</b> or if the column with
* <code>identifier</code> is not of type <code>TableColumnExt</code>. The
* returned column may be visible or hidden.
*
* @param identifier the object used as column identifier
* @return first <code>TableColumnExt</code> with the given identifier or
* null if none is found
*
* @see #getColumnExt(int)
* @see #getColumn(Object)
* @see TableColumnModelExt#getColumnExt(Object)
*/
public TableColumnExt getColumnExt(Object identifier) {
if (getColumnModel() instanceof TableColumnModelExt) {
return ((TableColumnModelExt) getColumnModel())
.getColumnExt(identifier);
} else {
// PENDING: not tested!
try {
TableColumn column = getColumn(identifier);
if (column instanceof TableColumnExt) {
return (TableColumnExt) column;
}
} catch (Exception e) {
// TODO: handle exception
}
}
return null;
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:33,代码来源:JXTable.java
示例2: getColumnExt
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Returns the first <code>TableColumnExt</code> with the given
* <code>identifier</code>. The return value is null if there is no contained
* column with <b>identifier</b> or if the column with <code>identifier</code> is not
* of type <code>TableColumnExt</code>. The returned column
* may be visible or hidden.
*
* @param identifier the object used as column identifier
* @return first <code>TableColumnExt</code> with the given identifier or
* null if none is found
*
* @see #getColumnExt(int)
* @see #getColumn(Object)
* @see TableColumnModelExt#getColumnExt(Object)
*/
public TableColumnExt getColumnExt(Object identifier) {
if (getColumnModel() instanceof TableColumnModelExt) {
return ((TableColumnModelExt) getColumnModel())
.getColumnExt(identifier);
} else {
// PENDING: not tested!
try {
TableColumn column = getColumn(identifier);
if (column instanceof TableColumnExt) {
return (TableColumnExt) column;
}
} catch (Exception e) {
// TODO: handle exception
}
}
return null;
}
开发者ID:sing-group,项目名称:aibench-project,代码行数:33,代码来源:JXTable.java
示例3: storeTableProperties
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
public static void storeTableProperties(JXTable pTable, Configuration pConfig, String pPrefix) {
List<TableColumn> cols = ((TableColumnModelExt) pTable.getColumnModel()).getColumns(true);
for (TableColumn c : cols) {
TableColumnExt col = (TableColumnExt) c;
String title = col.getTitle();
pConfig.setProperty(pPrefix + ".table.col." + title + ".width", col.getWidth());
pConfig.setProperty(pPrefix + ".table.col." + title + ".visible", col.isVisible());
}
int sortedCol = pTable.getSortedColumnIndex();
if (sortedCol < 0) {
return;
}
pConfig.setProperty(pPrefix + ".table.sort.col", sortedCol);
int sortOrder = 0;
switch (pTable.getSortOrder(sortedCol)) {
case ASCENDING:
sortOrder = 1;
break;
case DESCENDING:
sortOrder = -1;
break;
default:
sortOrder = 0;
}
pConfig.setProperty(pPrefix + ".table.sort.order", sortOrder);
pConfig.setProperty(pPrefix + ".table.horizontal.scroll", pTable.isHorizontalScrollEnabled());
}
开发者ID:Torridity,项目名称:dsworkbench,代码行数:29,代码来源:PropertyHelper.java
示例4: updateTableHeader
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Updates table header. Gets the header value from table if cell header row
* is selected. Otherwise the header value is just column numbers.
*
*/
private void updateTableHeader(){
TableColumnModelExt model = new DefaultTableColumnModelExt();
Object[] columnTitles = conversionModel.getColumnTitles();
for(int column = 0; column < columnTitles.length; column++){
if(column >= this.getColumnCount()){
/*
* The TitleRowChangeEvent is fired after data chopping is done.
* This means that this method may be called before the table is updated.
* In this case, if the column count is changed, ArrayIndexOutOfBounds exception
* may occure.
*
* So, let's break the loop and wait that this method is called by updateTable
* method a bit later.
*/
break;
}
TableColumn newColumn = this.getColumnModel().getColumn(column);
if(column >= 1){
//Now text to the upper left corner cell
if(newColumn.getHeaderRenderer() instanceof PanelTableHeaderRenderer){
//For custom header of second step
((PanelTableHeaderRenderer)newColumn.getHeaderRenderer()).
setTitleText(columnTitles[column].toString());
} else {
//For step 1
newColumn.setHeaderValue(columnTitles[column]);
}
}
model.addColumn(newColumn);
}
this.setColumnModel(model);
logger.debug("Table header updated");
}
开发者ID:chipster,项目名称:chipster,代码行数:45,代码来源:ImportPreviewTable.java
示例5: getAllColumns
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
protected List<TableColumn> getAllColumns() {
return ((TableColumnModelExt) impl.getColumnModel()).getColumns(true);
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:DesktopAbstractTable.java
示例6: getColumnCount
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Returns the number of contained columns. The count includes or excludes
* invisible columns, depending on whether the <code>includeHidden</code> is
* true or false, respectively. If false, this method returns the same count
* as <code>getColumnCount()</code>. If the columnModel is not of type
* <code>TableColumnModelExt</code>, the parameter value has no effect.
*
* @param includeHidden a boolean to indicate whether invisible columns
* should be included
* @return the number of contained columns, including or excluding the
* invisible as specified.
* @see #getColumnCount()
* @see TableColumnModelExt#getColumnCount(boolean)
*/
public int getColumnCount(boolean includeHidden) {
if (getColumnModel() instanceof TableColumnModelExt) {
return ((TableColumnModelExt) getColumnModel())
.getColumnCount(includeHidden);
}
return getColumnCount();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:22,代码来源:JXTable.java
示例7: getColumns
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Returns a <code>List</code> of contained <code>TableColumn</code>s.
* Includes or excludes invisible columns, depending on whether the
* <code>includeHidden</code> is true or false, respectively. If false, an
* <code>Iterator</code> over the List is equivalent to the
* <code>Enumeration</code> returned by <code>getColumns()</code>. If the
* columnModel is not of type <code>TableColumnModelExt</code>, the
* parameter value has no effect.
* <p>
*
* NOTE: the order of columns in the List depends on whether or not the
* invisible columns are included, in the former case it's the insertion
* order in the latter it's the current order of the visible columns.
*
* @param includeHidden a boolean to indicate whether invisible columns
* should be included
* @return a <code>List</code> of contained columns.
*
* @see #getColumns()
* @see TableColumnModelExt#getColumns(boolean)
*/
public List<TableColumn> getColumns(boolean includeHidden) {
if (getColumnModel() instanceof TableColumnModelExt) {
return ((TableColumnModelExt) getColumnModel())
.getColumns(includeHidden);
}
return getColumns();
}
开发者ID:RockManJoe64,项目名称:swingx,代码行数:29,代码来源:JXTable.java
示例8: getColumnCount
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Returns the number of contained columns. The count includes or excludes invisible
* columns, depending on whether the <code>includeHidden</code> is true or
* false, respectively. If false, this method returns the same count as
* <code>getColumnCount()</code>. If the columnModel is not of type
* <code>TableColumnModelExt</code>, the parameter value has no effect.
*
* @param includeHidden a boolean to indicate whether invisible columns
* should be included
* @return the number of contained columns, including or excluding the
* invisible as specified.
* @see #getColumnCount()
* @see TableColumnModelExt#getColumnCount(boolean)
*/
public int getColumnCount(boolean includeHidden) {
if (getColumnModel() instanceof TableColumnModelExt) {
return ((TableColumnModelExt) getColumnModel())
.getColumnCount(includeHidden);
}
return getColumnCount();
}
开发者ID:sing-group,项目名称:aibench-project,代码行数:22,代码来源:JXTable.java
示例9: getColumns
import org.jdesktop.swingx.table.TableColumnModelExt; //导入依赖的package包/类
/**
* Returns a <code>List</code> of contained <code>TableColumn</code>s.
* Includes or excludes invisible columns, depending on whether the
* <code>includeHidden</code> is true or false, respectively. If false, an
* <code>Iterator</code> over the List is equivalent to the
* <code>Enumeration</code> returned by <code>getColumns()</code>.
* If the columnModel is not of type
* <code>TableColumnModelExt</code>, the parameter value has no effect.
* <p>
*
* NOTE: the order of columns in the List depends on whether or not the
* invisible columns are included, in the former case it's the insertion
* order in the latter it's the current order of the visible columns.
*
* @param includeHidden a boolean to indicate whether invisible columns
* should be included
* @return a <code>List</code> of contained columns.
*
* @see #getColumns()
* @see TableColumnModelExt#getColumns(boolean)
*/
public List<TableColumn> getColumns(boolean includeHidden) {
if (getColumnModel() instanceof TableColumnModelExt) {
return ((TableColumnModelExt) getColumnModel())
.getColumns(includeHidden);
}
return getColumns();
}
开发者ID:sing-group,项目名称:aibench-project,代码行数:29,代码来源:JXTable.java
注:本文中的org.jdesktop.swingx.table.TableColumnModelExt类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论