bibliothek.gui.dock.title
Class UpdatingTitleMovingImage

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

public class UpdatingTitleMovingImage
extends Object
implements MovingImage

This MovingImage shows a DockTitle, the title can be automatically exchanged.

Author:
Benjamin Sigg

Constructor Summary
UpdatingTitleMovingImage(Dockable dockable, DockTitleVersion version, DockTitle.Orientation orientation)
          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 MovingImage.bind(boolean).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdatingTitleMovingImage

public UpdatingTitleMovingImage(Dockable dockable,
                                DockTitleVersion version,
                                DockTitle.Orientation orientation)
Creates a new image.

Parameters:
dockable - the element which is represented by this image
version - the contents of this image
orientation - how to align the title
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 MovingImage.bind(boolean). The image should remove any connections to other objects.
This method is never called twice in a row.

Specified by:
unbind in interface MovingImage