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

netcharts.graphics
Class NFNoteSet

java.lang.Object
  |
  +--netcharts.graphics.NFDraggable
        |
        +--netcharts.graphics.NFNoteSet

public class NFNoteSet
extends NFDraggable
NFNoteSet represents a a group of text annotations with a common font and region style, and mapping strategy to be managed as one set in a graph. The mapping strategy defines how X and Y values are "mapped" to screen coordinates. For example, if the NoteAxis NoteAxis parameter is defined as (BOTTOM, LEFT) then the X and Y values passed in the NoteSet tuple are assumed to be X and Y data values which will be mapped to pixel locations based on the bottom and left Axis scales. Available Mapping Values:


Field Summary
java.lang.String xaxis
          default xaxis mapping
java.lang.String yaxis
          default yaxis mapping
 
Constructor Summary
NFNoteSet()
          Constructor for NFNoteSet class.
NFNoteSet(NFActiveRegion dwell)
          Constructor for NFNoteSet class.
 
Method Summary
static void addObserver(java.lang.Object observer, java.util.Vector notesets)
          Add the given observer to all NoteSets in the given Vector.
boolean dragTo(double[] newCoord)
          This method is called after the observers have approved the new drag location provided in the coords[] array.
void draw(java.awt.Graphics g, java.awt.Graphics clipGraphics)
          Draws the NoteSet to the graphics object.
static void drawAllNoteSets(java.util.Vector notesets, java.awt.Graphics g)
          Draw all NoteSets on the given Graphics.
static void drawAllNoteSets(java.util.Vector notesets, java.awt.Graphics g, java.awt.Graphics clipRect)
          Draw all NoteSets on the given Graphics.
double[] getCoords()
          Returns the current coordinates for the drag object
int getIndex()
          Get the index of the NoteSet.
static NFActiveLabel getNoteSetActiveLabel(java.util.Vector notesets, int idx)
          Returns the active label from the given vector for the given index.
static int getNoteSetIndex(java.util.Vector notesets, NFActiveLabel label)
          Returns the index of the noteset that owns the given active label.
boolean isDraggable(java.awt.Event evt, int x, int y)
          This is called by the NFDraggable class to start the dragging process.
static boolean loadAllParams(NFParam p, java.util.Vector notesets, NFActiveRegion dwell)
          Load all defined notesets.
void loadParams(NFParam p, java.lang.String param)
          Loads the NoteSet parameters from the parameter parser
static boolean mouseDown(java.awt.Event evt, int x, int y, java.util.Vector notesets)
          Call mouseDown on all NoteSets in the given Vector.
static boolean mouseDrag(java.awt.Event evt, int x, int y, java.util.Vector notesets)
          Call mouseDrag on all NoteSets in the given Vector.
static boolean mouseUp(java.awt.Event evt, int x, int y, java.util.Vector notesets)
          Call mouseUp on all NoteSets in the given Vector.
double[] moveRelative(java.awt.Event evt, int dx, int dy)
          Computes and returns the new coordinates for the drag object given the relative offset in pixels.
static void removeObserver(java.lang.Object observer, java.util.Vector notesets)
          Remove the given observer from all NoteSets in the given Vector.
static void setAllMapComponent(java.awt.Component comp, java.util.Vector notesets)
          Set the component associated with all NoteSets in the given vector.
void setAxisMap(NFAxisMap axisMap)
          Set object used to get axes used in mapping x/y values (instead of a pixel position).
void setDwell(NFActiveRegion dwell)
          Set the ActiveRegion on this NoteSet.
static void setDwell(java.util.Vector notesets, NFActiveRegion dwell)
          Set the given dwell on all NoteSets in the given Vector.
void setIndex(int index)
          Set the index of this NoteSet in the set of NoteSets in the Graph.
void setMapComponent(java.awt.Component comp)
          Set map component used if mapping x/y values using percentage.
void setScale(double scale)
          Set the given scale on this NoteSet.
static void setScale(java.util.Vector notesets, double scale)
          Set the given scale on all NoteSets in the given Vector.
 
Methods inherited from class netcharts.graphics.NFDraggable
abortPreDrag, addObserver, dragTo, getCoords, isDraggable, mouseDown, mouseDrag, mouseUp, moveRelative, notifyPostDrag, removeObserver
 

Field Detail

xaxis

public java.lang.String xaxis
default xaxis mapping

yaxis

public java.lang.String yaxis
default yaxis mapping
Constructor Detail

NFNoteSet

public NFNoteSet()
Constructor for NFNoteSet class.

NFNoteSet

public NFNoteSet(NFActiveRegion dwell)
Constructor for NFNoteSet class. pass in the dwell for active labels
Parameters:
dwell - The ActiveRegion.
Method Detail

setDwell

public static void setDwell(java.util.Vector notesets,
                            NFActiveRegion dwell)
Set the given dwell on all NoteSets in the given Vector.
Parameters:
notesets - A Vector of NoteSets.
dwell - The ActiveRegion.

setIndex

public void setIndex(int index)
Set the index of this NoteSet in the set of NoteSets in the Graph.
Parameters:
index - The index.

getIndex

public int getIndex()
Get the index of the NoteSet.
Returns:
The index.

setDwell

public void setDwell(NFActiveRegion dwell)
Set the ActiveRegion on this NoteSet.
Parameters:
dwell - The ActiveRegion.

setScale

public static void setScale(java.util.Vector notesets,
                            double scale)
Set the given scale on all NoteSets in the given Vector.
Parameters:
notesets - A Vector of NoteSets.
scale - The scale factor.

setScale

public void setScale(double scale)
Set the given scale on this NoteSet.
Parameters:
scale - The scale factor.

