当前位置: 首页>>代码示例>>Java>>正文


Java Format类代码示例

本文整理汇总了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();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:AbstractAttributeTabWrapper.java

示例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);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:26,代码来源:RepeatTestDataTabWrapper.java

示例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));
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:18,代码来源:XMLLoader.java

示例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();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:19,代码来源:AbstractHtmlReportPageGenerator.java

示例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();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:19,代码来源:TablespaceHtmlReportPageGenerator.java

示例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);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:DBSettingListDialog.java

示例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);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:19,代码来源:PreferenceInitializer.java

示例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();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:ComplexUniqueKeyTabWrapper.java

示例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);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:24,代码来源:CategoryManageDialog.java

示例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();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:25,代码来源:TablespaceHtmlReportPageGenerator.java

示例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());
		}
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:24,代码来源:AutoIncrementSettingDialog.java

示例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()));
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:29,代码来源:RelationEditPart.java

示例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);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:NormalColumnEditPart.java

示例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);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:27,代码来源:Word.java

示例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);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:22,代码来源:DBObjectSet.java


注:本文中的org.insightech.er.util.Format类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。