private JPanel doLevelLayout() { final FormLayout layout = new FormLayout("5dlu, fill:default:grow, 5dlu", "5dlu, pref, 5dlu"); final PanelBuilder builder = ComponentFactory.createBuilder(layout); final CellConstraints cc = new CellConstraints(); builder.add(levelComboBox, cc.xy(2, 2)); return ComponentFactory.createPanel(builder); }
/** * The default constructor for PKCS11View. * * @param core * @param controller * @param model */ public PKCS11View( final AppletCore core, final SignatureWizardController controller, final SignatureModel model) { super(core, controller, model); final BeanAdapter<SignatureModel> beanAdapter = new BeanAdapter<SignatureModel>(model); fileSourceLabel = ComponentFactory.createLabel(I18N_NO_FILE_SELECTED); selectFileSource = ComponentFactory.createFileChooser(I18N_BROWSE, true, new SelectPKCSFileEventListener()); valueModel = beanAdapter.getValueModel(SignatureModel.PROPERTY_PKCS11_PASSWORD); passwordField = ComponentFactory.createPasswordField(valueModel, false); }
/* * (non-Javadoc) * * @see eu.europa.ec.markt.dss.applet.view.DSSAppletView#doLayout() */ @Override protected Container doLayout() { final FormLayout layout = new FormLayout( "5dlu, pref, 5dlu, pref, 5dlu ,pref:grow ,5dlu", "5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu"); final PanelBuilder builder = ComponentFactory.createBuilder(layout); final CellConstraints cc = new CellConstraints(); builder.addSeparator(I18N_LIBRARY_PATH, cc.xyw(2, 2, 5)); builder.add(selectFileSource, cc.xy(2, 4)); builder.add(fileSourceLabel, cc.xyw(4, 4, 3)); builder.addSeparator(I18N_PASSWORD, cc.xyw(2, 6, 5)); builder.add(passwordField, cc.xyw(2, 8, 3)); return ComponentFactory.createPanel(builder); }
/* * (non-Javadoc) * * @see eu.europa.ec.markt.dss.applet.view.DSSAppletView#doInit() */ @Override protected Container doLayout() { final JPanel formatPanel = doFormatLayout(); final JPanel packagingPanel = doPackagingLayout(); final JPanel levelPanel = doLevelLayout(); final FormLayout layout = new FormLayout( "5dlu,pref:grow ,5dlu", "5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu,pref, 5dlu,pref, 5dlu, pref, 5dlu"); final PanelBuilder builder = ComponentFactory.createBuilder(layout); final CellConstraints cc = new CellConstraints(); builder.addSeparator(ResourceUtils.getI18n("SIGNATURE_FORMAT"), cc.xyw(2, 2, 1)); builder.add(formatPanel, cc.xyw(2, 4, 1)); builder.addSeparator(ResourceUtils.getI18n("PACKAGING"), cc.xyw(2, 6, 1)); builder.add(packagingPanel, cc.xyw(2, 8, 1)); builder.addSeparator(ResourceUtils.getI18n("LEVEL"), cc.xyw(2, 10, 1)); builder.add(levelPanel, cc.xy(2, 12)); return ComponentFactory.createPanel(builder); }
/** * The default constructor for SignatureView. * * @param core * @param controller * @param model */ public SignatureView( final AppletCore core, final SignatureWizardController controller, final SignatureModel model) { super(core, controller, model); final BeanAdapter<SignatureModel> beanAdapter = new BeanAdapter<SignatureModel>(model); formatValueHolder = new ValueHolder(model.getFormat()); formatValueHolder.addPropertyChangeListener(new FormatEventListener()); cadesButton = ComponentFactory.createRadioButton(FormatType.CADES, formatValueHolder, FormatType.CADES); xadesButton = ComponentFactory.createRadioButton(FormatType.XADES, formatValueHolder, FormatType.XADES); padesButton = ComponentFactory.createRadioButton(FormatType.PADES, formatValueHolder, FormatType.PADES); asicsButton = ComponentFactory.createRadioButton(FormatType.ASICS, formatValueHolder, FormatType.ASICS); packagingValueHolder = new ValueHolder(model.getPackaging()); packagingValueHolder.addPropertyChangeListener(new PackagingEventListener()); envelopingButton = ComponentFactory.createRadioButton( I18N_ENVELOPING, packagingValueHolder, SignaturePackaging.ENVELOPING); envelopedButton = ComponentFactory.createRadioButton( I18N_ENVELOPED, packagingValueHolder, SignaturePackaging.ENVELOPED); detachedButton = ComponentFactory.createRadioButton( I18N_DETACHED, packagingValueHolder, SignaturePackaging.DETACHED); levelValue = beanAdapter.getValueModel(SignatureModel.PROPERTY_LEVEL); final SelectionInList<String> levels = new SelectionInList<String>(new LevelComboBoxModel(), levelValue); levelComboBox = ComponentFactory.createComboBox(levels); }
private JPanel doPackagingLayout() { return ComponentFactory.createPanel(envelopingButton, envelopedButton, detachedButton); }
private JPanel doFormatLayout() { return ComponentFactory.createPanel(cadesButton, xadesButton, padesButton, asicsButton); }
public void show() { final Container content = layout(); ComponentFactory.updateDisplay(getCore(), content); }