|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.gui.AbstractView
diva.whiteboard.WhiteboardView
public class WhiteboardView
WhiteboardView is responsible for view-specific operations on the document (cut, paste, print, etc.) It also keeps track of the multi-page aspect of the whiteboard documents.
Nested Class Summary | |
---|---|
protected class |
WhiteboardView.LocalPageListener
|
protected class |
WhiteboardView.LocalSketchListener
|
class |
WhiteboardView.SketchInterpreter
|
protected class |
WhiteboardView.WBVStateListener
|
Field Summary | |
---|---|
protected JSketch |
_jsketch
|
protected HashMap |
_sketchPanes
A mapping from document pages to sketch panes. |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
WhiteboardView(MultipageDocument d,
WhiteboardState state)
|
Method Summary | |
---|---|
void |
close()
Close the view. |
void |
copy(Clipboard c)
Get the currently selected objects from this document, if any, and place them on the given clipboard. |
protected SketchPane |
createPane(Page page,
JSketch jsketch)
Called by LocalPageListener::intervalAdded |
JButton |
createThumbnail(Page page)
Return a thumbnail component for the thumbnail view. |
void |
cut(Clipboard c)
Get the currently selected objects from this document, if any, and place them on the given clipboard. |
void |
destroyThumbnail(JButton but)
Invert whatever was done in createThumbnail(). |
JComponent |
getComponent()
Invoked when a new document has been created or opened. |
protected DesktopContext |
getDesktopContext()
|
SketchModel |
getGestureModel()
Return a sketch model of the sketched gestures, for debugging. |
String |
getShortTitle()
Get the short title of this document. |
String |
getTitle()
Get the title of this document |
void |
groupSelected()
|
void |
lostOwnership(Clipboard clipboard,
Transferable transferable)
Do nothing. |
void |
nextPage()
|
Iterator |
panes()
|
void |
paste(Clipboard c)
Clone the objects currently on the clipboard, if any, and place them in the given document. |
void |
playGestureModel(SketchModel model)
Return a sketch model of the sketched gestures, for debugging. |
void |
previousPage()
|
int |
print(Graphics graphics,
PageFormat format,
int index)
Print the document to a printer, represented by the specified graphics object. |
protected void |
saveAsGIF(File outputFile)
Save the current page of the specified document to the file in GIF format. |
void |
ungroupSelected()
|
Methods inherited from class diva.gui.AbstractView |
---|
getDocument |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JSketch _jsketch
protected HashMap _sketchPanes
Constructor Detail |
---|
public WhiteboardView(MultipageDocument d, WhiteboardState state)
Method Detail |
---|
public void close()
AbstractView
close
in interface View
close
in class AbstractView
public Iterator panes()
public JButton createThumbnail(Page page)
public void destroyThumbnail(JButton but)
public JComponent getComponent()
getComponent
in interface View
getComponent
in class AbstractView
public SketchModel getGestureModel()
public void playGestureModel(SketchModel model)
protected SketchPane createPane(Page page, JSketch jsketch)
protected void saveAsGIF(File outputFile)
public int print(Graphics graphics, PageFormat format, int index) throws PrinterException
print
in interface Printable
graphics
- The context into which the page is drawn.format
- The size and orientation of the page being drawn.index
- The zero based index of the page to be drawn.
PrinterException
- If the print job is terminated.public void cut(Clipboard c)
cut
in interface View
cut
in class AbstractView
public void copy(Clipboard c)
copy
in interface View
copy
in class AbstractView
public void lostOwnership(Clipboard clipboard, Transferable transferable)
lostOwnership
in interface ClipboardOwner
public void paste(Clipboard c)
paste
in interface View
paste
in class AbstractView
protected DesktopContext getDesktopContext()
public String getTitle()
AbstractView
getTitle
in interface View
getTitle
in class AbstractView
public String getShortTitle()
AbstractView
getShortTitle
in interface View
getShortTitle
in class AbstractView
public void groupSelected()
public void ungroupSelected()
public void nextPage()
public void previousPage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |