com.nokia.mid.ui
Class BrowserAdapter

java.lang.Object
  extended by com.nokia.mid.ui.BrowserAdapter
All Implemented Interfaces:
BrowserListener

public abstract class BrowserAdapter
extends java.lang.Object
implements BrowserListener

Abstract adapter class for receiving BrowserItem events


Field Summary
protected  BrowserItem item
           
 
Constructor Summary
BrowserAdapter(BrowserItem item)
          Creates a new BrowserAdapter and sets it as the listener of the BrowserItem
 
Method Summary
 void onConfirmDialog(java.lang.String message, java.lang.String leftText, java.lang.String rightText)
          This function will be called when the browser widget needs to display a confirm dialog By default confirmDialogDone(true) is called
 void onFileSelectDialog()
          This function will be called when the browser widget needs to display a file select dialog By default fileSelectDialogDone("") is called
 void onHttpStatusCode(int statusCode)
          This method is called when an http status code is received Codes: 1 - no error happened 2 - error happened, but don't care Other http error codes like 100, 101, 201, 202, etc.
 void onItemSelected(java.lang.String name, int dataSize, java.lang.String mimeType)
          This function will be called when the user tries to interact with an item It passes in the properties of the item, currently it works with images only and the image can be saved by calling saveSelectedImage on the BrowserItem
 void onNoteDialog(java.lang.String message)
          This function will be called when the browser widget needs to display a note dialog By default noteDialogDone will be called
 void onPageChanged()
          This method is called when the browser has loaded a new page It is not necessarily called at the same time as onProgressEnd.
 void onPageInteraction()
          This method is called when the user interacts with the page
 void onProgressChanged(int progress)
          This method is called to inform about page loading progress
 void onProgressEnd()
          This method is called when the browser is finished loading the page
 void onProgressStart()
          This method is called when the browser starts downloading
 void onSecurityChanged(boolean securePage)
          This method is called when moving into or away from secure page
 void onSelectListDialog(java.lang.String title, boolean multiSelect, int[] idList, boolean[] selectedList, java.lang.String[] textList)
          This function will be called when the browser widget needs to display a select list dialog By default selectListDialogDone(null) is called
 void onUploadEnd()
          This method is called when the browser has finished uploading data
 void onUploadStart()
          This method is called when the browser is uploading data like when posting form data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

protected BrowserItem item
Constructor Detail

BrowserAdapter

public BrowserAdapter(BrowserItem item)
Creates a new BrowserAdapter and sets it as the listener of the BrowserItem

Parameters:
item - the item this adapter is associated with
Method Detail

onProgressStart

public void onProgressStart()
This method is called when the browser starts downloading

Specified by:
onProgressStart in interface BrowserListener

onProgressChanged

public void onProgressChanged(int progress)
This method is called to inform about page loading progress

Specified by:
onProgressChanged in interface BrowserListener
Parameters:
progress - the progress in %

onProgressEnd

public void onProgressEnd()
This method is called when the browser is finished loading the page

Specified by:
onProgressEnd in interface BrowserListener

onUploadStart

public void onUploadStart()
This method is called when the browser is uploading data like when posting form data

Specified by:
onUploadStart in interface BrowserListener

onUploadEnd

public void onUploadEnd()
This method is called when the browser has finished uploading data

Specified by:
onUploadEnd in interface BrowserListener

onSecurityChanged

public void onSecurityChanged(boolean securePage)
This method is called when moving into or away from secure page

Specified by:
onSecurityChanged in interface BrowserListener
Parameters:
securePage - true if the current page is a secure page, false if not.

onPageChanged

public void onPageChanged()
This method is called when the browser has loaded a new page It is not necessarily called at the same time as onProgressEnd. If the browser supports progressive rendering, then this method might be called before the page is finished loading.

Specified by:
onPageChanged in interface BrowserListener

onPageInteraction

public void onPageInteraction()
This method is called when the user interacts with the page

Specified by:
onPageInteraction in interface BrowserListener

onHttpStatusCode

public void onHttpStatusCode(int statusCode)
This method is called when an http status code is received Codes: 1 - no error happened 2 - error happened, but don't care Other http error codes like 100, 101, 201, 202, etc.

Specified by:
onHttpStatusCode in interface BrowserListener
Parameters:
statusCode - the http status code of the request

onNoteDialog

public void onNoteDialog(java.lang.String message)
This function will be called when the browser widget needs to display a note dialog By default noteDialogDone will be called

Specified by:
onNoteDialog in interface BrowserListener
Parameters:
message - the message to be displayed

onConfirmDialog

public void onConfirmDialog(java.lang.String message,
                            java.lang.String leftText,
                            java.lang.String rightText)
This function will be called when the browser widget needs to display a confirm dialog By default confirmDialogDone(true) is called

Specified by:
onConfirmDialog in interface BrowserListener
Parameters:
message - to be displayed
leftText - the left button's text to be displayed
rightText - the right button's text to be displayed

onFileSelectDialog

public void onFileSelectDialog()
This function will be called when the browser widget needs to display a file select dialog By default fileSelectDialogDone("") is called

Specified by:
onFileSelectDialog in interface BrowserListener

onSelectListDialog

public void onSelectListDialog(java.lang.String title,
                               boolean multiSelect,
                               int[] idList,
                               boolean[] selectedList,
                               java.lang.String[] textList)
This function will be called when the browser widget needs to display a select list dialog By default selectListDialogDone(null) is called

Specified by:
onSelectListDialog in interface BrowserListener
Parameters:
title - the title of the dialog
multiSelect - if multiple items can be selected
idList - the ids of the items
selectedList - the statuses of the items weather they are selected
textList - the texts of the items

onItemSelected

public void onItemSelected(java.lang.String name,
                           int dataSize,
                           java.lang.String mimeType)
This function will be called when the user tries to interact with an item It passes in the properties of the item, currently it works with images only and the image can be saved by calling saveSelectedImage on the BrowserItem

Specified by:
onItemSelected in interface BrowserListener
Parameters:
name - the name of the item file
dataSize - the size of the item
mimeType - the Mime-Type of the item


Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.