|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.swing.tool.Tool com.levigo.jadice.swing.thumbnailview.LightboxThumbnailTool
public class LightboxThumbnailTool
The LightboxThumbnailTool presents a ThumbnailView
in semi-transparent fashion inside a
PageView
. It may be configured to automatically activate the thumbnail view if the mouse
enters e certain region along the lower edge of the PageView, or to require manual activation by
clicking on a small "tab" docked along the lower edge..
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool |
---|
Tool.ActivationRequest |
Field Summary |
---|
Fields inherited from class com.levigo.jadice.swing.tool.Tool |
---|
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY |
Constructor Summary | |
---|---|
LightboxThumbnailTool()
|
Method Summary | |
---|---|
protected void |
autoUpdateState()
|
int |
getActivationMargin()
Returns the activation margin, expressed in percent of the light-box's preferred height. |
int |
getDeactivationMargin()
Returns the deactivation margin, expressed in percent of the light-box's preferred height. |
ThumbnailView |
getThumbnailView()
Returns the embedded thumbnail view |
protected void |
handleMouseExited(MouseEditEvent e,
boolean isActive)
Invoked when the mouse cursor exits the unobscured part of component's geometry. |
protected void |
handleMouseMoved(MouseEditEvent e,
boolean isActive)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed. |
boolean |
isActive()
Deprecated. Use isLightboxVisible() instead. |
boolean |
isAutoActivate()
Returns whether the light-box shall become visible automatically if the mouse enters the light-box's activation zone. |
boolean |
isAutoDeactivate()
Returns whether the light-box shall become invisible automatically if the mouse leaves the light-box's deactivation zone. |
boolean |
isLightboxVisible()
Returns the visibility of the thumbnail light-box. |
boolean |
isPinned()
Returns the selected state of the pin button in the visble light-box. |
void |
setActivationMargin(int activationMargin)
Set the activation margin, expressed in percent of the light-box's preferred height. |
void |
setActive(boolean active)
Receive notification from the tool manager about the tool's active state. |
void |
setAutoActivate(boolean autoActivate)
Set whether the light-box shall auto-activate itself once the mouse enters the activation zone along the bottom edge of the viewport. |
void |
setAutoDeactivate(boolean autoDeactivate)
Sets whether the light-box shall become invisible automatically once the mouse leaves the light-box's deactivation zone. |
void |
setDeactivationMargin(int deactivationMargin)
Sets the deactivation margin, expressed in percent of the light-box's preferred height. |
protected void |
setEnabled(boolean enabled)
Receive notification from the tool manager about the tool's enabled state. |
void |
setLightboxVisible(boolean visible)
Set the thumbnail light-box visibility. |
protected void |
setManager(ToolManager manager)
Receives the ToolManager instance, which the Tool implementation has been
registered for. |
void |
setPinned(boolean pinned)
Sets the selected state of the pin button in the visible light-box. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LightboxThumbnailTool()
Method Detail |
---|
protected void setEnabled(boolean enabled)
Tool
Tool.handleEditEvent(boolean, EditEvent)
and Tool.render(RenderParameters, boolean)
in
the appropriate state only. However, some tools may need to perform extended actions (for
example, for resource management purposes) upon a change of the enabled state.
setEnabled
in class Tool
protected void handleMouseMoved(MouseEditEvent e, boolean isActive)
Tool
handleMouseMoved
in class Tool
isActive
- whether this tool is currently activeprotected void handleMouseExited(MouseEditEvent e, boolean isActive)
Tool
handleMouseExited
in class Tool
isActive
- whether this tool is currently activeprotected void setManager(ToolManager manager)
Tool
ToolManager
instance, which the Tool
implementation has been
registered for. If the Tool
is deregistered
this
method will be called with null.
setManager
in class Tool
Tool.setManager(com.levigo.jadice.swing.tool.ToolManager)
@CallOnEDT public void setLightboxVisible(boolean visible)
visible
-
IllegalStateException
- this method is annotated to be called on the EDT. Calling from
any other thread will cause an IllegalStateException.@CallOnEDT public boolean isLightboxVisible()
IllegalStateException
- this method is annotated to be called on the EDT. Calling from
any other thread will cause an IllegalStateException.@CallOnEDT public void setActive(boolean active)
setActive
in class Tool
active
- @CallOnEDT public boolean isActive()
isLightboxVisible()
instead.
Hint: The term "active" is slightly misleading, since its meaning is in fact the the visible state of the thumbs and does not mean the auto-activation due to the tool election and activation mechanism practised by the toolmanager.
@CallOnEDT public boolean isPinned()
setPinned(boolean)
@CallOnEDT public void setPinned(boolean pinned)
pinned
- whether the pin button is selected or not
IllegalStateException
- this method is annotated to be called on the EDT. Calling from
any other thread will cause an IllegalStateException.isPinned()
public void setAutoActivate(boolean autoActivate)
Hint: The terms "activate" and "activation" are slightly misleading, since its meaning is in fact the the visible state of the thumbs and does not mean the auto-activation due to the tool election and activation mechanism practised by the toolmanager.
autoActivate
- isAutoActivate()
,
#getAactivationMargin()
,
setActivationMargin(int)
public boolean isAutoActivate()
setAutoActivate(boolean)
,
getActivationMargin()
,
setActivationMargin(int)
public void setAutoDeactivate(boolean autoDeactivate)
Hint: The terms "de-activate" and "de-activation" are slightly misleading, since its meaning is in fact the the visible state of the thumbs and does not mean the auto-activation due to the tool election and activation mechanism practised by the toolmanager.
autoDeactivate
- isAutoDeactivate()
,
getDeactivationMargin()
,
setDeactivationMargin(int)
public boolean isAutoDeactivate()
setAutoDeactivate(boolean)
,
getDeactivationMargin()
,
setDeactivationMargin(int)
protected void autoUpdateState()
public void setDeactivationMargin(int deactivationMargin)
autoDeactivate
has been set to true
.
For best results this value must be >100.
Hint: The terms "de-activate" and "de-activation" are slightly misleading, since its meaning is in fact the the visible state of the thumbs and does not mean the auto-activation due to the tool election and activation mechanism practised by the toolmanager.
deactivationMargin
- getDeactivationMargin()
,
isAutoDeactivate()
,
setAutoDeactivate(boolean)
public int getDeactivationMargin()
setDeactivationMargin(int)
,
isAutoDeactivate()
,
setAutoDeactivate(boolean)
public void setActivationMargin(int activationMargin)
autoActivate
has been set to true
. If
autoActivate
is false
, the activation tab is made visible instead.
For best results this value must be >100.
Hint: The terms "activate" and "activation" are slightly misleading, since its meaning is in fact the the visible state of the thumbs and does not mean the auto-activation due to the tool election and activation mechanism practised by the toolmanager.
activationMargin
- getActivationMargin()
,
isAutoActivate()
,
setAutoActivate(boolean)
public int getActivationMargin()
setActivationMargin(int)
,
isAutoActivate()
,
setAutoActivate(boolean)
public ThumbnailView getThumbnailView()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |