bibliothek.gui.dock.title
Class TitleMovingImage

java.lang.Object
  extended by bibliothek.gui.dock.title.TitleMovingImage
All Implemented Interfaces:
MovingImage

public class TitleMovingImage
extends Object
implements MovingImage

A moving image that uses a DockTitle to paint its content.

Author:
Benjamin Sigg

Constructor Summary
TitleMovingImage(Dockable dockable, DockTitle title)
          Creates a new image.
 
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().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TitleMovingImage

public TitleMovingImage(Dockable dockable,
                        DockTitle title)
Creates a new image.

Parameters:
dockable - the element which is represented by this image
title - the contents of this image
Method Detail

getOffset

public Point getOffset(Point pressPoint)
Description copied from interface: MovingImage
Gest the preferred offset of this image in respect to the mouse.

Specified by:
getOffset in interface MovingImage
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

public void bind(boolean transparency)
Description copied from interface: MovingImage
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.

Specified by:
bind in interface MovingImage
Parameters:
transparency - if true, then the window showing this Component is transparent. If false then the window is not transparent.

getComponent

public Component getComponent()
Description copied from interface: MovingImage
Gets a Component which represents the MovingImage. This method must always return the same Component.

Specified by:
getComponent in interface MovingImage
Returns:
always the same Component

unbind

public void unbind()
Description copied from interface: MovingImage
The reverse of #bind(). The image should remove any connections to other objects.
This method is never called twice in a row.

Specified by:
unbind in interface MovingImage