Пример #1
0
 @Override
 public void action(final Object cmp) {
   creds.setText(TRANSLATION + COLS + creds(lang.getSelectedItem().toString()));
   if (cmp == names) {
     gui.gprop.set(GUIProp.SHOWNAME, names.isSelected());
     gui.notify.layout();
   }
   final int mh = hitsAsProperty();
   label.setText(mh == -1 ? ALL : Integer.toString(mh));
 }
Пример #2
0
  @Override
  public void close() {
    final MainProp mprop = gui.context.mprop;
    mprop.set(MainProp.LANG, lang.getSelectedItem().toString());

    // new database path: close existing database
    final String dbpath = path.getText();
    if (!mprop.get(MainProp.DBPATH).equals(dbpath)) gui.execute(new Close());
    mprop.set(MainProp.DBPATH, dbpath);
    mprop.write();

    final int mh = hitsAsProperty();
    gui.context.prop.set(Prop.MAXHITS, mh);

    final GUIProp gprop = gui.gprop;
    gprop.set(GUIProp.MOUSEFOCUS, focus.isSelected());
    gprop.set(GUIProp.SIMPLEFD, simpfd.isSelected());
    gprop.set(GUIProp.JAVALOOK, javalook.isSelected());
    gprop.set(GUIProp.MAXHITS, mh);
    gprop.write();
    dispose();
  }