本文整理汇总了Java中org.esa.snap.ui.AppContext.getApplicationWindow方法的典型用法代码示例。如果您正苦于以下问题:Java AppContext.getApplicationWindow方法的具体用法?Java AppContext.getApplicationWindow怎么用?Java AppContext.getApplicationWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.esa.snap.ui.AppContext
的用法示例。
在下文中一共展示了AppContext.getApplicationWindow方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BatchGraphDialog
import org.esa.snap.ui.AppContext; //导入方法依赖的package包/类
public BatchGraphDialog(final AppContext theAppContext, final String title, final String helpID,
final boolean closeOnDone) {
super(theAppContext.getApplicationWindow(), title, ID_YES | ID_APPLY_CLOSE_HELP, helpID);
this.appContext = theAppContext;
this.baseTitle = title;
this.closeOnDone = closeOnDone;
openProcessedProducts = true;
setContent(createUI());
if (getJDialog().getJMenuBar() == null) {
final GraphsMenu operatorMenu = new GraphsMenu(getJDialog(), this);
getJDialog().setJMenuBar(operatorMenu.createDefaultMenu());
}
super.getJDialog().setMinimumSize(new Dimension(400, 300));
}
示例2: GraphBuilderDialog
import org.esa.snap.ui.AppContext; //导入方法依赖的package包/类
public GraphBuilderDialog(final AppContext theAppContext, final String title, final String helpID, final boolean allowGraphBuilding) {
super(theAppContext.getApplicationWindow(), title, 0, helpID);
this.allowGraphBuilding = allowGraphBuilding;
appContext = theAppContext;
graphEx = new GraphExecuter();
graphEx.addObserver(this);
String lastDir = SnapApp.getDefault().getPreferences().get(LAST_GRAPH_PATH,
ResourceUtils.getGraphFolder("").toFile().getAbsolutePath());
if (new File(lastDir).exists()) {
SnapApp.getDefault().getPreferences().put(LAST_GRAPH_PATH, lastDir);
}
initUI();
}
示例3: SingleTargetProductDialog
import org.esa.snap.ui.AppContext; //导入方法依赖的package包/类
protected SingleTargetProductDialog(AppContext appContext, String title, int buttonMask, String helpID, TargetProductSelectorModel model, boolean alwaysWriteOutput) {
super(appContext.getApplicationWindow(), title, buttonMask, helpID);
this.appContext = appContext;
targetProductSelector = new TargetProductSelector(model, alwaysWriteOutput);
String homeDirPath = SystemUtils.getUserHomeDir().getPath();
String saveDir = appContext.getPreferences().getPropertyString(SaveProductAsAction.PREFERENCES_KEY_LAST_PRODUCT_DIR, homeDirPath);
targetProductSelector.getModel().setProductDir(new File(saveDir));
if (!alwaysWriteOutput) {
targetProductSelector.getOpenInAppCheckBox().setText("Open in " + appContext.getApplicationName());
}
targetProductSelector.getModel().getValueContainer().addPropertyChangeListener(evt -> {
if (evt.getPropertyName().equals("saveToFileSelected") ||
evt.getPropertyName().equals("openInAppSelected")) {
updateRunButton();
}
});
AbstractButton button = getButton(ID_APPLY);
button.setText("Run");
button.setMnemonic('R');
updateRunButton();
}
示例4: ToolParameterEditorDialog
import org.esa.snap.ui.AppContext; //导入方法依赖的package包/类
public ToolParameterEditorDialog(AppContext appContext, ToolAdapterOperatorDescriptor operator, ToolParameterDescriptor inputParameter) {
super(appContext.getApplicationWindow(), inputParameter.getName(), ID_OK_CANCEL, helpID);
this.operator = operator;
this.oldParameter = inputParameter;
this.parameter = new ToolParameterDescriptor(inputParameter);
this.parameter.setDeprecated(inputParameter.isDeprecated()); // copy the value
this.container = PropertyContainer.createObjectBacked(this.parameter);
this.valuesContext = new BindingContext(this.container);
addComponents();
EscapeAction.register(getJDialog());
}
示例5: ModuleSuiteDialog
import org.esa.snap.ui.AppContext; //导入方法依赖的package包/类
ModuleSuiteDialog(AppContext appContext, String title, String helpID, Set<ToolAdapterOperatorDescriptor> selection) {
super(appContext.getApplicationWindow(), title, ID_OK | ID_CANCEL, helpID);
this.descriptor = new ModuleSuiteDescriptor();
this.descriptor.setAuthors(System.getProperty("user.name"));
this.descriptor.setName("NewBundle");
this.descriptor.setVersion("1");
this.descriptor.setCopyright("(C)" + String.valueOf(YEAR) + " " + this.descriptor.getAuthors());
this.bundles = new HashMap<>();
this.bundles.put(OSFamily.windows,
new org.esa.snap.core.gpf.descriptor.dependency.Bundle(
new ToolAdapterOperatorDescriptor("bundle", ToolAdapterOp.class),
BundleType.ZIP,
SystemUtils.getAuxDataPath().toString()) {{
setOS(OSFamily.windows);
}});
this.bundles.put(OSFamily.linux,
new org.esa.snap.core.gpf.descriptor.dependency.Bundle(
new ToolAdapterOperatorDescriptor("bundle", ToolAdapterOp.class),
BundleType.ZIP,
SystemUtils.getAuxDataPath().toString()) {{
setOS(OSFamily.linux);
}});
this.bundles.put(OSFamily.macosx,
new org.esa.snap.core.gpf.descriptor.dependency.Bundle(
new ToolAdapterOperatorDescriptor("bundle", ToolAdapterOp.class),
BundleType.ZIP,
SystemUtils.getAuxDataPath().toString()) {{
setOS(OSFamily.macosx);
}});
this.initialSelection = new HashSet<>();
this.commonVariables = new HashMap<>();
if (selection != null) {
this.initialSelection.addAll(selection);
this.initialSelection.forEach(d -> {
for (SystemVariable variable : d.getVariables()) {
this.commonVariables.put(variable.getKey(), variable);
}
});
}
JPanel contentPanel = createContentPanel();
setContent(contentPanel);
super.getJDialog().setMinimumSize(contentPanel.getPreferredSize());
EscapeAction.register(super.getJDialog());
}