|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjecteTextReader.NotationEventAdapter
eTextReader.PopupWindowNotationHandler
public class PopupWindowNotationHandler
Provides a simple NotationEvent listener that pops up a summary window whenever an annotation is moused over.
The types of notations for which windows are shown is customizable via the
methods disableTypes(eTextReader.clientInterface.Notation.AnnotationType[], boolean) and enableTypes(eTextReader.clientInterface.Notation.AnnotationType[], boolean)
| Field Summary | |
|---|---|
protected java.util.Set<Notation.AnnotationType> |
enabledTypes
|
protected QuickNoteWindow |
popup
|
protected ScrollingContentPane |
scrollingContentPane
|
| Constructor Summary | |
|---|---|
PopupWindowNotationHandler(javax.swing.JFrame frame,
ScrollingContentPane scrollingContentPane)
Constructs a PopupWindowNotationHandler associated with the given frame and ScrollingContentPane. |
|
| Method Summary | |
|---|---|
void |
disableTypes(Notation.AnnotationType[] types,
boolean enableOthers)
Disables the specified array of AnnotationType objects so that popups are not shown for any of those types. |
void |
enableTypes(Notation.AnnotationType[] types,
boolean disableOthers)
Enables the specified array of AnnotationType objects so that popups are shown for any of those types. |
protected void |
handleNotationEntered(NotationEvent ne)
Called when a notation is entered. |
protected void |
handleNotationExited(NotationEvent ne)
Hides the popup window |
protected void |
handleNotationSelected(NotationEvent ne)
Performs the same action is exiting the notation by calling handleNotationExited(NotationEvent) |
boolean |
isTypeEnabled(Notation.AnnotationType type)
Determines whether a particular type of annotation is enabled for popups |
void |
notationEventOccurred(NotationEvent ne)
Handles notifications from the ContentPane when an annotation has been entered/exited/selected. |
void |
pageChanged(NotationEvent ne)
Process a page change event. |
| Methods inherited from class eTextReader.NotationEventAdapter |
|---|
errorOccurred |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected QuickNoteWindow popup
protected ScrollingContentPane scrollingContentPane
protected java.util.Set<Notation.AnnotationType> enabledTypes
| Constructor Detail |
|---|
public PopupWindowNotationHandler(javax.swing.JFrame frame,
ScrollingContentPane scrollingContentPane)
eTextReader.Notation.AnnotationType#isPopupEnabledByDefault
method
frame - the JFrame object used as a parent for the popup windowscrollingContentPane - the scrolling content pane holding the content| Method Detail |
|---|
public void notationEventOccurred(NotationEvent ne)
Handles notifications from the ContentPane when an annotation has
been entered/exited/selected. This implementation calls the appropriate
The default implementation handles these events as follows:
notationEventOccurred in interface NotationEventListenernotationEventOccurred in class NotationEventAdapterhandleNotationEntered(NotationEvent),
handleNotationExited(NotationEvent),
handleNotationSelected(NotationEvent)protected void handleNotationEntered(NotationEvent ne)
ne - protected void handleNotationExited(NotationEvent ne)
ne - the notation event that triggered this actionprotected void handleNotationSelected(NotationEvent ne)
handleNotationExited(NotationEvent)
ne - the notation event that triggered this actionpublic void pageChanged(NotationEvent ne)
NotationEventListener
pageChanged in interface NotationEventListenerpageChanged in class NotationEventAdapter
public void enableTypes(Notation.AnnotationType[] types,
boolean disableOthers)
types - an array of Notation.AnnotationType objects that should be enableddisbleOthers - if set to true, then all types NOT contained in the
array types will be disabled; otherwise, the enabled status of types not in
the array types will not be changed
public void disableTypes(Notation.AnnotationType[] types,
boolean enableOthers)
types - an array of Notation.AnnotationType objects that should be disabledenableOthers - if set to true, then all types NOT contained in the
array types will be enabled; otherwise, the enabled status of types not in
the array types will not be changedpublic boolean isTypeEnabled(Notation.AnnotationType type)
type - the type of annotation to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||