devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
32 lines (31 loc) • 1.36 kB
JavaScript
import { TablePosition, TablePositionIndexes } from '../../../../../model/tables/main-structures/table';
import { Pair } from '@devexpress/utils/lib/class/pair';
import { BaseFormatter, StdProps } from '../../base-formatter';
export class CCF_TablePositionIndexes extends BaseFormatter {
isHandleObject(obj) {
return obj instanceof TablePositionIndexes;
}
getShortDescription(_config) {
const list = [];
if (this.curr instanceof TablePosition)
list.push(new Pair("tableI", this.curr.table.index));
list.push(new Pair("rowI", this.curr.rowIndex));
list.push(new Pair("cellI", this.curr.cellIndex));
return this.stdShow(new StdProps(list).showAsLine());
}
availableFullDescription(_config) {
return this.curr instanceof TablePosition;
}
getFullDescription(_config) {
const curr = this.curr;
const list = [
new Pair("tableIndex", curr.table),
new Pair("rowIndex", curr.rowIndex),
new Pair("cellIndex", curr.cellIndex),
new Pair("row", curr.row),
new Pair("cell", curr.cell),
];
return this.stdShow(new StdProps(list).showAsColumn());
}
}
CCF_TablePositionIndexes._foo = BaseFormatter.addToFormattersList(new CCF_TablePositionIndexes());