本文整理汇总了Java中org.insightech.er.editor.TranslationResources类的典型用法代码示例。如果您正苦于以下问题:Java TranslationResources类的具体用法?Java TranslationResources怎么用?Java TranslationResources使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TranslationResources类属于org.insightech.er.editor包,在下文中一共展示了TranslationResources类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.insightech.er.editor.TranslationResources; //导入依赖的package包/类
@Override
public void init(final Connection con, final DBSetting dbSetting, final ERDiagram diagram, final List<DBObject> dbObjectList, final boolean useCommentAsLogicalName, final boolean mergeWord) throws SQLException {
this.con = con;
this.dbSetting = dbSetting;
this.diagram = diagram;
this.dbObjectList = dbObjectList;
this.useCommentAsLogicalName = useCommentAsLogicalName;
this.mergeWord = mergeWord;
metaData = con.getMetaData();
translationResources = new TranslationResources(diagram.getDiagramContents().getSettings().getTranslationSetting());
if (this.mergeWord) {
dictionary.init(this.diagram);
}
}
示例2: init
import org.insightech.er.editor.TranslationResources; //导入依赖的package包/类
public void init(Connection con, DBSetting dbSetting, ERDiagram diagram,
List<DBObject> dbObjectList, boolean useCommentAsLogicalName,
boolean mergeWord) throws SQLException {
this.con = con;
this.dbSetting = dbSetting;
this.diagram = diagram;
this.dbObjectList = dbObjectList;
this.useCommentAsLogicalName = useCommentAsLogicalName;
this.mergeWord = mergeWord;
this.metaData = con.getMetaData();
this.translationResources = new TranslationResources(diagram
.getDiagramContents().getSettings().getTranslationSetting());
if (this.mergeWord) {
this.dictionary.init(this.diagram);
}
}
示例3: setData
import org.insightech.er.editor.TranslationResources; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void setData() {
final DiagramContents diagramContents = diagram.getDiagramContents();
final TranslationResources resources = new TranslationResources(diagramContents.getSettings().getTranslationSetting());
final Map<String, String> newDictionary = new TreeMap<String, String>();
for (final TableView tableView : diagramContents.getContents().getTableViewList()) {
String physicalName = tableView.getPhysicalName();
String logicalName = tableView.getLogicalName();
addNewWord(physicalName, logicalName, resources, newDictionary);
for (final NormalColumn normalColumn : tableView.getExpandedColumns()) {
physicalName = normalColumn.getPhysicalName();
logicalName = normalColumn.getLogicalName();
addNewWord(physicalName, logicalName, resources, newDictionary);
}
}
for (final Map.Entry<String, String> entry : newDictionary.entrySet()) {
final TableItem tableItem = new TableItem(dictionaryTable, SWT.NONE);
tableItem.setText(0, entry.getKey());
tableItem.setText(1, entry.getValue());
}
}
示例4: addNewWord
import org.insightech.er.editor.TranslationResources; //导入依赖的package包/类
private void addNewWord(String physicalName, String logicalName, final TranslationResources resources, final Map<String, String> newDictionary) {
physicalName = physicalName.toLowerCase();
logicalName = logicalName.toLowerCase();
if (!Check.isEmpty(physicalName) && !Check.isEmpty(logicalName) && !resources.contains(physicalName) && !newDictionary.containsKey(physicalName)) {
newDictionary.put(physicalName, logicalName);
}
}
示例5: setData
import org.insightech.er.editor.TranslationResources; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void setData() {
DiagramContents diagramContents = this.diagram.getDiagramContents();
TranslationResources resources = new TranslationResources(
diagramContents.getSettings().getTranslationSetting());
Map<String, String> newDictionary = new TreeMap<String, String>();
for (TableView tableView : diagramContents.getContents()
.getTableViewList()) {
String physicalName = tableView.getPhysicalName();
String logicalName = tableView.getLogicalName();
this.addNewWord(physicalName, logicalName, resources, newDictionary);
for (NormalColumn normalColumn : tableView.getExpandedColumns()) {
physicalName = normalColumn.getPhysicalName();
logicalName = normalColumn.getLogicalName();
this.addNewWord(physicalName, logicalName, resources,
newDictionary);
}
}
for (Map.Entry<String, String> entry : newDictionary.entrySet()) {
TableItem tableItem = new TableItem(this.dictionaryTable, SWT.NONE);
tableItem.setText(0, entry.getKey());
tableItem.setText(1, entry.getValue());
}
}
示例6: addNewWord
import org.insightech.er.editor.TranslationResources; //导入依赖的package包/类
private void addNewWord(String physicalName, String logicalName,
TranslationResources resources, Map<String, String> newDictionary) {
physicalName = physicalName.toLowerCase();
logicalName = logicalName.toLowerCase();
if (!Check.isEmpty(physicalName) && !Check.isEmpty(logicalName)
&& !resources.contains(physicalName)
&& !newDictionary.containsKey(physicalName)) {
newDictionary.put(physicalName, logicalName);
}
}