/** * @return * the name of the DevPay product */ public String toString() { return getProductName(); }
/** * @return * the product token provided, or selected, by the user. */ public String getAWSProductToken() { if (awsProductTokenRadioButton.isSelected()) { return awsProductTokenTextField.getText().trim(); } else { return ((AWSDevPayProduct) awsProductListComboBox.getSelectedItem()).getProductToken().trim(); } } }
/** * Loads the products listed in the {@link java.util.Properties} file * represented by the input stream. * * @param pin the input stream * * @return the Vector of <code>AWSDevPayProduct</code>s */ public static Vector load(InputStream pin) throws IOException { if (pin == null) { return new Vector(); } else { Properties prodProps = new Properties(); prodProps.load(pin); return load(prodProps); } }
String prodToken = prodProps.getProperty(tokenPropName); if (prodToken != null) { ret.add(new AWSDevPayProduct(prodToken, prodName));
/** * Loads the products listed in the {@link java.util.Properties} file * represented by the input stream. * * @param pin the input stream * * @return the Vector of <code>AWSDevPayProduct</code>s */ public static Vector load(InputStream pin) throws IOException { if (pin == null) { return new Vector(); } else { Properties prodProps = new Properties(); prodProps.load(pin); return load(prodProps); } }
String prodToken = prodProps.getProperty(tokenPropName); if (prodToken != null) { ret.add(new AWSDevPayProduct(prodToken, prodName));
/** * Loads the products listed in * {@link Constants#DEVPAY_PRODUCTS_PROPERTIES_FILENAME} * * @return the Vector of <code>AWSDevPayProduct</code>s */ public static Vector load() throws IOException { InputStream pin = AWSDevPayProduct.class.getResourceAsStream("/" + Constants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME); Vector ret = new Vector(); if (pin != null) { try { ret = load(pin); } finally { pin.close(); } } return ret; }
/** * @return * the name of the DevPay product */ public String toString() { return getProductName(); }
/** * @return * the product token provided, or selected, by the user. */ public String getAWSProductToken() { if (awsProductTokenRadioButton.isSelected()) { return awsProductTokenTextField.getText().trim(); } else { return ((AWSDevPayProduct) awsProductListComboBox.getSelectedItem()).getProductToken().trim(); } } }
/** * Loads the products listed in * {@link Constants#DEVPAY_PRODUCTS_PROPERTIES_FILENAME} * * @return the Vector of <code>AWSDevPayProduct</code>s */ public static Vector load() throws IOException { InputStream pin = AWSDevPayProduct.class.getResourceAsStream("/" + Constants.DEVPAY_PRODUCTS_PROPERTIES_FILENAME); Vector ret = new Vector(); if (pin != null) { try { ret = load(pin); } finally { pin.close(); } } return ret; }
/** * Compare two products by their names (using string comparision) */ public int compareTo(Object o) { return getProductName().compareTo(((AWSDevPayProduct) o).getProductName()); }
awsProductListComboBox = new JComboBox(AWSDevPayProduct.load()); } catch(Exception e) { awsProductListComboBox = new JComboBox();
/** * Compare two products by their names (using string comparision) */ public int compareTo(Object o) { return getProductName().compareTo(((AWSDevPayProduct) o).getProductName()); }
awsProductListComboBox = new JComboBox(AWSDevPayProduct.load()); } catch(Exception e) { awsProductListComboBox = new JComboBox();