本文整理汇总了Java中org.insightech.er.editor.model.settings.Settings类的典型用法代码示例。如果您正苦于以下问题:Java Settings类的具体用法?Java Settings怎么用?Java Settings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Settings类属于org.insightech.er.editor.model.settings包,在下文中一共展示了Settings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setData
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void setData() {
final Settings settings = diagram.getDiagramContents().getSettings();
final ExportJavaSetting exportSetting = settings.getExportSetting().getExportJavaSetting();
final String outputPath = exportSetting.getJavaOutput();
outputDirText.setText(FileUtils.getRelativeFilePath(getBaseDir(), outputPath));
packageText.setText(Format.null2blank(exportSetting.getPackageName()));
classNameSuffixText.setText(Format.null2blank(exportSetting.getClassNameSuffix()));
if (!Check.isEmpty(exportSetting.getSrcFileEncoding())) {
fileEncodingCombo.setText(exportSetting.getSrcFileEncoding());
}
withHibernateButton.setSelection(exportSetting.isWithHibernate());
}
示例2: createSetPropertyCommand
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
@Override
protected Command createSetPropertyCommand(final Object id, final Object value) {
if (id.equals("database")) {
final MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
messageBox.setText(ResourceString.getResourceString("dialog.title.change.database"));
messageBox.setMessage(ResourceString.getResourceString("dialog.message.change.database"));
if (messageBox.open() == SWT.OK) {
final List<String> dbList = DBManagerFactory.getAllDBList();
final int index = Integer.parseInt(String.valueOf(value));
final Settings settings = diagram.getDiagramContents().getSettings().clone();
settings.setDatabase(dbList.get(index));
final ChangeSettingsCommand command = new ChangeSettingsCommand(diagram, settings, true);
return command;
}
}
return null;
}
示例3: doExecute
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void doExecute() {
Settings settings = diagram.getDiagramContents().getSettings();
this.oldSettings = settings.clone();
this.connection.setSource(this.getSourceModel());
this.connection.setTarget(this.getTargetModel());
for (Category category : settings.getCategorySetting().getAllCategories()) {
connection.removeCategory(category);
connection.addCategory(category);
}
this.getTargetModel().refreshTargetConnections();
this.getSourceModel().refreshSourceConnections();
}
示例4: getModelChildren
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected List getModelChildren() {
final Dictionary dictionary = (Dictionary) getModel();
final List<Word> list = dictionary.getWordList();
if (getDiagram().getDiagramContents().getSettings().getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
Collections.sort(list, Word.LOGICAL_NAME_COMPARATOR);
} else {
Collections.sort(list, Word.PHYSICAL_NAME_COMPARATOR);
}
return list;
}
示例5: getModelChildren
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected List getModelChildren() {
final ViewSet viewSet = (ViewSet) getModel();
final List<View> list = viewSet.getList();
if (getDiagram().getDiagramContents().getSettings().getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
Collections.sort(list, TableView.LOGICAL_NAME_COMPARATOR);
} else {
Collections.sort(list, TableView.PHYSICAL_NAME_COMPARATOR);
}
return list;
}
示例6: getModelChildren
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected List getModelChildren() {
final TableSet tableSet = (TableSet) getModel();
final List<ERTable> list = new ArrayList<ERTable>();
final Category category = getCurrentCategory();
for (final ERTable table : tableSet) {
if (category == null || category.contains(table)) {
list.add(table);
}
}
if (getDiagram().getDiagramContents().getSettings().getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
Collections.sort(list, TableView.LOGICAL_NAME_COMPARATOR);
} else {
Collections.sort(list, TableView.PHYSICAL_NAME_COMPARATOR);
}
return list;
}
示例7: getTableViewName
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
public static String getTableViewName(TableView tableView, ERDiagram diagram) {
String name = null;
int viewMode = diagram.getDiagramContents().getSettings().getViewMode();
if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
name = diagram.filter(tableView.getPhysicalName());
} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
name = diagram.filter(tableView.getLogicalName());
} else {
name = diagram.filter(tableView.getLogicalName()) + "/"
+ diagram.filter(tableView.getPhysicalName());
}
return name;
}
示例8: getTableViewName
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
public static String getTableViewName(final TableView tableView, final ERDiagram diagram) {
String name = null;
final int viewMode = diagram.getDiagramContents().getSettings().getViewMode();
if (viewMode == Settings.VIEW_MODE_PHYSICAL) {
name = diagram.filter(tableView.getPhysicalName());
} else if (viewMode == Settings.VIEW_MODE_LOGICAL) {
name = diagram.filter(tableView.getLogicalName());
} else {
name = diagram.filter(tableView.getLogicalName()) + "/" + diagram.filter(tableView.getPhysicalName());
}
return name;
}
示例9: addColumnFigure
import org.insightech.er.editor.model.settings.Settings; //导入依赖的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);
}
示例10: copy
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
public DiagramContents copy(final DiagramContents originalDiagramContents) {
final DiagramContents copyDiagramContents = new DiagramContents();
copyDiagramContents.setContents(copyNodeElementList(originalDiagramContents.getContents()));
final Map<NodeElement, NodeElement> nodeElementMap = getNodeElementMap();
final Settings settings = originalDiagramContents.getSettings().clone();
setSettings(nodeElementMap, settings);
copyDiagramContents.setSettings(settings);
setColumnGroup(copyDiagramContents, originalDiagramContents);
copyDiagramContents.setSequenceSet(originalDiagramContents.getSequenceSet().clone());
copyDiagramContents.setTriggerSet(originalDiagramContents.getTriggerSet().clone());
setWord(copyDiagramContents, originalDiagramContents);
setTablespace(copyDiagramContents, originalDiagramContents);
return copyDiagramContents;
}
示例11: setData
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void setData() {
Settings settings = this.diagram.getDiagramContents().getSettings();
ExportJavaSetting exportSetting = settings.getExportSetting()
.getExportJavaSetting();
String outputPath = exportSetting.getJavaOutput();
this.outputDirText.setText(FileUtils.getRelativeFilePath(
this.getBaseDir(), outputPath));
this.packageText.setText(Format.null2blank(exportSetting
.getPackageName()));
this.classNameSuffixText.setText(Format.null2blank(exportSetting
.getClassNameSuffix()));
if (!Check.isEmpty(exportSetting.getSrcFileEncoding())) {
this.fileEncodingCombo.setText(exportSetting.getSrcFileEncoding());
}
this.withHibernateButton.setSelection(exportSetting.isWithHibernate());
}
示例12: execute
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void execute(Event event) {
ERDiagram diagram = this.getDiagram();
Settings settings = (Settings) diagram.getDiagramContents()
.getSettings().clone();
OptionSettingDialog dialog = new OptionSettingDialog(PlatformUI
.getWorkbench().getActiveWorkbenchWindow().getShell(),
settings, diagram);
if (dialog.open() == IDialogConstants.OK_ID) {
ChangeSettingsCommand command = new ChangeSettingsCommand(diagram,
settings, true);
this.execute(command);
}
}
示例13: doExecute
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void doExecute() {
// ERDiagramEditPart.setUpdateable(false);
Settings settings = ((TableView) source.getModel()).getDiagram().getDiagramContents().getSettings();
this.oldSettings = settings.clone();
this.relation.setSource((TableView) source.getModel());
for (Category category : settings.getCategorySetting().getAllCategories()) {
this.relation.removeCategory(category);
this.relation.addCategory(category);
}
// ERDiagramEditPart.setUpdateable(true);
this.relation.setTargetTableView((TableView) target.getModel(),
this.foreignKeyColumnList);
this.getTargetModel().refresh();
this.getSourceModel().refreshSourceConnections();
}
示例14: getModelChildren
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected List getModelChildren() {
Dictionary dictionary = (Dictionary) this.getModel();
List<Word> list = dictionary.getWordList();
if (this.getDiagram().getDiagramContents().getSettings()
.getViewOrderBy() == Settings.VIEW_MODE_LOGICAL) {
Collections.sort(list, Word.LOGICAL_NAME_COMPARATOR);
} else {
Collections.sort(list, Word.PHYSICAL_NAME_COMPARATOR);
}
return list;
}
示例15: copy
import org.insightech.er.editor.model.settings.Settings; //导入依赖的package包/类
public DiagramContents copy(DiagramContents originalDiagramContents) {
DiagramContents copyDiagramContents = new DiagramContents();
copyDiagramContents.setContents(this
.copyNodeElementList(originalDiagramContents.getContents()));
Map<NodeElement, NodeElement> nodeElementMap = this.getNodeElementMap();
Settings settings = (Settings) originalDiagramContents.getSettings()
.clone();
this.setSettings(nodeElementMap, settings);
copyDiagramContents.setSettings(settings);
this.setColumnGroup(copyDiagramContents, originalDiagramContents);
copyDiagramContents.setSequenceSet(originalDiagramContents
.getSequenceSet().clone());
copyDiagramContents.setTriggerSet(originalDiagramContents
.getTriggerSet().clone());
this.setWord(copyDiagramContents, originalDiagramContents);
this.setTablespace(copyDiagramContents, originalDiagramContents);
return copyDiagramContents;
}