setAxisMap

public void setAxisMap(NFAxisMap axisMap)
               throws java.lang.Exception
Set object used to get axes used in mapping x/y values (instead of a pixel position).
Parameters:
axisMap - The AxisMap.
Throws:
java.lang.Exception - If null Axis mapped to X or Y axis.

setMapComponent

public void setMapComponent(java.awt.Component comp)
Set map component used if mapping x/y values using percentage. also used for rotatable text
Parameters:
comp - The Component.

loadParams

public void loadParams(NFParam p,
                       java.lang.String param)
Loads the NoteSet parameters from the parameter parser
Parameters:
p - The parameter database to load from.
param - The parameter name.

getNoteSetIndex

public static int getNoteSetIndex(java.util.Vector notesets,
                                  NFActiveLabel label)
Returns the index of the noteset that owns the given active label. If no noteset is found, -1 is returned.
Parameters:
notesets - The Vector of NoteSets.
label - The ActiveLabel to identify.
Returns:
The index of the NoteSet or -1 otherwise.

getNoteSetActiveLabel

public static NFActiveLabel getNoteSetActiveLabel(java.util.Vector notesets,
                                                  int idx)
Returns the active label from the given vector for the given index.
Parameters:
notesets - The Vector of NoteSets.
idx - The NoteSet index.
Returns:
The associated ActiveLabel.

loadAllParams

public static boolean loadAllParams(NFParam p,
                                    java.util.Vector notesets,
                                    NFActiveRegion dwell)
Load all defined notesets. Returns true if any noteset parameters have changed, requiring a display update. The notesets vector is emptied or filled depending on the NoteSets parameter. The notesets vector should never be null.
Parameters:
p - The parameter database to load from.
notesets - The Vector of NoteSets.
dwell - The ActiveRegion.
Returns:
true if load successful, false otherwise.

drawAllNoteSets

public static void drawAllNoteSets(java.util.Vector notesets,
                                   java.awt.Graphics g)
Draw all NoteSets on the given Graphics.
Parameters:
notesets - The Vector of NoteSets.
g - The Graphics to draw on.

drawAllNoteSets

public static void drawAllNoteSets(java.util.Vector notesets,
                                   java.awt.Graphics g,
                                   java.awt.Graphics clipRect)
Draw all NoteSets on the given Graphics.
Parameters:
notesets - The Vector of NoteSets.
g - The Graphics to draw on.
clipRect - The Clipping Rectangle.

setAllMapComponent

public static void setAllMapComponent(java.awt.Component comp,
                                      java.util.Vector notesets)
Set the component associated with all NoteSets in the given vector.
Parameters:
comp - The Component.
notesets - The Vector of NoteSets.

draw

public void draw(java.awt.Graphics g,
                 java.awt.Graphics clipGraphics)
Draws the NoteSet to the graphics object.
Parameters:
g - The Graphics to draw on.
clipGraphics - The Graphics on which a clip is set.

addObserver

public static void addObserver(java.lang.Object observer,
                               java.util.Vector notesets)
Add the given observer to all NoteSets in the given Vector.
Parameters:
observer - The observer to add.
notesets - The Vector of NoteSets.

removeObserver

public static void removeObserver(java.lang.Object observer,
                                  java.util.Vector notesets)
Remove the given observer from all NoteSets in the given Vector.
Parameters:
observer - The observer to remove.
notesets - The Vector of NoteSets.

mouseDown

public static boolean mouseDown(java.awt.Event evt,
                                int x,
                                int y,
                                java.util.Vector notesets)
Call mouseDown on all NoteSets in the given Vector.
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
notesets - The Vector of NoteSets.
Returns:
true if the event was handled by one of the NoteSets, false otherwise.

mouseDrag

public static boolean mouseDrag(java.awt.Event evt,
                                int x,
                                int y,
                                java.util.Vector notesets)
Call mouseDrag on all NoteSets in the given Vector.
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
notesets - The Vector of NoteSets.
Returns:
true if the event was handled by one of the NoteSets, false otherwise.

mouseUp

public static boolean mouseUp(java.awt.Event evt,
                              int x,
                              int y,
                              java.util.Vector notesets)
Call mouseUp on all NoteSets in the given Vector.
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
notesets - The Vector of NoteSets.
Returns:
true if the event was handled by one of the NoteSets, false otherwise.

isDraggable

public boolean isDraggable(java.awt.Event evt,
                           int x,
                           int y)
This is called by the NFDraggable class to start the dragging process. It returns true if something is found to drag.
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
Returns:
true if draggable, false otherwise.
Overrides:
isDraggable in class NFDraggable

getCoords

public double[] getCoords()
Returns the current coordinates for the drag object
Returns:
The coordinates.
Overrides:
getCoords in class NFDraggable

moveRelative

public double[] moveRelative(java.awt.Event evt,
                             int dx,
                             int dy)
Computes and returns the new coordinates for the drag object given the relative offset in pixels.
Parameters:
evt - The Event.
dx - The change in the X coordinate.
dy - The change in the Y coordinate.
Returns:
The new coordinates.
Overrides:
moveRelative in class NFDraggable

dragTo

public boolean dragTo(double[] newCoord)
This method is called after the observers have approved the new drag location provided in the coords[] array. These coords were previously generated by the moveRelative() method.

If true is returned, the new mouse location is recorded, otherwise the drag operation is completely ignored.

Parameters:
coords - The coordinates to drag to.
Returns:
true if dragged, false otherwise.
Overrides:
dragTo in class NFDraggable

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.
2099 Gaither Grove Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2010
All Rights Reserved.

NetCharts ProTM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 29, 2010