本文整理汇总了Java中org.insightech.er.util.Format.formatType方法的典型用法代码示例。如果您正苦于以下问题:Java Format.formatType方法的具体用法?Java Format.formatType怎么用?Java Format.formatType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.insightech.er.util.Format
的用法示例。
在下文中一共展示了Format.formatType方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
private void initTable() {
editColumnTable.setVisible(false);
editColumnTable.removeData();
for (final NormalColumn normalColumn : table.getExpandedColumns()) {
final String name = normalColumn.getName();
String type = null;
if (normalColumn.getType() == null) {
type = "";
} else {
type = Format.formatType(normalColumn.getType(), normalColumn.getTypeData(), dialog.getDiagram().getDatabase(), true);
}
editColumnTable.addColumnHeader(name + "\r\n" + type, 100);
}
initTableData();
editColumnTable.setVisible(true);
}
示例2: generateAttributeTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
protected String generateAttributeTable(final ERDiagram diagram, final List<NormalColumn> normalColumnList) throws IOException {
final StringBuilder sb = new StringBuilder();
final String template = ExportToHtmlManager.getTemplate("types/attribute_row_template.html");
for (final NormalColumn normalColumn : normalColumnList) {
String type = null;
if (normalColumn.getType() != null) {
type = Format.formatType(normalColumn.getType(), normalColumn.getTypeData(), diagram.getDatabase(), true);
} else {
type = "";
}
final Object[] args = {getObjectId(normalColumn), getPKString(normalColumn), getForeignKeyString(normalColumn), Format.null2blank(normalColumn.getLogicalName()), Format.null2blank(normalColumn.getPhysicalName()), type, getUniqueString(normalColumn), getNotNullString(normalColumn)};
final String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例3: generateAttributeDetailTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
public String generateAttributeDetailTable(final ERDiagram diagram, final List<NormalColumn> normalColumnList) throws IOException {
final StringBuilder sb = new StringBuilder();
final String template = ExportToHtmlManager.getTemplate("types/attribute_detail_row_template.html");
for (final NormalColumn normalColumn : normalColumnList) {
String type = null;
if (normalColumn.getType() != null) {
type = Format.formatType(normalColumn.getType(), normalColumn.getTypeData(), diagram.getDatabase(), true);
} else {
type = "";
}
final Object[] args = {getObjectId(normalColumn), getPKString(normalColumn), getForeignKeyString(normalColumn), Format.null2blank(normalColumn.getLogicalName()), Format.null2blank(normalColumn.getPhysicalName()), Format.null2blank(normalColumn.getDescription()), String.valueOf(normalColumn.isUniqueKey()).toUpperCase(), String.valueOf(normalColumn.isNotNull()).toUpperCase(), type, String.valueOf(normalColumn.isAutoIncrement()).toUpperCase(), Format.null2blank(normalColumn.getDefaultValue()), Format.null2blank(normalColumn.getConstraint())};
final String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例4: initTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
private void initTable() {
this.editColumnTable.setVisible(false);
this.editColumnTable.removeData();
for (NormalColumn normalColumn : this.table.getExpandedColumns()) {
String name = normalColumn.getName();
String type = null;
if (normalColumn.getType() == null) {
type = "";
} else {
type = Format.formatType(normalColumn.getType(), normalColumn
.getTypeData(), this.dialog.getDiagram().getDatabase(),
true);
}
this.editColumnTable.addColumnHeader(name + "\r\n" + type, 100);
}
this.initTableData();
this.editColumnTable.setVisible(true);
}
示例5: initTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
private void initTable() {
editColumnTable.setVisible(false);
editColumnTable.removeData();
for (final NormalColumn normalColumn : table.getExpandedColumns()) {
final String name = normalColumn.getName();
String type = null;
if (normalColumn.getType() == null) {
type = "";
} else {
type = Format.formatType(normalColumn.getType(), normalColumn.getTypeData(), dialog.getDiagram().getDatabase(), true);
}
editColumnTable.addColumnHeader(name + "\r\n" + type, 100);
}
for (final Map<NormalColumn, String> data : directTestData.getDataList()) {
addTableItem(data);
}
addNewRowToTable();
editColumnTable.setVisible(true);
}
示例6: getContentArgs
import org.insightech.er.util.Format; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public String[] getContentArgs(final ERDiagram diagram, final Object object) throws IOException {
final Word word = (Word) object;
final String logicalName = word.getLogicalName();
final String physicalName = word.getPhysicalName();
String type = "";
if (word.getType() != null) {
type = Format.formatType(word.getType(), word.getTypeData(), diagram.getDatabase(), true);
}
final String description = word.getDescription();
final List<TableView> usedTableList = new ArrayList<TableView>();
final List<NormalColumn> normalColumnList = diagram.getDiagramContents().getDictionary().getColumnList(word);
for (final NormalColumn normalColumn : normalColumnList) {
final ColumnHolder columnHolder = normalColumn.getColumnHolder();
if (columnHolder instanceof TableView) {
usedTableList.add((TableView) columnHolder);
} else {
final ColumnGroup columnGroup = (ColumnGroup) columnHolder;
usedTableList.addAll(columnGroup.getUsedTalbeList(diagram));
}
}
final String usedTableTable = generateUsedTableTable(usedTableList);
return new String[] {logicalName, physicalName, type, description, usedTableTable};
}
示例7: initTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
private void initTable() {
this.editColumnTable.setVisible(false);
this.editColumnTable.removeData();
for (NormalColumn normalColumn : this.table.getExpandedColumns()) {
String name = normalColumn.getName();
String type = null;
if (normalColumn.getType() == null) {
type = "";
} else {
type = Format.formatType(normalColumn.getType(), normalColumn
.getTypeData(), this.dialog.getDiagram().getDatabase(),
true);
}
this.editColumnTable.addColumnHeader(name + "\r\n" + type, 100);
}
for (Map<NormalColumn, String> data : directTestData.getDataList()) {
this.addTableItem(data);
}
this.addNewRowToTable();
this.editColumnTable.setVisible(true);
}
示例8: generateAttributeTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
protected String generateAttributeTable(ERDiagram diagram,
List<NormalColumn> normalColumnList) throws IOException {
StringBuilder sb = new StringBuilder();
String template = ExportToHtmlManager
.getTemplate("types/attribute_row_template.html");
for (NormalColumn normalColumn : normalColumnList) {
String type = null;
if (normalColumn.getType() != null) {
type = Format
.formatType(normalColumn.getType(),
normalColumn.getTypeData(),
diagram.getDatabase(), true);
} else {
type = "";
}
Object[] args = { this.getObjectId(normalColumn),
this.getPKString(normalColumn),
this.getForeignKeyString(normalColumn),
Format.null2blank(normalColumn.getLogicalName()),
Format.null2blank(normalColumn.getPhysicalName()), type,
this.getUniqueString(normalColumn),
this.getNotNullString(normalColumn) };
String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例9: generateAttributeDetailTable
import org.insightech.er.util.Format; //导入方法依赖的package包/类
public String generateAttributeDetailTable(ERDiagram diagram,
List<NormalColumn> normalColumnList) throws IOException {
StringBuilder sb = new StringBuilder();
String template = ExportToHtmlManager
.getTemplate("types/attribute_detail_row_template.html");
for (NormalColumn normalColumn : normalColumnList) {
String type = null;
if (normalColumn.getType() != null) {
type = Format
.formatType(normalColumn.getType(),
normalColumn.getTypeData(),
diagram.getDatabase(), true);
} else {
type = "";
}
Object[] args = {
this.getObjectId(normalColumn),
this.getPKString(normalColumn),
this.getForeignKeyString(normalColumn),
Format.null2blank(normalColumn.getLogicalName()),
Format.null2blank(normalColumn.getPhysicalName()),
Format.null2blank(normalColumn.getDescription()),
String.valueOf(normalColumn.isUniqueKey()).toUpperCase(),
String.valueOf(normalColumn.isNotNull()).toUpperCase(),
type,
String.valueOf(normalColumn.isAutoIncrement())
.toUpperCase(),
Format.null2blank(normalColumn.getDefaultValue()),
Format.null2blank(normalColumn.getConstraint()) };
String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例10: getContentArgs
import org.insightech.er.util.Format; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public String[] getContentArgs(ERDiagram diagram, Object object)
throws IOException {
Word word = (Word) object;
String logicalName = word.getLogicalName();
String physicalName = word.getPhysicalName();
String type = "";
if (word.getType() != null) {
type = Format.formatType(word.getType(), word.getTypeData(),
diagram.getDatabase(), true);
}
String description = word.getDescription();
List<TableView> usedTableList = new ArrayList<TableView>();
List<NormalColumn> normalColumnList = diagram.getDiagramContents()
.getDictionary().getColumnList(word);
for (NormalColumn normalColumn : normalColumnList) {
ColumnHolder columnHolder = normalColumn.getColumnHolder();
if (columnHolder instanceof TableView) {
usedTableList.add((TableView) columnHolder);
} else {
ColumnGroup columnGroup = (ColumnGroup) columnHolder;
usedTableList.addAll(columnGroup.getUsedTalbeList(diagram));
}
}
String usedTableTable = this.generateUsedTableTable(usedTableList);
return new String[] { logicalName, physicalName, type, description,
usedTableTable };
}