Changes between Version 16 and Version 17 of BOOK_PROPERTIES_DIALOG_R0


Ignore:
Timestamp:
05/29/09 11:05:23 (16 years ago)
Author:
boyan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BOOK_PROPERTIES_DIALOG_R0

    v16 v17  
    3737 
    3838= Design = 
    39 When a new book is created the dialog is displayed with default values for its fields. 
    40 If the user clicks ok a new book is created with the valued of the fields in the BookPropertiesDialog. 
    41 Otherwise no book is created. 
    42 If you display the dialog when the book is already opened it should display the information about it and allow editing it. 
    4339 
    44 A new class BookInfo is created with three value properties in order to keep the values of the book info. If a new book is created new instance of the BookInfo class is created with default values for its fields. Otherwise the new instance of the BookInfo class holds the properties of the current book. 
    45 If a new book is created the book properties dialog appears and if the user clicks cancel the getInfo method in BookInfo  class returns null and a new book is not created, if the user clicks ok, getInfo method returns an instance of the BookInfo class and a new book with the desired prperties is created.   
     40== End user behaviour == 
     41When a new book is created, a dialog showing a default title and page size is displayed. The user is able to edit these and accept them by clicking OK. In this case, a new book is created with the given title and page size. If Cancel is clicked, no book is created. The dialog can be displayed again by selecting the Book Properties item in the File menu or by pressing Ctrl+Shift+B from the keyboard. In this case, the title and page size of the current book are displayed and can be edited. Clicking OK now saves the changes, while clicking Cancel discards them. 
     42 
     43== Internal design == 
     44 
     45A new class BookInfo will be created in the org.sophie2.base.model.book module. It will contain three value properties, holding the values for the title, the page width and the page height. These should be set with the following default initial values: 
     46 * Title - "New Book" 
     47 * Page width - 640 
     48 * Page height - 480 
     49There will be two constructors of this class. The first takes no arguments and is invoked when a new book is created. The second takes a book as an argument and sets the values of the properties to the corresponding values of the given book. It is invoked with the current book when there is such. There will be one other property as well, which will hold the current book (if there is such). 
     50 
     51The book properties dialog will provide a JPanel that shows the information from the BookInfo class. Based on the user input (OK/Cancel clicked) and the currentBook property of BookInfo (whether it is null or not), one of the above mentioned actions will be taken. 
     52 
     53An Initial test can be found here: ^Provide a link and a changeset for the updated test. 
    4654 
    4755= Implementation = 
    48  Done according to the design. The page width and height are set differently because they are in one property. (changeset [2913]) 
    4956 
    5057= Testing = 
    5158 
    5259= Comments = 
    53 ^(Write comments for this or later revisions here.) 
     60 * In the next revision, we might provide several pre-set values for the page size (as in Sophie1). --boyan@2009-05-29