本文整理汇总了Java中com.intellij.util.ui.ColumnInfo.valueOf方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnInfo.valueOf方法的具体用法?Java ColumnInfo.valueOf怎么用?Java ColumnInfo.valueOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.ui.ColumnInfo
的用法示例。
在下文中一共展示了ColumnInfo.valueOf方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTreeColumns
import com.intellij.util.ui.ColumnInfo; //导入方法依赖的package包/类
private ColumnInfo[] createTreeColumns(DualViewColumnInfo[] columns) {
Collection<ColumnInfo> result = new ArrayList<ColumnInfo>();
final ColumnInfo firstColumn = columns[0];
ColumnInfo firstTreeColumn = new ColumnInfo(firstColumn.getName()) {
public Object valueOf(Object object) {
return firstColumn.valueOf(object);
}
public Class getColumnClass() {
return TreeTableModel.class;
}
public boolean isCellEditable(Object o) {
return true;
}
};
result.add(firstTreeColumn);
for (int i = 1; i < columns.length; i++) {
DualViewColumnInfo column = columns[i];
if (column.shouldBeShownIsTheTree()) result.add(column);
}
return result.toArray(new ColumnInfo[result.size()]);
}
示例2: setValueAt
import com.intellij.util.ui.ColumnInfo; //导入方法依赖的package包/类
@Override
public void setValueAt(Object newValue, int rowIndex, int columnIndex) {
if (rowIndex < getRowCount()) {
@SuppressWarnings("unchecked")
ColumnInfo<T, Object> column = (ColumnInfo<T, Object>)getColumnInfos()[columnIndex];
T item = getItem(rowIndex);
Object oldValue = column.valueOf(item);
if (column.getColumnClass() == String.class
? !Comparing.strEqual(((String)oldValue), ((String)newValue))
: !Comparing.equal(oldValue, newValue)) {
column.setValue(helper.getMutable(item, rowIndex), newValue);
if (dataChangedListener != null) {
dataChangedListener.dataChanged(column, rowIndex);
}
}
}
}
示例3: getValueAt
import com.intellij.util.ui.ColumnInfo; //导入方法依赖的package包/类
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
final ColumnInfo column = myColumns.get(columnIndex);
if (myLines == null) return column.getPreferredStringValue();
final CommitI commitI = myLines.get(rowIndex);
if (commitI == null) return column.getPreferredStringValue();
if (commitI.holdsDecoration()) return columnIndex == 0 ? commitI.getDecorationString() : "";
final GitHeavyCommit details = myCache.convert(commitI.selectRepository(myRootsHolder.getRoots()), commitI.getHash());
if (details == null) return LOADING;
return column.valueOf(details);
}