Example #1
0
  public void processConnection(HttpConnection connection, Object e) {
    BrowserContent browserContent = null;

    try {
      if (connection.getResponseCode() != HttpConnection.HTTP_NOT_MODIFIED)
        browserContent = _renderingSession.getBrowserContent(connection, this, (Event) e);

      if (browserContent != null) {
        browserContent.finishLoading();

        Field field = browserContent.getDisplayableContent();
        if (field != null) {

          synchronized (Application.getEventLock()) {
            m_oMainScreen.deleteAll();
            m_oMainScreen.add(field);

            /*if ( m_oMainScreen.getFieldCount() > 0 )
            {
            	Field old = m_oMainScreen.getField(0);
            	m_oMainScreen.add(field);
            	m_oMainScreen.delete(old);
            }else
            	m_oMainScreen.add(field);*/
            /*
            _mainScreen.doPaint();
            if ( e == null )
            {//This should awake screen in case of long network response
             KeyCodeEvent inject1 = 	new KeyCodeEvent( KeyCodeEvent.KEY_DOWN, (char)Keypad.KEY_ESCAPE, 0);
             KeyCodeEvent inject2 =  new KeyCodeEvent( KeyCodeEvent.KEY_UP, (char)Keypad.KEY_ESCAPE, 0);
             inject1.post();
             inject2.post();
             m_bSkipKeyPress = true;
            }*/
          }
        }
      }
    } catch (Exception re) {
      LOG.ERROR("processConnection failed.", re);
    } finally {
      SecondaryResourceFetchThread.doneAddingImages();
    }
  }
Example #2
0
 /**
  * ヘダーコンテンツを配置する
  *
  * @param headerContent ヘダーコンテンツ
  */
 public void setHeader(Pane headerContent) {
   if (header == null) buildHeader();
   header.setContent(headerContent);
 }
Example #3
0
 /**
  * ヘダーコンテンツを取得する
  *
  * @return ヘダーコンテンツ
  */
 public Pane getHeader() {
   if (header == null) return null;
   return header.getContent();
 }