Ejemplo n.º 1
0
 protected void openPictureCart(boolean next) {
   CartBean bean = (CartBean) Engine.getEngine().getBean(UIManager.SCREEN_CARD);
   if (bean == null) {
     Engine.getEngine().putBean(UIManager.SCREEN_CARD, bean = new CartBean(getResoursable()));
   }
   bean.setProceedCommandName(next);
   UIManager.getInstance().show(UIManager.SCREEN_SUP_CARD);
 }
Ejemplo n.º 2
0
  public void commandAction(Command command, Displayable displayable) {
    super.commandAction(command, displayable);
    if (command == _exitCommand) {
      App currentApp = App.getCurrentApp();
      currentApp.destroyApp(false);
    } else if (command == _synchronizeCommand) {
      System.out.println("MainForm::Synchronize");
      if (TagKeeper.getInstance().hasRecords())
        App.getCurrentApp().getWebServiceIteractor().uploadTagList(null);
      else System.out.println("there's nothing to UPLOAD again");

    } else if (command == _settingsCommand) {
      UIManager.getInstance().show(UIManager.SCREEN_SETTINGS);
    } else if (command == _inviteCommand) {
      UIManager.getInstance().show(UIManager.SCREEN_CONTACTS);
    } else if (command == Alert.DISMISS_COMMAND) {
      refresh();
    }
  }
Ejemplo n.º 3
0
 public void show() {
   WebServiceInteractor ws = App.getCurrentApp().getWebServiceIteractor();
   if (ws != null) {
     if (ws.getTagId() == null || ws.getTagId().length() == 0) {
       SettingsBean bean =
           (SettingsBean) UIManager.getInstance().getBean(UIManager.SCREEN_SETTINGS);
       if (bean == null) {
         bean = new SettingsBean(App.getCurrentApp().getSettings());
         UIManager.getInstance().putBean(UIManager.SCREEN_SETTINGS, bean);
       }
       showBusy(null);
       ws.getTagId(null);
       ws.getEncryptionTag(null);
       ws.getBlockList(this);
     } else {
       refresh();
     }
   }
 }
  private void installTheme() {
    // This is not the normal way to do this.
    // Usually you load a theme from a file.
    /*
     */
    try {
      Resources r = Resources.open("/res/javaTheme.res");
      UIManager.getInstance().setThemeProps(r.getTheme("javaTheme"));
      // Resources r = Resources.open("/res/businessTheme.res");
      // UIManager.getInstance().setThemeProps(r.getTheme("businessTheme"));
    } catch (IOException ioe) {
      System.out.println("Couldn't load theme.");
    }
    /*UIManager uim = UIManager.getInstance();
    Hashtable ht = new Hashtable();
    ht.put("sel#" + Style.BG_COLOR, "d0d0ed");
    ht.put(Style.BG_COLOR, "ffffff");
    ht.put(Style.FG_COLOR, "000056");
    uim.setThemeProps(ht); */

  }
Ejemplo n.º 5
0
 protected void doBrowser() {
   UIManager.getInstance().show(UIManager.SCREEN_SUP_BROWSER);
 }
Ejemplo n.º 6
0
 protected void doSettings() {
   UIManager.getInstance().show(UIManager.SCREEN_SUP_SETTINGS);
 }
Ejemplo n.º 7
0
 protected void initTheme(Resources res) {
   String[] themes = res.getThemeResourceNames();
   if (themes != null && themes.length > 0) {
     UIManager.getInstance().setThemeProps(res.getTheme(themes[0]));
   }
 }