Examples of Alert


Examples of javax.microedition.lcdui.Alert

   * Create about alert.
   * @author  Irving Bunton
   * @version 1.0
   */
  final public static Alert getAbout(MIDlet midlet) {
    final Alert about = new Alert(ResourceProviderME.get(
          "alert.about.title"), ResourceProviderME.get("alert.about",
midlet.getAppProperty("MIDlet-Version") + "-" +
midlet.getAppProperty("Program-Version")), null, AlertType.INFO);
    about.setTimeout(Alert.FOREVER);
    return about;
  }
View Full Code Here

Examples of javax.microedition.lcdui.Alert

          String logLevel =
            m_logLevelField.getString().toUpperCase();
          logger.getParent().setLevel(Level.parse(logLevel));
          settings.setLogLevel( logLevel );
        } catch (IllegalArgumentException e) {
          Alert invalidData = new Alert("Invalid Log Level",
                  "Invalid Log Level " +
                  m_logLevelField.getString(),
                  null,
                  AlertType.ERROR);
          invalidData.setTimeout(Alert.FOREVER);
          Display.getDisplay(m_midlet).setCurrent(invalidData, this);
          return;
        }
        //#endif
        m_midlet.showBookmarkList();
View Full Code Here

Examples of javax.microedition.lcdui.Alert

          (String)promptCommands.get(origCmd)));
    Command okCmd = UiUtil.getCmdRsc("cmd.ok", Command.OK, 1);
    formAlert.addCommand(okCmd);
    Command cancelCmd = UiUtil.getCmdRsc("cmd.cancel", Command.CANCEL, 2);
    formAlert.addCommand(cancelCmd);
    promptAlert = new Alert(origCmd.getLabel(),
        ((StringItem)formAlert.get(ix)).getText(), question,
        AlertType.CONFIRMATION);
    promptAlert.setTimeout(Alert.FOREVER);
    promptAlert.addCommand(okCmd);
    promptAlert.addCommand(cancelCmd);
View Full Code Here

