public class LightboxThumbnailTool extends Tool
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..Tool.ActivationRequest
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
LightboxThumbnailTool() |
Modifier and Type | Method and Description |
---|---|
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 |
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.
|
contribute, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getDispatchPriority, getManager, getRenderPriority, handleEditEvent, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, propagatePropertyChange, render, setCursor, setStatusFeedback
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)
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)
@CallOnEDT public boolean isPinned()
setPinned(boolean)
@CallOnEDT public void setPinned(boolean pinned)
pinned
- whether the pin button is selected or notIllegalStateException
- 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.
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.
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.
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.
public int getActivationMargin()
setActivationMargin(int)
,
isAutoActivate()
,
setAutoActivate(boolean)
public ThumbnailView getThumbnailView()
Copyright © 2024 levigo holding gmbh. All rights reserved.