本文整理汇总了Java中org.insightech.er.util.Format类的典型用法代码示例。如果您正苦于以下问题:Java Format类的具体用法?Java Format怎么用?Java Format使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Format类属于org.insightech.er.util包,在下文中一共展示了Format类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createHeader
import org.insightech.er.util.Format; //导入依赖的package包/类
private void createHeader(Composite parent) {
Composite header = new Composite(parent, SWT.NONE);
GridLayout gridLayout = new GridLayout(4, false);
gridLayout.horizontalSpacing = 20;
header.setLayout(gridLayout);
this.physicalNameText = CompositeFactory.createText(tableViewDialog,
header, "label.physical.name", 1, 200, false, false);
this.logicalNameText = CompositeFactory.createText(tableViewDialog,
header, "label.logical.name", 1, 200, true, false);
this.physicalNameText.setText(Format.null2blank(copyData
.getPhysicalName()));
this.logicalNameText.setText(Format.null2blank(copyData
.getLogicalName()));
this.oldPhysicalName = this.physicalNameText.getText();
}
示例2: 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);
}
示例3: loadExportJavaSetting
import org.insightech.er.util.Format; //导入依赖的package包/类
private void loadExportJavaSetting(ExportJavaSetting exportJavaSetting,
Element parent, LoadContext context) {
Element element = this.getElement(parent, "export_java_setting");
if (element != null) {
exportJavaSetting.setJavaOutput(this.getStringValue(element,
"java_output"));
exportJavaSetting.setPackageName(Format.null2blank(this
.getStringValue(element, "package_name")));
exportJavaSetting.setClassNameSuffix(Format.null2blank(this
.getStringValue(element, "class_name_suffix")));
exportJavaSetting.setSrcFileEncoding(this.getStringValue(element,
"src_file_encoding"));
exportJavaSetting.setWithHibernate(this.getBooleanValue(element,
"with_hibernate", false));
}
}
示例4: generateUsedTableTable
import org.insightech.er.util.Format; //导入依赖的package包/类
public String generateUsedTableTable(List<TableView> tableList)
throws IOException {
StringBuilder sb = new StringBuilder();
String template = ExportToHtmlManager
.getTemplate("types/use_table_row_template.html");
for (TableView table : tableList) {
Object[] args = { this.getObjectId(table), table.getObjectType(),
Format.null2blank(table.getPhysicalName()),
Format.null2blank(table.getLogicalName()) };
String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例5: generateValueTable
import org.insightech.er.util.Format; //导入依赖的package包/类
private String generateValueTable(TablespaceProperties properties)
throws IOException {
StringBuilder sb = new StringBuilder();
String template = ExportToHtmlManager
.getTemplate("types/value_row_template.html");
for (Map.Entry<String, String> entry : properties.getPropertiesMap()
.entrySet()) {
Object[] args = { ResourceString.getResourceString(entry.getKey()),
Format.null2blank(entry.getValue()) };
String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例6: setData
import org.insightech.er.util.Format; //导入依赖的package包/类
@Override
protected void setData() {
this.dbSettingList = PreferenceInitializer
.getDBSettingList(this.database);
for (DBSetting dbSetting : this.dbSettingList) {
TableItem item = new TableItem(this.settingTable, SWT.NONE);
item.setText(0, dbSetting.getDbsystem());
item.setText(1, dbSetting.getServer());
if (dbSetting.getPort() != 0) {
item.setText(2, String.valueOf(dbSetting.getPort()));
}
item.setText(3, dbSetting.getDatabase());
item.setText(4, dbSetting.getUser());
item.setText(5, Format.null2blank(dbSetting.getUrl()));
}
this.setButtonEnabled(false);
}
示例7: addJDBCDriver
import org.insightech.er.util.Format; //导入依赖的package包/类
public static void addJDBCDriver(String db, String className, String path) {
IPreferenceStore store = ERDiagramActivator.getDefault()
.getPreferenceStore();
int listSize = store
.getInt(PreferenceInitializer.JDBC_DRIVER_CLASS_NAME_LIST_NUM);
store.setValue(PreferenceInitializer.JDBC_DRIVER_DB_NAME_PREFIX
+ listSize, Format.null2blank(db));
store.setValue(PreferenceInitializer.JDBC_DRIVER_CLASS_NAME_PREFIX
+ listSize, Format.null2blank(className));
store.setValue(
PreferenceInitializer.JDBC_DRIVER_PATH_PREFIX + listSize,
Format.null2blank(path));
store.setValue(PreferenceInitializer.JDBC_DRIVER_CLASS_NAME_LIST_NUM,
listSize + 1);
}
示例8: restruct
import org.insightech.er.util.Format; //导入依赖的package包/类
@Override
public void restruct() {
columnTable.removeAll();
disposeTableEditor();
for (final NormalColumn normalColumn : copyData.getNormalColumns()) {
final TableItem tableItem = new TableItem(columnTable, SWT.NONE);
final TableEditor tableEditor = CompositeFactory.createCheckBoxTableEditor(tableItem, false, 0);
tableEditorList.add(tableEditor);
editorColumnMap.put(tableEditor, normalColumn);
tableItem.setText(1, Format.null2blank(normalColumn.getName()));
}
setComboData();
setButtonStatus(false);
nameText.setText("");
columnTable.getColumns()[1].pack();
}
示例9: initNodeTable
import org.insightech.er.util.Format; //导入依赖的package包/类
private void initNodeTable() {
nodeTable.removeAll();
nodeCheckMap = new HashMap<NodeElement, TableEditor>();
for (final NodeElement nodeElement : diagram.getDiagramContents().getContents()) {
final TableItem tableItem = new TableItem(nodeTable, SWT.NONE);
final Button selectCheckButton = new Button(nodeTable, SWT.CHECK);
selectCheckButton.pack();
final TableEditor editor = new TableEditor(nodeTable);
editor.minimumWidth = selectCheckButton.getSize().x;
editor.horizontalAlignment = SWT.CENTER;
editor.setEditor(selectCheckButton, tableItem, 0);
tableItem.setText(1, ResourceString.getResourceString("label.object.type." + nodeElement.getObjectType()));
tableItem.setText(2, Format.null2blank(nodeElement.getName()));
nodeCheckMap.put(nodeElement, editor);
}
}
示例10: generateEnvironmentTable
import org.insightech.er.util.Format; //导入依赖的package包/类
private String generateEnvironmentTable(ERDiagram diagram,
Tablespace tablespace) throws IOException {
StringBuilder sb = new StringBuilder();
String template = ExportToHtmlManager
.getTemplate("types/environment_row_template.html");
for (Environment environment : diagram.getDiagramContents()
.getSettings().getEnvironmentSetting().getEnvironments()) {
TablespaceProperties properties = tablespace.getPropertiesMap()
.get(environment);
if (properties == null) {
continue;
}
Object[] args = { Format.null2blank(environment.getName()),
this.generateValueTable(properties) };
String row = MessageFormat.format(template, args);
sb.append(row);
}
return sb.toString();
}
示例11: setData
import org.insightech.er.util.Format; //导入依赖的package包/类
@Override
protected void setData() {
if (this.sequence != null) {
this.incrementText.setText(Format.toString(this.sequence
.getIncrement()));
if (minValueText != null) {
this.minValueText.setText(Format.toString(this.sequence
.getMinValue()));
}
if (maxValueText != null) {
this.maxValueText.setText(Format.toString(this.sequence
.getMaxValue()));
}
this.startText.setText(Format.toString(this.sequence.getStart()));
if (maxValueText != null) {
this.cacheText
.setText(Format.toString(this.sequence.getCache()));
}
if (cycleCheckBox != null) {
this.cycleCheckBox.setSelection(this.sequence.isCycle());
}
}
}
示例12: decorateRelation
import org.insightech.er.util.Format; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
// @Override
// public void refreshVisuals() {
// super.refreshVisuals();
//
// }
@Override
protected void decorateRelation() {
final ERDiagram diagram = getDiagram();
if (diagram != null) {
final Relation relation = (Relation) getModel();
final PolylineConnection connection = (PolylineConnection) getConnectionFigure();
final String notation = diagram.getDiagramContents().getSettings().getNotation();
final Decoration decoration = DecorationFactory.getDecoration(notation, relation.getParentCardinality(), relation.getChildCardinality());
connection.setSourceDecoration(decoration.getSourceDecoration());
connection.setTargetDecoration(decoration.getTargetDecoration());
targetLabel.setText(Format.null2blank(decoration.getTargetLabel()));
}
}
示例13: addColumnFigure
import org.insightech.er.util.Format; //导入依赖的package包/类
public static void addColumnFigure(final ERDiagram diagram, final TableFigure tableFigure, final NormalColumnFigure columnFigure, final NormalColumn normalColumn, final boolean isSelectedReferenced, final boolean isSelectedForeignKey, final boolean isAdded, final boolean isUpdated, final boolean isRemoved) {
final int notationLevel = diagram.getDiagramContents().getSettings().getNotationLevel();
final String type = diagram.filter(Format.formatType(normalColumn.getType(), normalColumn.getTypeData(), diagram.getDatabase(), true));
boolean displayKey = true;
if (notationLevel == Settings.NOTATION_LEVLE_COLUMN) {
displayKey = false;
}
boolean displayDetail = false;
if (notationLevel == Settings.NOTATION_LEVLE_KEY || notationLevel == Settings.NOTATION_LEVLE_EXCLUDE_TYPE || notationLevel == Settings.NOTATION_LEVLE_DETAIL) {
displayDetail = true;
}
boolean displayType = false;
if (notationLevel == Settings.NOTATION_LEVLE_DETAIL) {
displayType = true;
}
tableFigure.addColumn(columnFigure, diagram.getDiagramContents().getSettings().getViewMode(), diagram.filter(normalColumn.getPhysicalName()), diagram.filter(normalColumn.getLogicalName()), type, normalColumn.isPrimaryKey(), normalColumn.isForeignKey(), normalColumn.isNotNull(), normalColumn.isUniqueKey(), displayKey, displayDetail, displayType, isSelectedReferenced, isSelectedForeignKey, isAdded, isUpdated, isRemoved);
}
示例14: compare
import org.insightech.er.util.Format; //导入依赖的package包/类
@Override
public int compare(final Word o1, final Word o2) {
if (o1 == o2) {
return 0;
}
if (o2 == null) {
return -1;
}
if (o1 == null) {
return 1;
}
int value = 0;
value = Format.null2blank(o1.physicalName).toUpperCase().compareTo(Format.null2blank(o2.physicalName).toUpperCase());
if (value != 0) {
return value;
}
value = Format.null2blank(o1.logicalName).toUpperCase().compareTo(Format.null2blank(o2.logicalName).toUpperCase());
if (value != 0) {
return value;
}
return WITHOUT_NAME_COMPARATOR.compare(o1, o2);
}
示例15: add
import org.insightech.er.util.Format; //导入依赖的package包/类
public void add(final DBObject dbObject) {
if (DBObject.TYPE_TABLESPACE.equals(dbObject.getType())) {
tablespaceList.add(dbObject);
} else if (DBObject.TYPE_NOTE.equals(dbObject.getType())) {
noteList.add(dbObject);
} else if (DBObject.TYPE_GROUP.equals(dbObject.getType())) {
groupList.add(dbObject);
} else {
final String schema = Format.null2blank(dbObject.getSchema());
List<DBObject> dbObjectList = schemaDbObjectListMap.get(schema);
if (dbObjectList == null) {
dbObjectList = new ArrayList<DBObject>();
schemaDbObjectListMap.put(schema, dbObjectList);
}
dbObjectList.add(dbObject);
}
}