Examples of javax.microedition.lcdui.Alert

   
    //#ifdef DJSR75
    /** Find import file in file system */
    if( c == m_importFileCmd ) {
      if (!m_midlet.JSR75_ENABLED) {
        Alert invalidAlert = new Alert(
            "JSR-75 not enabled",
            "Find files (JSR-75) not enabled on the phone.",
            null,
            AlertType.WARNING);
        invalidAlert.setTimeout(Alert.FOREVER);
        m_midlet.setCurrent( invalidAlert, this );
        return;
      }
      try {
        m_midlet.reqFindFiles( this, m_feedListURL );
View Full Code Here

Examples of javax.microedition.lcdui.Alert

          final boolean saveMemoryEnabled =
              m_appSettings.getSaveMemoryEnabled();
          saveBkMrkSettings(saveMemoryEnabled,
              System.currentTimeMillis(),
              true, true, "label.init.d", false);
          Alert m_about = HelpForm.getAbout(this);
          if (m_loadForm.hasExc()) {
            setCurrent( m_about, m_loadForm );
          } else {
            setCurrent( m_about, m_bookmarkList );
          }
View Full Code Here

Examples of javax.microedition.lcdui.Alert

            }
          } catch (ConnectionNotFoundException e) {
            //#ifdef DLOGGING
            logger.severe("Error opening link " + m_platformURL, e);
            //#endif
            final Alert badLink = new Alert("Could not connect to link",
                "Bad link:  " + m_platformURL,
                null, AlertType.ERROR);
            badLink.setTimeout(Alert.FOREVER);
            setCurrent( badLink, m_itemRtnList );
          } finally {
            m_platformReq = false;
          }
        }
        //#endif

        /* Sort the read or unread items. */
        if ( m_runNews ) {
          try {
            /* Sorting items... */
            initializeLoadingFormRsc("text.s.item",
                m_bookmarkList);
            AllNewsList unreadHeaderList = new AllNewsList(this,
              m_bookmarkList, m_rssFeeds,
                  m_appSettings.getMarkUnreadItems() ?
                  m_unreadImage : null,
                  m_appSettings.getMarkUnreadItems() ?
                  m_readImage : null);
            //#ifdef DTESTUI
            m_unreadHeaderTestList = unreadHeaderList;
            //#endif
            unreadHeaderList.initializeUnreadHhdrsList();
            unreadHeaderList.sortUnreadItems( true,
                m_bookmarkList, m_rssFeeds );
            setCurrent( unreadHeaderList );
                    }catch(OutOfMemoryError t) {
            System.gc();
            recordExcFormFin("\nOut Of Memory Error sorting items", t);
                    }catch(Throwable t) {
            recordExcFormFin("\nInternal error sorting items", t);
          } finally {
            m_runNews = false;
          }
        }

        if ( m_backFrHdr ) {
          m_backFrHdr = false;
          /* Updating feed... */
          initializeLoadingFormRsc("text.u.feed", m_bookmarkList);
          try {
            m_rssFeeds.put(m_curRssParser.getRssFeed());
          } catch (Throwable t) {
            recordExcFormFin("Internal error updating feed.", t);
          }
          setCurrent( m_bookmarkList );
        }

        if ( m_showItem ) {
          m_showItem = false;
          initializeLoadingFormRsc( "text.l.it", m_itemRtnList );
          RssItunesFeed feed = m_curRssParser.getRssFeed();
          citem.setUnreadItem(false);
          initializeItemForm( feed, citem, m_itemRtnList );
          //#ifdef DTESTUI
          m_itemNext = true;
          //#endif
        }

        if ( m_exit || m_saveBookmarks
          //#ifdef DTEST
             || m_testSaveBookmarks
          //#endif
        ) {
          if ( m_exit ) {
            /* Exiting saving data... */
            initializeLoadingFormRsc("text.exit", m_bookmarkList);
          } else {
            /* Saving data... */
            initializeLoadingFormRsc("text.savd", m_bookmarkList);
          }
          exitApp();
        }

                lngStart = System.currentTimeMillis();
                lngTimeTaken = System.currentTimeMillis()-lngStart;
                if(lngTimeTaken<100L) {
          synchronized(this) {
            if (!m_needWakeup) {
              super.wait(75L-lngTimeTaken);
            }
            m_needWakeup = false;
          }
        }
            } catch (InterruptedException e) {
                break;
            } catch (Throwable t) {
        try {
          if (m_loadForm == null) {
            synchronized(this) {
              if (m_loadForm == null) {
                /* Processing... */
                initializeLoadingFormRsc("text.proc",
                    m_bookmarkList);
              }
            }
          }
          recordExcForm("Internal error while processing", t);
        } catch (Throwable e) {
          t.printStackTrace();
          final Alert internalAlert = new Alert(
              /* Internal error */
              ResourceProviderME.get("exc.int.err"),
              /* Internal error while processing */
              ResourceProviderME.get("exc.int.proc"),
              null,
              AlertType.ERROR);
          internalAlert.setTimeout(Alert.FOREVER);
          setCurrent( internalAlert );
        }
            }
        }
    }
View Full Code Here

Examples of javax.microedition.lcdui.Alert

  //#ifdef DLOGGING
        /** Show about */
    if( c == m_debugCmd ) {
      if (m_debug == null) {
        Alert invalidAlert = new Alert(
            "No FormHandler",
            "No FormHandler.",
            null,
            AlertType.WARNING);
        invalidAlert.setTimeout(Alert.FOREVER);
        setCurrent( invalidAlert, m_bookmarkList );
      } else {
        setCurrent( m_debug );
      }
    }
View Full Code Here

Examples of javax.microedition.lcdui.Alert

      //#ifdef DJSR75
      /** Find bookmark file in file system */
      if( c == m_BMFileCmd ) {
        if (!JSR75_ENABLED) {
          Alert invalidAlert = new Alert(
              "JSR-75 not enabled",
              "Find files (JSR-75) not enabled on the phone.",
              null,
              AlertType.WARNING);
          invalidAlert.setTimeout(Alert.FOREVER);
          setCurrent( invalidAlert, this );
          return;
        }
        try {
          reqFindFiles( this, m_bmURL);
View Full Code Here

Examples of javax.microedition.lcdui.Alert

        display.setCurrent( warehouseCanvas );
      } else if( c == backCommand ) {
        display.setCurrent( warehouseCanvas );
      }
    } catch( Exception e ) {
      display.setCurrent( new Alert( "Error", e.getMessage(), null, null ) );
    }
  }
View Full Code Here

Examples of net.sourceforge.stat4j.Alert

    return c;
  }

  public Alert createAlert(String name) {
    String prefix = "alert." + name + ".";
    Alert a = new Alert();
    Properties p = Util.createProperties(prefix);
    a.init(name, p);
    return a;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.