bibliothek.gui.dock.dockable
Interface MovingImage

All Known Implementing Classes:
TitleMovingImage, TrueMovingImage, UpdatingTitleMovingImage

public interface MovingImage

Moving images are used when a drag&drop operation is in progress, and an object has to be shown somehow on the screen.

Author:
Benjamin Sigg

Method Summary
 void bind(boolean transparency)
          Called before this image is displayed.
 Component getComponent()
          Gets a Component which represents the MovingImage.
 Point getOffset(Point pressPoint)
          Gest the preferred offset of this image in respect to the mouse.
 void unbind()
          The reverse of bind(boolean).
 

Method Detail

getComponent

Component getComponent()
Gets a Component which represents the MovingImage. This method must always return the same Component.

Returns:
always the same Component

getOffset

Point getOffset(Point pressPoint)
Gest the preferred offset of this image in respect to the mouse.

Parameters:
pressPoint - the position of the mouse in respect to the element that was selected and that resulted in the creation of this image.
Returns:
the offset, or null if a default offset should be used

bind

void bind(boolean transparency)
Called before this image is displayed. The method should connect the image with other objects, like the object it represents.
This method is never called twice in a row.

Parameters:
transparency - if true, then the window showing this Component is transparent. If false then the window is not transparent.

unbind

void unbind()
The reverse of bind(boolean). The image should remove any connections to other objects.
This method is never called twice in a row.