com.vlsolutions.swing.docking

Interface DockableDragSource

Known Implementing Classes:
DockableStoreButton, DockTabbedPane, DockViewAsTab.TabHeader, DockViewTitleBar, MaximizedDockViewAsTab.MaximizedTabHeader

public interface DockableDragSource

An interface implemented by visual components used for drag and drop operations on a DockableContainer.

This interface is used by API Extenders to create new kind of drag sources.

A "Drag Source" is a component, linked to a Dockable, responsible for drag gesture recognition. There can be more than one DockableDragSource per Dockable.

For example, the title bar of a docked component is usually the drag source of this component (meaning : when a user drags the title bar, he expects the dockable to be dragged around).

These draggable components must be able to give informations about their target (the component known to the user, which is actually dragged).

Method Summary

void
endDragComponent(boolean dropped)
notifies the source when the drag operation has ended (by a drop or cancelled)
Dockable
getDockable()
Returns the Dockable component this source is for
Container
getDockableContainer()
returns the DockableContainer responsible for displaying the associated dockable
boolean
startDragComponent(Point p)
Notifies this source that a drag operation has begun.

Method Details

endDragComponent

public void endDragComponent(boolean dropped)
notifies the source when the drag operation has ended (by a drop or cancelled)
Since:
2.1.3

getDockable

public Dockable getDockable()
Returns the Dockable component this source is for

getDockableContainer

public Container getDockableContainer()
returns the DockableContainer responsible for displaying the associated dockable

startDragComponent

public boolean startDragComponent(Point p)
Notifies this source that a drag operation has begun.

The source may reject the drag according to internal conditions (in that case this method shall return false) or to wrong mouse position .

Returns:
true if drag operation is accepted (i.e the zone pointed by p refers to a draggable component), false otherwise.

© Copyright 2004-2006 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications