com.alee.extended.tab
Class DocumentDragViewHandler<T extends DocumentData>

java.lang.Object
  extended by com.alee.managers.drag.SimpleDragViewHandler<T>
      extended by com.alee.extended.tab.DocumentDragViewHandler<T>
All Implemented Interfaces:
DragViewHandler<T>

public class DocumentDragViewHandler<T extends DocumentData>
extends SimpleDragViewHandler<T>

Custom DragViewHandler for WebDocumentPane document.

Author:
Mikle Garin
See Also:
How to use WebDocumentPane, WebDocumentPane, DragManager

Field Summary
protected  WebDocumentPane documentPane
          Document pane which provides this DragViewHandler.
 
Fields inherited from class com.alee.managers.drag.SimpleDragViewHandler
margin, textSideSpacing
 
Constructor Summary
DocumentDragViewHandler(WebDocumentPane documentPane)
          Constructs custom DragViewHandler for DocumentData object.
 
Method Summary
protected  java.awt.FontMetrics getFontMetrics(T document)
          Returns font metrics used to display text.
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.
 
Methods inherited from class com.alee.managers.drag.SimpleDragViewHandler
dragEnded, getView, getViewRelativeLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentPane

protected final WebDocumentPane documentPane
Document pane which provides this DragViewHandler.

Constructor Detail

DocumentDragViewHandler

public DocumentDragViewHandler(WebDocumentPane documentPane)
Constructs custom DragViewHandler for DocumentData object.

Parameters:
documentPane - document pane which provides this DragViewHandler
Method Detail

getObjectFlavor

public java.awt.datatransfer.DataFlavor getObjectFlavor()
Returns object flavor that can be used to retrieve dragged object.

Returns:
object flavor that can be used to retrieve dragged object

getFontMetrics

protected java.awt.FontMetrics getFontMetrics(T document)
Returns font metrics used to display text.

Overrides:
getFontMetrics in class SimpleDragViewHandler<T extends DocumentData>
Returns:
font metrics used to display text

getIcon

protected javax.swing.Icon getIcon(T document)
Returns displayed icon.

Specified by:
getIcon in class SimpleDragViewHandler<T extends DocumentData>
Returns:
displayed icon

getText

protected java.lang.String getText(T document)
Returns displayed text.

Specified by:
getText in class SimpleDragViewHandler<T extends DocumentData>
Returns:
displayed text