|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.gui.AbstractApplication
diva.gui.MDIApplication
diva.whiteboard.Whiteboard
public class Whiteboard
A digital whiteboard application that supports freeform sketching and gestural command editing.
Nested Class Summary | |
---|---|
class |
Whiteboard.WBAppViewListener
|
class |
Whiteboard.WBPageListener
|
protected class |
Whiteboard.WBStateListener
Listens to the whiteboard state and updates the widgets accordingly. |
Constructor Summary | |
---|---|
Whiteboard(DesktopContext context)
Construct a new whiteboard application. |
Method Summary | |
---|---|
void |
addDocument(Document d)
Add a document to the list of documents currently known by this application. |
boolean |
closeDocument(Document d)
Try to close the given document using the storage policy. |
View |
createView(Document d)
Return a view for the given document. |
void |
displayDocument(Document d)
Display the given document. |
protected DesktopContext |
getDesktopContext()
|
String |
getTitle()
Get the title of this application |
WhiteboardState |
getWhiteboardState()
|
protected void |
initializeDebugMenu(JMenuBar mb)
Create the Debug menu with the following items: Save Gestures Load Gestures |
protected void |
initializeEditMenu(JMenuBar mb)
Create the Edit menu with the following items: Cut Copy Paste |
protected void |
initializeFileMenu(JMenuBar mb)
Create the File menu with the following items: New Open Close Save Save As Print Exit |
void |
initializeMenuBar(JMenuBar mb)
Initialize the given menubar. |
protected void |
initializeToolBar(JToolBar tb)
Initialize the given toolbar. |
protected void |
initializeToolbarPenColorMenu(JToolBar tb)
Adds a button to the toolbar which allows the user to change the color of the pen ink. |
protected void |
initializeToolbarPenWidthMenu(JToolBar tb)
Adds a button to the toolbar which allows the user to change the thickness of the pen. |
protected void |
initializeViewMenu(JMenuBar mb)
Create the View menu with the following items: Next Page Previous Page |
static void |
main(String[] argv)
Create and run a new whiteboard application. |
Methods inherited from class diva.gui.MDIApplication |
---|
addView, getMDIContext, getView, removeView, setCurrentView |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BUTTON_WIDTH
public static final int BUTTON_HEIGHT
protected SketchStoragePolicy _storagePolicy
protected JMenuItem _newPageMenuItem
protected JMenuItem _closeMenuItem
protected JMenuItem _saveMenuItem
protected JMenuItem _printMenuItem
protected JMenuItem _saveAsMenuItem
protected JMenuItem _saveAsGIFMenuItem
protected JMenuItem _undoMenuItem
protected JMenuItem _redoMenuItem
protected JMenuItem _nextMenuItem
protected JMenuItem _previousMenuItem
protected JButton _newPageButton
protected JButton _openButton
protected JButton _saveButton
protected JButton _nextButton
protected JButton _previousButton
protected JPopupMenu _outlinePopupMenu
protected JPopupMenu _fillPopupMenu
protected JButton _outlineColorButton
protected JButton _fillColorButton
protected JPopupMenu _widthPopupMenu
protected JButton _widthButton
protected JButton _sketchModeButton
protected JButton _highlightModeButton
protected JButton _commandModeButton
protected WhiteboardState _whiteboardState
protected diva.whiteboard.Whiteboard.UndoAdaptor _undoAdaptor
Constructor Detail |
---|
public Whiteboard(DesktopContext context)
Method Detail |
---|
public static void main(String[] argv)
public void addDocument(Document d)
AbstractApplication
addDocument
in interface Application
addDocument
in class AbstractApplication
public boolean closeDocument(Document d)
AbstractApplication
closeDocument
in interface Application
closeDocument
in class AbstractApplication
public View createView(Document d)
createView
in interface Application
createView
in class MDIApplication
public void displayDocument(Document d)
protected DesktopContext getDesktopContext()
public String getTitle()
getTitle
in interface Application
getTitle
in class AbstractApplication
public WhiteboardState getWhiteboardState()
public void initializeMenuBar(JMenuBar mb)
protected void initializeDebugMenu(JMenuBar mb)
protected void initializeEditMenu(JMenuBar mb)
protected void initializeFileMenu(JMenuBar mb)
protected void initializeViewMenu(JMenuBar mb)
protected void initializeToolBar(JToolBar tb)
protected void initializeToolbarPenColorMenu(JToolBar tb)
protected void initializeToolbarPenWidthMenu(JToolBar tb)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |