| Overview | Package | Class | Tree | Index | Help | NetCharts Pro (Applets) 7.0 | ||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--netcharts.graphics.NFActiveRegion
The dwell interaction occurs when the pointer (mouse) is left over a specified rectangle or polygon for the dwellTime. At that time, all of the dwell observers registered via addObserver() will be notified via their dwellDisplay() method. If any of them returns true, then no further processing will be performed. Otherwise, if an NFLabel has been set, NFActiveRegion will post that label on the display. posted the dwell label.
When the mouse moves again, the dwell observers will be notified again via the dwellDisplay() method, indicating that the display should be updated to erase the dwell label previosly posted.
If the user presses a mouse button while a dwell label is displayed, then the dwell observers will be notified via their dwellPress() methods. If any of the observers return true, then no additional processing is performed. Otherwise, the URL and target assigned to the active label will be processed using showDocument().
| Field Summary | |
| static int | BACK
Used for addLabel. |
| static int | FRONT
Used for addLabel. |
| Constructor Summary | |
| NFActiveRegion(long dwellTime,
NFDwellObserver callback)
Constructor including dwellTime, and callback. | |
| Method Summary | |
| NFActiveLabel | addLabel(NFActiveLabel label)
Add the given active label to the list of labels being tracked by this active region. |
| NFActiveLabel | addLabel(NFActiveLabel label,
int where)
Add the given active label to the list of labels being tracked by this active region at the given spot. |
| NFActiveLabel | addLabel(java.util.Vector labels,
int nth)
Add the nth active label in the vector, if it doesn't exist, add a default active label. |
| void | addLabels(java.util.Vector labels,
int count)
Add up to <count> labels from the given vector to this active region. |
| void | addObserver(NFDwellObserver observer)
Register the given object as an observer of the dwell processing. |
| java.util.Vector | createSelectLabels(java.util.Vector labels,
int count)
Create <count> active labels for select mode, adding them to the given vector and to the current active region. |
| NFActiveLabel | findMatch(int x,
int y)
Returns the first active label which bounds the given point. |
| java.util.Vector | getActiveLabels()
Get the Vector of ActiveLabels in this ActiveRegion. |
| NFLabel | getLabel()
Get the label used to draw the active labels. |
| boolean | getSelectMode()
Returns the current selectMode value. |
| boolean | mouseDown(java.awt.Event evt,
int x,
int y)
Called by an outside routine to process a mouse event Returns true if a match was found, false otherwise. |
| boolean | mouseDown(java.awt.Event evt,
int x,
int y,
boolean activate)
Called by an outside routine to process a mouse event Returns true if a match was found, false otherwise. |
| void | mousePos(int x,
int y)
Called by an outside routine to update the mouse x and y |
| void | removeAllLabels()
Delete all active labels tracked by this active region |
| void | removeLabel(NFActiveLabel label)
Delete the given active label from the list of labels being tracked by this active region |
| void | removeLabel(java.util.Vector v)
Delete all active labels in the given vector from the list of labels being tracked |
| void | removeLabel(java.util.Vector v,
int vIndex,
int dIndex)
Delete all active labels in the given vector from the list of labels being tracked |
| void | removeObserver(NFDwellObserver observer)
De-register the given object as an observer of the dwell processing. |
| void | resetLabels(java.util.Vector labels)
Reset all of the active labels in the given vector |
| void | run()
Keep checking the mouse position to see if the user is "dwelling". |
| void | setClickCount(int clickCount)
Sets the number of clicks required before an active label is activated. |
| void | setDocument(java.applet.AppletContext ac,
int clickCount)
Deprecated. Setting a non-null applet context indicates that the NFActiveRegion object should attempt to "showDocument" If the applet context or the showDocument will not be called, and the observer will be passed back the x, y, and modifiers. |
| void | setDocument(java.applet.Applet app,
int clickCount)
Use the given applet to determine the AppletContext in which to show a document, or failing that, turn off document display. |
| void | setLabel(NFLabel label,
java.awt.Component comp)
Setting a non-null NFLabel component indicates that the NFActiveRegion object should attempt to post the NFLabel if a dwell occurs over a data polygon. |
| void | setToolBarMode(boolean b)
Set the mode in which all ActiveLabels are displayed as ToolTips. |
| void | setWindowMode(boolean b)
Set the mode in which all ActiveLabels are displayed in their on windows. |
| void | start()
Start the dwell thread |
| void | startDwell()
Start the dwell thread |
| void | stop()
Stop the dwell thread |
| void | stopDwell()
Stop the dwell thread |
| Field Detail |
public static final int FRONT
public static final int BACK
| Constructor Detail |
public NFActiveRegion(long dwellTime,
NFDwellObserver callback)
dwellTime
- The time needed for a dwell to be a dwell
callback
- The DwellObsetrver to notify.| Method Detail |
public java.util.Vector getActiveLabels()
public void setWindowMode(boolean b)
b
- Whether to display the ActiveLabels in their own windows or not.public void setToolBarMode(boolean b)
b
- Whether to display the ActiveLabels as ToolTips or not.public boolean getSelectMode()
public void addObserver(NFDwellObserver observer)
observer
- The Observer to add.public void removeObserver(NFDwellObserver observer)
observer
- The Observer to remove.
public void setLabel(NFLabel label,
java.awt.Component comp)
label
- The label to display ActiveLabels using.
comp
- The Component to use for label rotation.public NFLabel getLabel()
public void setDocument(java.applet.Applet app,
int clickCount)
app
- The Applet to use to display documents.
clickCount
- The number of clicks.
public void setDocument(java.applet.AppletContext ac,
int clickCount)
ac
- The AppletContext to use to display documents.
clickCount
- The number of clicks.public void setClickCount(int clickCount)
clickCount
- The number of clicks.public void start()
public void startDwell()
public void stop()
public void stopDwell()
public void mousePos(int x,
int y)
x
- The X coordinate of the mouse.
y
- The Y coordinate of the mouse.
public boolean mouseDown(java.awt.Event evt,
int x,
int y)
evt
- The Event.
x
- The X coordinate of the mouse.
y
- The Y coordinate of the mouse.
public boolean mouseDown(java.awt.Event evt,
int x,
int y,
boolean activate)
evt
- The Event.
x
- The X coordinate of the mouse.
y
- The Y coordinate of the mouse.
activate
- Search for a match.public NFActiveLabel addLabel(NFActiveLabel label)
label
- The ActiveLabel to add.
public NFActiveLabel addLabel(NFActiveLabel label,
int where)
label
- The ActiveLabel to add.
where
- The location in the list to insert the label.
public NFActiveLabel addLabel(java.util.Vector labels,
int nth)
labels
- A Vector of ActiveLabels.
nth
- Which to add.
public void addLabels(java.util.Vector labels,
int count)
labels
- A Vector of ActiveLabels.
count
- How many to add.public void resetLabels(java.util.Vector labels)
labels
- A Vector of ActiveLabels.
public java.util.Vector createSelectLabels(java.util.Vector labels,
int count)
labels
- A Vector of ActiveLabels.
count
- How many to add.public void removeLabel(NFActiveLabel label)
label
- The ActiveLabel to remove.public void removeLabel(java.util.Vector v)
v
- A Vector of ActiveLabels.
public void removeLabel(java.util.Vector v,
int vIndex,
int dIndex)
v
- A Vector of ActiveLabels.public void removeAllLabels()
public NFActiveLabel findMatch(int x,
int y)
x
- The X coordniate.
y
- The Y coordniate.public void run()
| Overview | Package | Class | Tree | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2010 |
Last Modified: Jun 29, 2010 |