net.sf.zekr.engine.bookmark.ui
Class BookmarkItemForm

java.lang.Object
  extended by net.sf.zekr.ui.BaseForm
      extended by net.sf.zekr.engine.bookmark.ui.BookmarkItemForm
All Implemented Interfaces:
EventProtocol

public class BookmarkItemForm
extends BaseForm

A form for viewing and managing a single bookmark item or folder.

Author:
Mohsen Saboorian

Field Summary
static java.lang.String FORM_ID
           
 
Fields inherited from class net.sf.zekr.ui.BaseForm
display, lang, logger, parent, resource, shell
 
Fields inherited from interface net.sf.zekr.ui.helper.EventProtocol
CLEAR_CACHE_ON_EXIT, CUSTOM_ZEKR_EVENT, END_WAITING, GOTO_LOCATION, RECREATE_VIEW, REFRESH_VIEW, SPLASH_PROGRESS, SPLASH_PROGRESS_FULLY, UPDATE_BOOKMARKS_MENU, UPDATE_SURA_NAMES
 
Constructor Summary
BookmarkItemForm(org.eclipse.swt.widgets.Shell parent, BookmarkItem bookmarkItem, int bookmarkSetDirection)
           
BookmarkItemForm(org.eclipse.swt.widgets.Shell parent, boolean isFolder, int bookmarkSetDirection)
          Makes a new instance of this class.
BookmarkItemForm(org.eclipse.swt.widgets.Shell parent, java.util.List locationList, java.lang.String bookmarkName, int bookmarkSetDirection)
          Makes a new instance of this class, as a bookmark item (not folder).
 
Method Summary
 BookmarkItem getBookmarkItem()
           
 org.eclipse.swt.widgets.Display getDisplay()
           
 org.eclipse.swt.widgets.Shell getShell()
           
 boolean open(boolean readOnly)
           
 void updateBookmarkItem()
           
 
Methods inherited from class net.sf.zekr.ui.BaseForm
isDisposed, loopEver, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORM_ID

public static final java.lang.String FORM_ID
See Also:
Constant Field Values
Constructor Detail

BookmarkItemForm

public BookmarkItemForm(org.eclipse.swt.widgets.Shell parent,
                        BookmarkItem bookmarkItem,
                        int bookmarkSetDirection)

BookmarkItemForm

public BookmarkItemForm(org.eclipse.swt.widgets.Shell parent,
                        boolean isFolder,
                        int bookmarkSetDirection)
Makes a new instance of this class. The underling BookmarkItem is also created, but its ID is not assigned.

Parameters:
parent - the parent shell
isFolder -
bookmarkSetDirection -

BookmarkItemForm

public BookmarkItemForm(org.eclipse.swt.widgets.Shell parent,
                        java.util.List locationList,
                        java.lang.String bookmarkName,
                        int bookmarkSetDirection)
Makes a new instance of this class, as a bookmark item (not folder). It uses locationList to initialize IQuranLocations this item refers to. The underling BookmarkItem is also created, but its ID is not assigned.
This constructor is used for stand-alone bookmarking.

Parameters:
parent - the parent shell
locationList - a list of IQuranLocations to be set as default locations to this bookmark item
bookmarkName - default bookmark name (title). If this value is null, localized value for the key NEW_BOOKMARK is used.
bookmarkSetDirection -
Method Detail

updateBookmarkItem

public void updateBookmarkItem()

getBookmarkItem

public BookmarkItem getBookmarkItem()

open

public boolean open(boolean readOnly)
Parameters:
readOnly - disables OK button if true.
Returns:
true if ok pressed, false otherwise.

getShell

public org.eclipse.swt.widgets.Shell getShell()

getDisplay

public org.eclipse.swt.widgets.Display getDisplay()