public class LensView extends JComponent
Modifier and Type | Class and Description |
---|---|
static class |
LensView.LensInputEventTool
A tool to retrieve and processes MouseEvents and KeyEvents registered by the Canvas.
|
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_FROZEN_STATE
Property for firePropertyChange by the frozen state change
|
static String |
PROPERTY_SCALE
Property for firePropertyChange by the scale change
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
LensView()
Constructs a new lens instance.
|
LensView(PageView view)
Constructs a new lens instance and associate it with given viewer.
|
Modifier and Type | Method and Description |
---|---|
void |
addNotify() |
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
doLayout() |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue) |
String |
getFrozenLabelText()
Returns the text of the frozen label indicator.
|
FrozenStateMode |
getFrozenStateMode()
Return the frozen state mode which describes how instances of
LensView handle the
frozen mode. |
float |
getMinimumScale() |
PageView |
getPageView() |
float |
getScale()
Gets the scale.
|
float |
getScaleStep() |
boolean |
isFrozen()
Gets the frozen state.
|
void |
paint(Graphics g) |
void |
removeNotify() |
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
setFrozen(boolean frozen)
Sets / unsets the frozen state where the lens will remain in focus of the last point before
being set to frozen.
|
void |
setFrozenLabelText(String text)
Sets the text of the frozen label indicator.
|
void |
setFrozenStateMode(FrozenStateMode frozenStateMode)
Set the frozen state mode, which describes how instances of
LensView handle the frozen
mode. |
void |
setMinimumScale(float minimumScale)
Set the minimum value for scaling the page.
|
void |
setPageView(PageView aPageView)
Associate this lens instance with given viewer
|
void |
setScale(float scale)
Sets the scale.
|
void |
setScaleStep(float defaultScaleStep)
Set the default step to increase / decrease the scale value
|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final String PROPERTY_SCALE
public static final String PROPERTY_FROZEN_STATE
public LensView()
public LensView(PageView view)
view
- the viewer associated with the lenssetPageView(PageView)
public void setPageView(PageView aPageView)
NOTE: Once the page view
has been realized, this method must not
be called on a thread other than the Event Dispatch Thread
. For details
please see: TGASwingUtil.ensureEventDispatchThread(Component)
aPageView
- viewer to associateIllegalStateException
- if the component has been realized and the calling thread is not
the Event Dispatch Thread
public void paint(Graphics g)
paint
in class JComponent
Component.paint(java.awt.Graphics)
public void addNotify()
addNotify
in class JComponent
JComponent.addNotify()
public void removeNotify()
removeNotify
in class JComponent
Component.removeNotify()
public boolean isFrozen()
true
if the lens is in frozen state; false
otherwisepublic void setFrozen(boolean frozen)
frozen
- the frozen flag to be setpublic FrozenStateMode getFrozenStateMode()
LensView
handle the
frozen mode.LensView
FrozenStateMode
public void setFrozenStateMode(FrozenStateMode frozenStateMode)
LensView
handle the frozen
mode.frozenStateMode
- the frozen state mode used by instances of LensView
FrozenStateMode
public String getFrozenLabelText()
public void setFrozenLabelText(String text)
text
- the text to be displayed when frozen.public float getScale()
public void setScale(float scale)
scale
- The scale to be set.public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in class Container
Component.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in class Component
Component.removePropertyChangeListener(java.beans.PropertyChangeListener)
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
firePropertyChange
in class Component
Component.firePropertyChange(java.lang.String, java.lang.Object,
java.lang.Object)
public PageView getPageView()
public float getMinimumScale()
public void setMinimumScale(float minimumScale)
minimumScale
- minimum scaling valuepublic float getScaleStep()
public void setScaleStep(float defaultScaleStep)
defaultScaleStep
- scale valueCopyright © 2024 levigo holding gmbh. All rights reserved.