if (matchPredicate.test(choiceCallback.getClass(), choiceCallback.getPrompt())) { final String[] choices = choiceCallback.getChoices(); final int choicesLength = choices.length; for (int i = 0; i < choicesLength; i++) { if (choices[i].equals(choice)) { choiceCallback.setSelectedIndex(i); return true;
choiceCallback.setSelectedIndex(choiceCallback.getDefaultChoice()); continue; } else if (callback instanceof TrustedAuthoritiesCallback) {
ChoiceCallback call = (ChoiceCallback)callbacks[i]; label = new Label(shell,SWT.NONE); label.setText(((ChoiceCallback)callbacks[i]).getPrompt()); control = new Combo(shell,SWT.BORDER|SWT.READ_ONLY); ((Combo)control).setItems(call.getChoices()); if(call.getDefaultChoice()>-1) { ((Combo)control).select(call.getDefaultChoice());
public void actionPerformed(ActionEvent ae) { if (choiceCallback != null) choiceCallback.setSelectedIndex (-1); frame.dispose(); } }
c.anchor = GridBagConstraints.CENTER; c.insets = new Insets(20, 10, 10, 2); JLabel l = new JLabel(choiceCallback.getPrompt()); gridbag.setConstraints(l, c); pnl2.add(l); c.insets = new Insets(20, 3, 10, 10); String[] choices = choiceCallback.getChoices(); choiceList.setListData(choices);
callbacks[0] = new ChoiceCallback(localStrings.getLocalString("login.certificate", "Choose from list of certificates: "), as, 0, false); String[] choices = ((ChoiceCallback)callbacks[0]).getChoices(); int[] idx = ((ChoiceCallback)callbacks[0]).getSelectedIndexes(); if (choices == null) {
callbacks[0] = new ChoiceCallback(localStrings.getLocalString("login.certificate", "Choose from list of certificates: "), as, 0, false); int[] idx = ((ChoiceCallback)callbacks[0]).getSelectedIndexes();
ChoiceCallback call = (ChoiceCallback)callbacks[i]; label = new Label(shell,SWT.NONE); label.setText(((ChoiceCallback)callbacks[i]).getPrompt()); control = new Combo(shell,SWT.BORDER|SWT.READ_ONLY); ((Combo)control).setItems(call.getChoices()); if(call.getDefaultChoice()>-1) { ((Combo)control).select(call.getDefaultChoice());
public void windowClosing(WindowEvent we) { //System.out.println("IN WINDOW CLOSING"); //_logger.log(Level.FINE,"IN WINDOW CLOSING"); // send a fail back if (choiceCallback != null) choiceCallback.setSelectedIndex (-1); frame.dispose(); } });
c.anchor = GridBagConstraints.CENTER; c.insets = new Insets(20, 10, 10, 2); JLabel l = new JLabel(choiceCallback.getPrompt()); gridbag.setConstraints(l, c); pnl2.add(l); c.insets = new Insets(20, 3, 10, 10); String[] choices = choiceCallback.getChoices(); choiceList.setListData(choices);
if (matchPredicate.test(choiceCallback.getClass(), choiceCallback.getPrompt())) { final String[] choices = choiceCallback.getChoices(); final int choicesLength = choices.length; for (int i = 0; i < choicesLength; i++) { if (choices[i].equals(choice)) { choiceCallback.setSelectedIndex(i); return true;
choiceCallback.setSelectedIndex(choiceCallback.getDefaultChoice()); continue; } else if (callback instanceof TrustedAuthoritiesCallback) {
public void actionPerformed(ActionEvent ae) { if (choiceCallback != null) choiceCallback.setSelectedIndex (-1); frame.dispose(); } }
if (matchPredicate.test(choiceCallback.getClass(), choiceCallback.getPrompt())) { final String[] choices = choiceCallback.getChoices(); final int choicesLength = choices.length; for (int i = 0; i < choicesLength; i++) { if (choices[i].equals(choice)) { choiceCallback.setSelectedIndex(i); return true;
choiceCallback.setSelectedIndex(choiceCallback.getDefaultChoice()); continue; } else if (callback instanceof TrustedAuthoritiesCallback) {
public void windowClosing(WindowEvent we) { //System.out.println("IN WINDOW CLOSING"); //_logger.log(Level.FINE,"IN WINDOW CLOSING"); // send a fail back if (choiceCallback != null) choiceCallback.setSelectedIndex (-1); frame.dispose(); } });
if (matchPredicate.test(choiceCallback.getClass(), choiceCallback.getPrompt())) { final String[] choices = choiceCallback.getChoices(); final int choicesLength = choices.length; for (int i = 0; i < choicesLength; i++) { if (choices[i].equals(choice)) { choiceCallback.setSelectedIndex(i); return true;
choiceCallback.setSelectedIndex(choiceCallback.getDefaultChoice()); continue; } else if (callback instanceof TrustedAuthoritiesCallback) {
public void actionPerformed(ActionEvent ae) { if (choiceCallback!=null) { choiceCallback.setSelectedIndex (-1); } else { username = null; if (passphrase != null) { Arrays.fill(passphrase, ' '); } frame.dispose(); } } }
cc.setSelectedIndex(-1); } else { System.err.println(cc.getPrompt()); System.err.flush(); String[] choices = cc.getChoices(); for (int j = 0; j < choices.length; j++) { System.err.print("[" + j + "] "); cc.setSelectedIndex(sel);