|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.levigo.jadice.swing.lens.LensView
public class LensView
A lens component for the jadice PageView extending a JComponent for an easy integration.
Nested Class Summary | |
---|---|
static class |
LensView.LensInputEventTool
A tool to retrieve and processes MouseEvents and KeyEvents registered by the Canvas. |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
PROPERTY_FROZEN_STATE
Property for firePropertyChange by the frozen state change |
static String |
PROPERTY_SCALE
Property for firePropertyChange by the scale change |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
LensView()
Constructs a new lens instance. |
|
LensView(PageView view)
Constructs a new lens instance and associate it with given viewer. |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_SCALE
public static final String PROPERTY_FROZEN_STATE
Constructor Detail |
---|
public LensView()
public LensView(PageView view)
view
- the viewer associated with the lenssetPageView(PageView)
Method Detail |
---|
public void doLayout()
doLayout
in class Container
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 associate
IllegalStateException
- 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 value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |