public class Whiteboard extends MDIApplication
Modifier and Type | Class and Description |
---|---|
class |
Whiteboard.WBAppViewListener |
class |
Whiteboard.WBPageListener |
protected class |
Whiteboard.WBStateListener
Listens to the whiteboard state and updates the widgets
accordingly.
|
Constructor and Description |
---|
Whiteboard(DesktopContext context)
Construct a new whiteboard application.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addView, getMDIContext, getView, removeView, setCurrentView
actions, addAction, addDocumentListener, addMenuItem, addMenuItem, addPropertyChangeListener, addToolBarButton, addToolBarButton, addViewListener, closeView, documentList, getAction, getAppContext, getClipboard, getCurrentView, getDocumentFactory, getResources, getStoragePolicy, isVisible, removeDocument, removeDocumentListener, removePropertyChangeListener, removeViewListener, setAppContext, setClipboard, setDocumentFactory, setStoragePolicy, setVisible, showError, viewList, viewList
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
public Whiteboard(DesktopContext context)
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)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.