Package diva.gui
Class AbstractView
- java.lang.Object
-
- diva.gui.AbstractView
-
- All Implemented Interfaces:
View
- Direct Known Subclasses:
TextView
public abstract class AbstractView extends java.lang.Object implements View
An abstract implementation of the View interface that consists of mostly empty methods to be filled in by concrete subclasses.- Version:
- $Id$
- Author:
- Michael Shilman
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description AbstractView(Document doc)Construct a view of the given document.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Close the view.voidcopy(java.awt.datatransfer.Clipboard c)Get the currently selected objects from this view, if any, and place them on the given clipboard.voidcut(java.awt.datatransfer.Clipboard c)Remove the currently selected objects from this view, if any, and place them on the given clipboard.abstract javax.swing.JComponentgetComponent()Return the component that implements the display of this view.DocumentgetDocument()Get the document that this view is viewing.abstract java.lang.StringgetShortTitle()Get the short title of this document.abstract java.lang.StringgetTitle()Get the title of this documentvoidpaste(java.awt.datatransfer.Clipboard c)Clone the objects currently on the clipboard, if any, and place them in the given view.
-
-
-
Constructor Detail
-
AbstractView
public AbstractView(Document doc)
Construct a view of the given document.
-
-
Method Detail
-
close
public void close() throws java.lang.ExceptionClose the view.
-
copy
public void copy(java.awt.datatransfer.Clipboard c)
Get the currently selected objects from this view, if any, and place them on the given clipboard. If the view does not support such an operation, then do nothing.
-
cut
public void cut(java.awt.datatransfer.Clipboard c)
Remove the currently selected objects from this view, if any, and place them on the given clipboard. If the view does not support such an operation, then do nothing.
-
getComponent
public abstract javax.swing.JComponent getComponent()
Return the component that implements the display of this view. The returned object should be a unique object that corresponds to this view.- Specified by:
getComponentin interfaceView
-
getDocument
public Document getDocument()
Get the document that this view is viewing.- Specified by:
getDocumentin interfaceView
-
getTitle
public abstract java.lang.String getTitle()
Get the title of this document
-
getShortTitle
public abstract java.lang.String getShortTitle()
Get the short title of this document. The short title is used in situations where the regular title is likely to be too long, such as iconified windows, menus, and so on.- Specified by:
getShortTitlein interfaceView
-
paste
public void paste(java.awt.datatransfer.Clipboard c)
Clone the objects currently on the clipboard, if any, and place them in the given view. If the document does not support such an operation, then do nothing. This method is responsible for copying the data.
-
-