本文整理汇总了Java中com.openbravo.pos.forms.AppConfig类的典型用法代码示例。如果您正苦于以下问题:Java AppConfig类的具体用法?Java AppConfig怎么用?Java AppConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AppConfig类属于com.openbravo.pos.forms包,在下文中一共展示了AppConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
@Override
public void loadProperties(AppConfig config) {
String sCommerceID = config.getProperty("payment.commerceid");
String sCommerceTerminal = config.getProperty("payment.terminal");
String sCommerceSign = config.getProperty("payment.commercesign");
String sCommerceSHA = config.getProperty("payment.SHA");
if (sCommerceID!=null && sCommerceTerminal!=null && sCommerceSign!=null && sCommerceSHA!=null && sCommerceSign.startsWith("crypt:")) {
jtxtCommerceCode.setText(config.getProperty("payment.commerceid"));
AltEncrypter cypher = new AltEncrypter("cypherkey");
jtxtCommerceTerminal.setText(comboValue(config.getProperty("payment.terminal")));
jtxtCommerceSign.setText(cypher.decrypt(config.getProperty("payment.commercesign").substring(6)));
jCheckBox1.setSelected(Boolean.valueOf(config.getProperty("payment.SHA")).booleanValue());
}
}
示例2: saveProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void saveProperties(AppConfig config) {
Locale l = ((LocaleInfo) jcboLocale.getSelectedItem()).getLocale();
if (l == null) {
config.setProperty("user.language", "");
config.setProperty("user.country", "");
config.setProperty("user.variant", "");
} else {
config.setProperty("user.language", l.getLanguage());
config.setProperty("user.country", l.getCountry());
config.setProperty("user.variant", l.getVariant());
}
config.setProperty("format.integer", readWithDefault(jcboInteger.getSelectedItem()));
config.setProperty("format.double", readWithDefault(jcboDouble.getSelectedItem()));
config.setProperty("format.currency", readWithDefault(jcboCurrency.getSelectedItem()));
config.setProperty("format.percent", readWithDefault(jcboPercent.getSelectedItem()));
config.setProperty("format.date", readWithDefault(jcboDate.getSelectedItem()));
config.setProperty("format.time", readWithDefault(jcboTime.getSelectedItem()));
config.setProperty("format.datetime", readWithDefault(jcboDatetime.getSelectedItem()));
dirty.setDirty(false);
}
示例3: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void loadProperties(AppConfig config) {
jtxtUrl.setText(config.getProperty("erp.URL"));
jtxtId.setText(config.getProperty("erp.id"));
jTextField2.setText(config.getProperty("erp.pos"));
jTextField1.setText(config.getProperty("erp.org"));
String sERPUser = config.getProperty("erp.user");
String sERPPassword = config.getProperty("erp.password");
if (sERPUser != null && sERPPassword != null && sERPPassword.startsWith("crypt:")) {
// La clave esta encriptada.
AltEncrypter cypher = new AltEncrypter("cypherkey" + sERPUser);
sERPPassword = cypher.decrypt(sERPPassword.substring(6));
}
jtxtName.setText(sERPUser);
jtxtPassword.setText(sERPPassword);
dirty.setDirty(false);
}
示例4: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
public void loadProperties(AppConfig config) {
jtxtDbDriverLib.setText(config.getProperty("db.driverlib"));
jtxtDbDriver.setText(config.getProperty("db.driver"));
jtxtDbURL.setText(config.getProperty("db.URL"));
String sDBUser = config.getProperty("db.user");
String sDBPassword = config.getProperty("db.password");
if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
// La clave esta encriptada.
AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
sDBPassword = cypher.decrypt(sDBPassword.substring(6));
}
jtxtDbUser.setText(sDBUser);
jtxtDbPassword.setText(sDBPassword);
dirty.setDirty(false);
}
示例5: saveProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void saveProperties(AppConfig config) {
config.setProperty("till.receiptprefix", jTextReceiptPrefix.getText());
config.setProperty("till.receiptsize", jReceiptSize.getValue().toString());
config.setProperty("till.pickupsize", jPickupSize.getValue().toString());
config.setProperty("till.receiptprintoff",Boolean.toString(m_jReceiptPrintOff.isSelected()));
/** Added: JG 23 July 13 */
config.setProperty("till.SCOnOff",Boolean.toString(jchkSCOnOff.isSelected()));
config.setProperty("till.SCRate",jTextSCRate.getText());
config.setProperty("till.SCRestaurant",Boolean.toString(jchkSCRestaurant.isSelected()));
/** - */
dirty.setDirty(false);
}
示例6: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void loadProperties(AppConfig config) {
String sCommerceID = config.getProperty("payment.commerceid");
String sCommerceTerminal = config.getProperty("payment.terminal");
String sCommerceSign = config.getProperty("payment.commercesign");
String sCommerceSHA = config.getProperty("payment.SHA");
if (sCommerceID!=null && sCommerceTerminal!=null && sCommerceSign!=null && sCommerceSHA!=null && sCommerceSign.startsWith("crypt:")) {
jtxtCommerceCode.setText(config.getProperty("payment.commerceid"));
AltEncrypter cypher = new AltEncrypter("cypherkey");
jtxtCommerceTerminal.setText(comboValue(config.getProperty("payment.terminal")));
jtxtCommerceSign.setText(cypher.decrypt(config.getProperty("payment.commercesign").substring(6)));
jCheckBox1.setSelected(Boolean.valueOf(config.getProperty("payment.SHA")).booleanValue());
}
}
示例7: saveProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
public void saveProperties(AppConfig config) {
Locale l = ((LocaleInfo) jcboLocale.getSelectedItem()).getLocale();
if (l == null) {
config.setProperty("user.language", "");
config.setProperty("user.country", "");
config.setProperty("user.variant", "");
} else {
config.setProperty("user.language", l.getLanguage());
config.setProperty("user.country", l.getCountry());
config.setProperty("user.variant", l.getVariant());
}
config.setProperty("format.integer", readWithDefault(jcboInteger.getSelectedItem()));
config.setProperty("format.double", readWithDefault(jcboDouble.getSelectedItem()));
config.setProperty("format.currency", readWithDefault(jcboCurrency.getSelectedItem()));
config.setProperty("format.percent", readWithDefault(jcboPercent.getSelectedItem()));
config.setProperty("format.date", readWithDefault(jcboDate.getSelectedItem()));
config.setProperty("format.time", readWithDefault(jcboTime.getSelectedItem()));
config.setProperty("format.datetime", readWithDefault(jcboDatetime.getSelectedItem()));
dirty.setDirty(false);
}
示例8: main
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
* @param args the command line arguments
*/
public static void main(final String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
AppConfig config = new AppConfig(args);
config.load();
// Set the look and feel.
// JG 6 May 2013 to Multicatch
try {
UIManager.setLookAndFeel(config.getProperty("swing.defaultlaf"));
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
}
new JFrmConfig(config).setVisible(true);
}
});
}
示例9: saveProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void saveProperties(AppConfig config) {
config.setProperty("till.autotimer",jTextAutoLogoffTime.getText());
config.setProperty("till.marineoption", Boolean.toString(jMarineOpt.isSelected()));
config.setProperty("table.showcustomerdetails", Boolean.toString(jchkShowCustomerDetails.isSelected()));
config.setProperty("table.showwaiterdetails", Boolean.toString(jchkShowWaiterDetails.isSelected()));
config.setProperty("payments.textoverlay", Boolean.toString(jchkTextOverlay.isSelected()));
config.setProperty("till.autoLogoff", Boolean.toString(jchkAutoLogoff.isSelected()));
config.setProperty("till.autoLogoffrestaurant", Boolean.toString(jchkAutoLogoffToTables.isSelected()));
config.setProperty("table.customercolour",jCustomerColour.getSelectedItem().toString());
config.setProperty("table.waitercolour",jWaiterColour.getSelectedItem().toString());
config.setProperty("table.tablecolour",jTableNameColour.getSelectedItem().toString());
config.setProperty("till.taxincluded",Boolean.toString(jTaxIncluded.isSelected()));
config.setProperty("till.pricewith00",Boolean.toString(jCheckPrice00.isSelected()));
config.setProperty("till.amountattop",Boolean.toString(jMoveAMountBoxToTop.isSelected()));
config.setProperty("screen.600800",Boolean.toString(jCloseCashbtn.isSelected()));
dirty.setDirty(false);
}
示例10: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void loadProperties(AppConfig config) {
jcboDBDriver.setSelectedItem(config.getProperty("db.engine"));
jtxtDbDriverLib.setText(config.getProperty("db.driverlib"));
jtxtDbDriver.setText(config.getProperty("db.driver"));
jtxtDbURL.setText(config.getProperty("db.URL"));
String sDBUser = config.getProperty("db.user");
String sDBPassword = config.getProperty("db.password");
if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith("crypt:")) {
// La clave esta encriptada.
AltEncrypter cypher = new AltEncrypter("cypherkey" + sDBUser);
sDBPassword = cypher.decrypt(sDBPassword.substring(6));
}
jtxtDbUser.setText(sDBUser);
jtxtDbPassword.setText(sDBPassword);
dirty.setDirty(false);
}
示例11: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void loadProperties(AppConfig config) {
jtxtMachineHostname.setText(config.getProperty("machine.hostname"));
String lafclass = config.getProperty("swing.defaultlaf");
jcboLAF.setSelectedItem(null);
for (int i = 0; i < jcboLAF.getItemCount(); i++) {
LAFInfo lafinfo = (LAFInfo) jcboLAF.getItemAt(i);
if (lafinfo.getClassName().equals(lafclass)) {
jcboLAF.setSelectedIndex(i);
break;
}
}
// jcboLAF.setSelectedItem(new LookAndFeelInfo());
jcboMachineScreenmode.setSelectedItem(config.getProperty("machine.screenmode"));
jcboTicketsBag.setSelectedItem(config.getProperty("machine.ticketsbag"));
jchkHideInfo.setSelected(Boolean.valueOf(config.getProperty("till.hideinfo")).booleanValue());
jtxtStartupLogo.setText(config.getProperty("start.logo"));
jtxtStartupText.setText(config.getProperty("start.text"));
dirty.setDirty(false);
}
示例12: saveProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void saveProperties(AppConfig config) {
config.setProperty("machine.hostname", jtxtMachineHostname.getText());
LAFInfo laf = (LAFInfo) jcboLAF.getSelectedItem();
config.setProperty("swing.defaultlaf", laf == null
? System.getProperty("swing.defaultlaf", "javax.swing.plaf.metal.MetalLookAndFeel")
: laf.getClassName());
config.setProperty("machine.screenmode", comboValue(jcboMachineScreenmode.getSelectedItem()));
config.setProperty("machine.ticketsbag", comboValue(jcboTicketsBag.getSelectedItem()));
config.setProperty("till.hideinfo", Boolean.toString(jchkHideInfo.isSelected()));
config.setProperty("start.logo", jtxtStartupLogo.getText());
config.setProperty("start.text", jtxtStartupText.getText());
dirty.setDirty(false);
}
示例13: main
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
* @param args the command line arguments
*/
public static void main(final String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
AppConfig config = new AppConfig(args);
config.load();
// Set the look and feel.
// JG 6 May 2013 to Multicatch
// try {
// UIManager.setLookAndFeel(config.getProperty("swing.defaultlaf"));
// } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
// }
new JFrmMigrate(config).setVisible(true);
}
});
}
示例14: main
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
* @param args the command line arguments
*/
public static void main(final String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
AppConfig config = new AppConfig(args);
config.load();
// Set the look and feel.
// JG 6 May 2013 to Multicatch
try {
Object laf = Class.forName(config.getProperty("swing.defaultlaf")).newInstance();
if (laf instanceof LookAndFeel){
UIManager.setLookAndFeel((LookAndFeel) laf);
} else if (laf instanceof SubstanceSkin) {
SubstanceLookAndFeel.setSkin((SubstanceSkin) laf);
}
// JG 6 May 2013 to multicatch
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
}
new JdbUpdate(config).setVisible(true);
}
});
}
示例15: loadProperties
import com.openbravo.pos.forms.AppConfig; //导入依赖的package包/类
/**
*
* @param config
*/
@Override
public void loadProperties(AppConfig config) {
jtxtUrl.setText(config.getProperty("erp.URL"));
jtxtId.setText(config.getProperty("erp.id"));
jTextField2.setText(config.getProperty("erp.pos"));
jTextField1.setText(config.getProperty("erp.org"));
String sERPUser = config.getProperty("erp.user");
String sERPPassword = config.getProperty("erp.password");
if (sERPUser != null && sERPPassword != null && sERPPassword.startsWith("crypt:")) {
// La clave esta encriptada.
AltEncrypter cypher = new AltEncrypter("cypherkey" + sERPUser);
sERPPassword = cypher.decrypt(sERPPassword.substring(6));
}
jtxtName.setText(sERPUser);
jtxtPassword.setText(sERPPassword);
dirty.setDirty(false);
}