@Override public void actionPerformed(ActionEvent e) { Window window = getWindow(e); Mask selectedMask = getMaskForm().getSelectedMask(); PropertyContainer selectedMaskConfig = selectedMask.getImageConfig(); ImageType type = selectedMask.getImageType(); if (type == Mask.BandMathsType.INSTANCE) { Product product = getMaskForm().getProduct(); ProductExpressionPane expressionPane = ProductExpressionPane.createBooleanExpressionPane( new Product[]{product}, product, null); final String[] namesOfRastersOfSameSize = collectNamesOfRastersOfSameSize(); final RangeEditorDialog.Model model = new RangeEditorDialog.Model(namesOfRastersOfSameSize); model.setMinValue(selectedMaskConfig.getValue(Mask.RangeType.PROPERTY_NAME_MINIMUM));
MaskFormActions(ToolTopComponent maskTopComponent, MaskForm maskForm) { maskActions = new MaskAction[]{ new NewBandMathsAction(maskForm), new NewRangeAction(maskForm), new NewVectorDataNodeAction(maskForm), new NullAction(maskForm), new NewUnionAction(maskForm), new NewIntersectionAction(maskForm), new NewDifferenceAction(maskForm), new NewInvDifferenceAction(maskForm), new NewComplementAction(maskForm), new NullAction(maskForm), new CopyAction(maskForm), new EditAction(maskForm), new RemoveAction(maskForm), new TransferAction(maskForm), new ImportAction(maskTopComponent, maskForm), new ExportAction(maskTopComponent, maskForm), new ZoomToVectorMaskAction(maskTopComponent, maskForm), new NullAction(maskForm), }; }
@Override void updateState() { setEnabled(getMaskForm().isInManagementMode() && getMaskForm().getSelectedRowCount() == 1); } }