public class DocumentDragViewHandler<T extends DocumentData> extends SimpleDragViewHandler<T>
WebDocumentPane,
DragManager| Modifier and Type | Field and Description |
|---|---|
protected WebDocumentPane |
documentPane
Document pane which provides this DragViewHandler.
|
margin, textSideSpacing| Constructor and Description |
|---|
DocumentDragViewHandler(WebDocumentPane documentPane)
Constructs custom DragViewHandler for DocumentData object.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.FontMetrics |
getFontMetrics(T document)
Returns font metrics used to display text.
|
protected java.awt.Color |
getForeground(T document)
Returns displayed text foreground.
|
protected javax.swing.Icon |
getIcon(T document)
Returns displayed icon.
|
java.awt.datatransfer.DataFlavor |
getObjectFlavor()
Returns object flavor that can be used to retrieve dragged object.
|
protected java.lang.String |
getText(T document)
Returns displayed text.
|
dragEnded, getView, getViewRelativeLocationprotected final WebDocumentPane documentPane
public DocumentDragViewHandler(WebDocumentPane documentPane)
documentPane - document pane which provides this DragViewHandlerpublic java.awt.datatransfer.DataFlavor getObjectFlavor()
DragViewHandlerprotected java.awt.FontMetrics getFontMetrics(T document)
SimpleDragViewHandlergetFontMetrics in class SimpleDragViewHandler<T extends DocumentData>document - dragged objectprotected javax.swing.Icon getIcon(T document)
SimpleDragViewHandlergetIcon in class SimpleDragViewHandler<T extends DocumentData>document - dragged objectprotected java.awt.Color getForeground(T document)
SimpleDragViewHandlergetForeground in class SimpleDragViewHandler<T extends DocumentData>document - dragged objectprotected java.lang.String getText(T document)
SimpleDragViewHandlergetText in class SimpleDragViewHandler<T extends DocumentData>document - dragged object