public class WhiteboardView extends AbstractView implements Printable, ClipboardOwner
Modifier and Type | Class and Description |
---|---|
protected class |
WhiteboardView.LocalPageListener |
protected class |
WhiteboardView.LocalSketchListener |
class |
WhiteboardView.SketchInterpreter |
protected class |
WhiteboardView.WBVStateListener |
Modifier and Type | Field and Description |
---|---|
protected JSketch |
_jsketch |
protected HashMap |
_sketchPanes
A mapping from document pages to sketch panes.
|
NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
WhiteboardView(MultipageDocument d,
WhiteboardState state) |
Modifier and Type | Method and Description |
---|---|
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() |
getDocument
protected JSketch _jsketch
protected HashMap _sketchPanes
public WhiteboardView(MultipageDocument d, WhiteboardState state)
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()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.