Search in sources :

Example 6 with BoxItem

use of org.openecard.gui.definition.BoxItem in project open-ecard by ecsec.

the class RunGUI method checkDataStep.

private Step checkDataStep() {
    // wird durchgeführt");
    Step dataTransaction_Step = new Step("Identitätsnachweis");
    Text requestedPIN_Text = new Text();
    requestedPIN_Text.setText("Eingegebene PIN");
    BoxItem pinCorrekt = new BoxItem();
    pinCorrekt.setName("pinCorrect");
    pinCorrekt.setChecked(true);
    pinCorrekt.setText("OK");
    dataTransaction_Step.getInputInfoUnits().add(requestedPIN_Text);
    Text cerificate_Text = new Text();
    cerificate_Text.setText("Berechtigungszertifikat");
    BoxItem certificateCorrekt = new BoxItem();
    certificateCorrekt.setName("certificateCorrekt");
    certificateCorrekt.setChecked(true);
    certificateCorrekt.setText("OK");
    // statusMessages_CheckBox.getBoxItems().add(certificateCorrekt);
    dataTransaction_Step.getInputInfoUnits().add(cerificate_Text);
    Text eCard_Text = new Text();
    eCard_Text.setText("Verwendete Karte");
    BoxItem eCardCorrekt = new BoxItem();
    eCardCorrekt.setName("eCardCorrekt");
    eCardCorrekt.setChecked(true);
    eCardCorrekt.setText("OK");
    dataTransaction_Step.getInputInfoUnits().add(eCard_Text);
    // statusMessages_CheckBox.getBoxItems().add(eCardCorrekt);
    Text dataTransaction_Text = new Text();
    dataTransaction_Text.setText("Datenübermittlung wird geprüft");
    BoxItem dataTransactionCorrekt = new BoxItem();
    dataTransactionCorrekt.setName("dataTransactionCorrekt");
    dataTransactionCorrekt.setChecked(true);
    dataTransactionCorrekt.setText("OK");
    // statusMessages_CheckBox.getBoxItems().add(dataTransactionCorrekt);
    dataTransaction_Step.getInputInfoUnits().add(dataTransaction_Text);
    return dataTransaction_Step;
}
Also used : ToggleText(org.openecard.gui.definition.ToggleText) Text(org.openecard.gui.definition.Text) Step(org.openecard.gui.definition.Step) BoxItem(org.openecard.gui.definition.BoxItem)

Example 7 with BoxItem

use of org.openecard.gui.definition.BoxItem in project open-ecard by ecsec.

the class EacGuiImplTest method makeBoxItem.

private BoxItem makeBoxItem(String value, boolean checked, boolean disabled) {
    BoxItem item = new BoxItem();
    item.setName(value);
    item.setChecked(checked);
    item.setDisabled(disabled);
    return item;
}
Also used : BoxItem(org.openecard.gui.definition.BoxItem)

Example 8 with BoxItem

use of org.openecard.gui.definition.BoxItem in project open-ecard by ecsec.

the class CHATStepAction method processResult.

private void processResult(Map<String, ExecutionResults> results) {
    List<String> dataGroupsNames = getDataGroupNames();
    List<String> specialFunctionsNames = getSpecialFunctionNames();
    ExecutionResults executionResults = results.get(getStepID());
    // process read access and special functions
    Checkbox cbRead = (Checkbox) executionResults.getResult(CHATStep.READ_CHAT_BOXES);
    if (cbRead != null) {
        CHAT selectedCHAT = eacData.requiredCHAT;
        for (BoxItem item : cbRead.getBoxItems()) {
            if (dataGroupsNames.contains(item.getName())) {
                selectedCHAT.setReadAccess(item.getName(), item.isChecked());
            } else if (specialFunctionsNames.contains(item.getName())) {
                selectedCHAT.setSpecialFunction(item.getName(), item.isChecked());
            }
        }
    }
    // process write access
    Checkbox cbWrite = (Checkbox) executionResults.getResult(CHATStep.WRITE_CHAT_BOXES);
    if (cbWrite != null) {
        CHAT selectedCHAT = eacData.requiredCHAT;
        for (BoxItem item : cbWrite.getBoxItems()) {
            if (dataGroupsNames.contains(item.getName())) {
                selectedCHAT.setWriteAccess(item.getName(), item.isChecked());
            }
        }
    }
}
Also used : ExecutionResults(org.openecard.gui.executor.ExecutionResults) Checkbox(org.openecard.gui.definition.Checkbox) CHAT(org.openecard.crypto.common.asn1.cvc.CHAT) BoxItem(org.openecard.gui.definition.BoxItem)

Aggregations

BoxItem (org.openecard.gui.definition.BoxItem)8 Text (org.openecard.gui.definition.Text)4 Checkbox (org.openecard.gui.definition.Checkbox)3 Step (org.openecard.gui.definition.Step)3 ToggleText (org.openecard.gui.definition.ToggleText)3 Radiobox (org.openecard.gui.definition.Radiobox)2 ExecutionResults (org.openecard.gui.executor.ExecutionResults)2 CHAT (org.openecard.crypto.common.asn1.cvc.CHAT)1 OutputInfoUnit (org.openecard.gui.definition.OutputInfoUnit)1 PasswordField (org.openecard.gui.definition.PasswordField)1 StepActionResult (org.openecard.gui.executor.StepActionResult)1