org.noos.xing.mydoggy
Interface RepresentativeAnchorDescriptor<D extends Dockable>

All Superinterfaces:
Observable

public interface RepresentativeAnchorDescriptor<D extends Dockable>
extends Observable

This interface is used to modify the behaviour of a representative anchor.

Since:
1.5.0
Author:
Angelo De Caro (angelo.decaro@gmail.com)

Method Summary
 void addLockingAnchor(ToolWindowAnchor anchor)
          Add an anchor used to indicate where the dockable can be placed.
 boolean containsLockingAnchor(ToolWindowAnchor anchor)
          Checks if the specified anchor is registered as a locking anchor.
 void ensureVisible()
          Ensure that the representative anchor is visible to the user.
 ToolWindowAnchor getAnchor()
           
 D getDockable()
          Returns the descriptor owner.
 Icon getIcon()
          Returns the current icon.
 ToolWindowAnchor[] getLockingAnchors()
          Returns the anchors register as locking anchors.
 int getPreviewDelay()
          Returns the preview delay.
 float getPreviewTransparentRatio()
          Returns the transparent ratio.
 String getTitle()
          Returns the current title.
 boolean isPreviewEnabled()
          Returns the preview mode status.
 boolean isVisible()
          Returns true if the representative anchor button is visible, false otherwise.
 void removeAllLockingAnchor()
          Remove all anchors so the dockable can stay only in the current position
 void removeLockingAnchor(ToolWindowAnchor anchor)
          Remove an anchor to indicate where the dockable cannot be placed.
 void setIcon(Icon icon)
          Sets the icon of the representative anchor.
 void setPreviewDelay(int delay)
          Sets the preview delay.
 void setPreviewEnabled(boolean enabled)
          Sets the preview mode.
 void setPreviewTransparentRatio(float transparentRatio)
          Sets the transparent ratio of the preview.
 void setTitle(String title)
          Sets the title of the representative anchor.
 void setVisible(boolean visible)
          Enable or disable the representative anchor button.
 void showMessage(Icon icon, String message)
          Show a message near the representative anchor.
 
Methods inherited from interface org.noos.xing.mydoggy.Observable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 

Method Detail

getDockable

D getDockable()
Returns the descriptor owner.

Returns:
the dockable which owns this descriptor.
Since:
1.5.0

getAnchor

ToolWindowAnchor getAnchor()
Returns:

setVisible

void setVisible(boolean visible)
Enable or disable the representative anchor button. The method throw an exception when it is called on a tool whose type is FLOATING_FREE.

Parameters:
visible - true to enable make visible the representative anchor button, false otherwise.
Since:
1.5.0

isVisible

boolean isVisible()
Returns true if the representative anchor button is visible, false otherwise.

Returns:
true if the representative anchor button is visible, false otherwise.
Since:
1.5.0

setTitle

void setTitle(String title)
Sets the title of the representative anchor.

Parameters:
title - the new title of the representative anchor.
Since:
1.5.0

getTitle

String getTitle()
Returns the current title.

Returns:
the current title.
Since:
1.5.0

setIcon

void setIcon(Icon icon)
Sets the icon of the representative anchor.

Parameters:
icon - the new icon of the representative anchor.
Since:
1.5.0

getIcon

Icon getIcon()
Returns the current icon.

Returns:
the current icon.
Since:
1.5.0

setPreviewEnabled

void setPreviewEnabled(boolean enabled)
Sets the preview mode. If the preview mode is enabled then when the mouse waits on the toolwindow representative button after a delay time the preview will become visible.

Parameters:
enabled - true to enable preview mode; false to disable preview mode.
Since:
1.5.0
See Also:
isPreviewEnabled()

isPreviewEnabled

boolean isPreviewEnabled()
Returns the preview mode status.

Returns:
true if the preview mode is enabled; false otherwise.
Since:
1.5.0
See Also:
setPreviewEnabled(boolean)

setPreviewDelay

void setPreviewDelay(int delay)
Sets the preview delay. When the mouse waits on the toolwindow representative button after a delay time the preview will become visible if the preview mode is enabled.

Parameters:
delay - the preview delay
Since:
1.5.0
See Also:
getPreviewDelay()

getPreviewDelay

int getPreviewDelay()
Returns the preview delay.

Returns:
preview delay in milliseconds.
Since:
1.5.0
See Also:
setPreviewDelay(int)

setPreviewTransparentRatio

void setPreviewTransparentRatio(float transparentRatio)
Sets the transparent ratio of the preview. Valid range is [0.0, 1.0]

Parameters:
transparentRatio - the transparent ratio.
Since:
1.5.0
See Also:
getPreviewTransparentRatio()

getPreviewTransparentRatio

float getPreviewTransparentRatio()
Returns the transparent ratio.

Returns:
ratio value used to describe the opacity of the preview.
Since:
1.5.0
See Also:
setPreviewTransparentRatio(float)

addLockingAnchor

void addLockingAnchor(ToolWindowAnchor anchor)
Add an anchor used to indicate where the dockable can be placed.

Parameters:
anchor - an anchor used to indicate where the dockable can be placed.
Since:
1.5.0

removeLockingAnchor

void removeLockingAnchor(ToolWindowAnchor anchor)
Remove an anchor to indicate where the dockable cannot be placed.

Parameters:
anchor - an anchor to indicate where the dockable cannot be placed.
Since:
1.5.0

removeAllLockingAnchor

void removeAllLockingAnchor()
Remove all anchors so the dockable can stay only in the current position

Since:
1.5.0

getLockingAnchors

ToolWindowAnchor[] getLockingAnchors()
Returns the anchors register as locking anchors.

Returns:
the anchors register as locking anchors.
Since:
1.5.0

containsLockingAnchor

boolean containsLockingAnchor(ToolWindowAnchor anchor)
Checks if the specified anchor is registered as a locking anchor.

Parameters:
anchor - the anchor whose presence must be checked.
Returns:
true if the anchor is present, false otherwise.
Since:
1.5.0

ensureVisible

void ensureVisible()
Ensure that the representative anchor is visible to the user.

Since:
1.5.0

showMessage

void showMessage(Icon icon,
                 String message)
Show a message near the representative anchor.

Parameters:
icon - an icon.
message - the message to be shown.
Since:
1.5.0


Copyright © 2012. All Rights Reserved.