NetCharts Pro

netcharts.pro.common
Class NFNote

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFNote
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFNote
extends NFBaseClass
implements NFCDLGenerator

The NFNote object represents a single note. A NFNote will be within a single NFNoteSet. The note may or may not have text, and may or may not have associated lines. Notes are mapped to screen locations through the use of the NFAxisMap object also stored in the NFNoteSet.


Constructor Summary
NFNote()
          Constructs a default note
NFNote(java.lang.String text, NFPoint point)
          Constructs a note with the given text and location.
 
Method Summary
 java.lang.Object clone()
          Does a deep copy of this note object
 java.lang.String getCDL()
          Generate CDL parameters representing this note
 void getCDL(java.lang.StringBuffer sb)
          Append CDL parameters representing this note to the given StringBuffer.
 NFPoint getPoint1()
          Get this note's first location
 NFPoint getPoint2()
          Get this note's second location.
 NFPoint getPoint3()
          Get this note's third location.
 java.lang.String getText()
          Get this note's text
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setPoint1(NFPoint p1)
          Set the starting location of the note.
 void setPoint2(NFPoint p2)
          Set the second note location
 void setPoint3(NFPoint p3)
          Set the third note location
 void setText(java.lang.String text)
          Set the text to display in the note.
 java.lang.String toString()
          Returns a new String object representing this note.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFNote

public NFNote()
Constructs a default note


NFNote

public NFNote(java.lang.String text,
              NFPoint point)
Constructs a note with the given text and location.

Parameters:
text - Text to show in the note.
point - X/Y location (relative to the noteset's NFAxisMap)
Method Detail

setText

public void setText(java.lang.String text)
Set the text to display in the note.

Parameters:
text - If text is unset, or set to null, any associated lines or background images will still be drawn.

setPoint1

public void setPoint1(NFPoint p1)
Set the starting location of the note.

Parameters:
p1 - If the noteset's NFArrowLine endpoint style is ELLIPSE or RECTANGLE, this will represent the first corner.

setPoint2

public void setPoint2(NFPoint p2)
Set the second note location

Parameters:
p2 - If the noteset's NFArrowLine endpoint style is ELLIPSE or RECTANGLE, this will represent the second corner. If other arrow types, this will be the end point of a line. If there are three note locations set, this will be the midpoint.

setPoint3

public void setPoint3(NFPoint p3)
Set the third note location

Parameters:
p3 - This will be the end point of a line.

getText

public java.lang.String getText()
Get this note's text

Parameters:
text - The current note text. May be null.

getPoint1

public NFPoint getPoint1()
Get this note's first location

Returns:
location of the note and/or line start.

getPoint2

public NFPoint getPoint2()
Get this note's second location.

Returns:
line midpoint or end

getPoint3

public NFPoint getPoint3()
Get this note's third location.

Returns:
line end.

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this note

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: ("text", x1, y1, x2, y2, x3, y3)

toString

public java.lang.String toString()
Returns a new String object representing this note.

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class java.lang.Object
Returns:
A new String object in the same form as that given by getCDL().

getCDL

public void getCDL(java.lang.StringBuffer sb)
Append CDL parameters representing this note to the given StringBuffer.

Parameters:
sb - Target buffer to append the CDL parameters

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in the form: ("text", x1, y1, x2, y2, x3, y3)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Does a deep copy of this note object

Overrides:
clone in class NFBaseClass
Returns:
Object
Throws:
java.lang.CloneNotSupportedException

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

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

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

Last Modified: Jun 28, 2011