本文整理汇总了Java中com.bc.ceres.swing.binding.PropertyPane类的典型用法代码示例。如果您正苦于以下问题:Java PropertyPane类的具体用法?Java PropertyPane怎么用?Java PropertyPane使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PropertyPane类属于com.bc.ceres.swing.binding包,在下文中一共展示了PropertyPane类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initForm
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
private void initForm() {
form = new JTabbedPane();
//only add ioParametersPanel if there are input or target products
if(ioParametersPanel.getTargetProductSelectorDisplay() || ioParametersPanel.getSourceProductSelectorList().size() > 0) {
form.add("I/O Parameters", ioParametersPanel);
} else {
//if there is no ioParametersPanel, the size of the form could be too small
form.setPreferredSize(new Dimension(400, 300));
}
if (bindingContext.getPropertySet().getProperties().length > 0) {
final PropertyPane parametersPane = new PropertyPane(bindingContext);
final JPanel parametersPanel = parametersPane.createPanel();
parametersPanel.setBorder(new EmptyBorder(4, 4, 4, 4));
form.add("Processing Parameters", new JScrollPane(parametersPanel));
updateSourceProduct();
}
}
示例2: actionPerformed
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
ProductNode productNode = SnapApp.getDefault().getSelectedProductNode(SnapApp.SelectionSourceHint.VIEW);
if (productNode == null) {
return;
}
Product product = productNode.getProduct();
if (product != null) {
DialogData dialogData = new DialogData(product.getVectorDataGroup());
PropertySet propertySet = PropertyContainer.createObjectBacked(dialogData);
propertySet.getDescriptor("name").setNotNull(true);
propertySet.getDescriptor("name").setNotEmpty(true);
propertySet.getDescriptor("name").setValidator(new NameValidator(product));
propertySet.getDescriptor("description").setNotNull(true);
final PropertyPane propertyPane = new PropertyPane(propertySet);
JPanel panel = propertyPane.createPanel();
panel.setPreferredSize(new Dimension(400, 100));
ModalDialog dialog = new MyModalDialog(propertyPane);
dialog.setContent(panel);
int i = dialog.show();
if (i == ModalDialog.ID_OK) {
createDefaultVectorDataNode(product, dialogData.name, dialogData.description);
}
}
}
示例3: createProcessingParamTab
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
private JScrollPane createProcessingParamTab() {
PropertyPane parametersPane = new PropertyPane(propertySet);
BindingContext bindingContext = parametersPane.getBindingContext();
bindingContext.bindEnabledState("inputFactor", true, "includeInputFactor", true);
final JPanel parametersPanel = parametersPane.createPanel();
parametersPanel.setBorder(new EmptyBorder(4, 4, 4, 4));
return new JScrollPane(parametersPanel);
}
示例4: RadiometricIndicesPanel
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
RadiometricIndicesPanel(String operatorName, PropertySet propertySet, BindingContext bindingContext, Callable<Product> productAccessor) {
if (productAccessor == null) {
throw new IllegalArgumentException("The accessor for fetching source products must not be null");
}
OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(operatorName);
if (operatorSpi == null) {
throw new IllegalArgumentException("No SPI found for operator name '" + operatorName + "'");
}
this.operatorDescriptor = operatorSpi.getOperatorDescriptor();
this.propertySet = propertySet;
this.bindingContext = bindingContext == null ? new BindingContext(propertySet) : bindingContext;
this.sourceProductAccessor = productAccessor;
PropertyPane parametersPane = new PropertyPane(this.bindingContext);
this.operatorPanel = new JScrollPane(parametersPane.createPanel());
}
示例5: CreateOpTab
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
@Override
public JComponent CreateOpTab(final String operatorName,
final Map<String, Object> parameterMap, final AppContext appContext) {
initializeOperatorUI(operatorName, parameterMap);
final BindingContext context = new BindingContext(propertySet);
initParameters();
final PropertyPane parametersPane = new PropertyPane(context);
return new JScrollPane(parametersPane.createPanel());
}
示例6: actionPerformed
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
final String operationName = model.operationWrapper.getName();
final ModalDialog modalDialog = new ModalDialog(parent, operationName + " - Parameters",
ModalDialog.ID_OK_CANCEL, null);
final ParameterValueGroup workCopy = model.parameters.clone();
final PropertyContainer propertyContainer = createValueContainer(workCopy);
modalDialog.setContent(new PropertyPane(propertyContainer).createPanel());
if (modalDialog.show() == AbstractDialog.ID_OK) {
vc.setValue(PARAMETERS, workCopy);
}
}
示例7: createControl
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
@Override
public JComponent createControl() {
bindingContext = new BindingContext();
PropertySet propertySet = bindingContext.getPropertySet();
propertySet.addPropertyChangeListener(new PropertyChangeHandler());
addEditablePropertyDescriptors();
PropertyPane propertyPane = new PropertyPane(bindingContext);
return propertyPane.createPanel();
}
示例8: createPropertyPanel
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
private JPanel createPropertyPanel(PropertySet propertySet) {
Property[] properties = propertySet.getProperties();
for (Property property : properties) {
String propertyName = property.getName();
if ("type".equals(propertyName)) {
property.getDescriptor().setAttribute("visible", false);
}
if (AggregatorTableController.isSourcePropertyName(propertyName)) {
property.getDescriptor().setValueSet(new ValueSet(sourceVarNames));
}
}
return new PropertyPane(propertySet).createPanel();
}
示例9: MyModalDialog
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
private MyModalDialog(PropertyPane propertyPane) {
super(SnapApp.getDefault().getMainFrame(),
Bundle.CTL_CreateVectorDataNodeActionText(),
ModalDialog.ID_OK_CANCEL_HELP,
HELP_ID);
this.propertyPane = propertyPane;
}
示例10: getComponent
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
JPanel getComponent() {
if (panel == null) {
panel = new JPanel(new BorderLayout());
panel.add(new PropertyPane(bindingContext).createPanel(), BorderLayout.CENTER);
}
return panel;
}
示例11: createComponent
import com.bc.ceres.swing.binding.PropertyPane; //导入依赖的package包/类
private JComponent createComponent() {
PropertyPane propertyPane = new PropertyPane(bindingContext);
return propertyPane.createPanel();
}