edu.swri.swiftvis.plot
Class PlotText

java.lang.Object
  extended by edu.swri.swiftvis.plot.PlotText
All Implemented Interfaces:
PlotObject, FillUser, FontUser, java.io.Serializable, javax.swing.tree.TreeNode

public class PlotText
extends java.lang.Object
implements PlotObject, FontUser, FillUser

See Also:
Serialized Form

Field Summary
private  FillOptions fillOpts
           
private  FontOptions fontOpts
           
private  PlotSpec parent
           
private  javax.swing.JPanel propPanel
           
private  float rotAngle
           
private  boolean selected
           
private static long serialVersionUID
           
private  java.lang.String text
           
private  float x
           
private  float y
           
 
Constructor Summary
  PlotText(PlotSpec spec)
           
private PlotText(PlotText c, PlotSpec spec)
           
 
Method Summary
 void applyFill(FillOptions fo)
           
 void applyFont(FontOptions fo)
           
 java.util.Enumeration<javax.swing.tree.TreeNode> children()
           
 PlotText copy(PlotSpec p)
           
 void draw(java.awt.Graphics2D g, java.awt.geom.Rectangle2D bounds)
          Draw this object on the provided graphics.
 void fireRedraw()
          Sends a message up the tree to redraw the screen.
 void forceRedraw()
          Send a message down the tree that current draw buffers are invalid.
 boolean getAllowsChildren()
           
 java.awt.geom.Rectangle2D getBoundingBox()
           
 javax.swing.tree.TreeNode getChildAt(int index)
           
 int getChildCount()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 javax.swing.tree.TreeNode getParent()
           
 javax.swing.JComponent getPropertiesPanel()
          Returns a panel that can be used to set the properties of this plot object.
 boolean isLeaf()
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void mouseClicked(java.awt.event.MouseEvent e, double mx, double my)
           
 void mouseDragged(java.awt.event.MouseEvent e, double mx, double my)
           
 void mouseMoved(java.awt.event.MouseEvent e, double mx, double my)
           
 void mousePressed(java.awt.event.MouseEvent e, double mx, double my)
           
 void mouseReleased(java.awt.event.MouseEvent e, double mx, double my)
           
 void print(java.awt.Graphics2D g, java.awt.geom.Rectangle2D bounds)
          Draw the object without buffering so it is a vector image.
 void relink(java.util.Hashtable<GraphElement,GraphElement> linkHash)
           
private  void setAngle(java.awt.AWTEvent e)
           
 void setSelected(boolean val)
           
private  void setText(java.awt.AWTEvent e)
           
private  void setX(java.awt.AWTEvent e)
           
private  void setY(java.awt.AWTEvent e)
           
 java.lang.String toString()
           
 void treeAltered(PlotObject po)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

text

private java.lang.String text

fontOpts

private FontOptions fontOpts

fillOpts

private FillOptions fillOpts

rotAngle

private float rotAngle

x

private float x

y

private float y

parent

private PlotSpec parent

propPanel

private transient javax.swing.JPanel propPanel

selected

private transient boolean selected

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

PlotText

public PlotText(PlotSpec spec)

PlotText

private PlotText(PlotText c,
                 PlotSpec spec)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

draw

public void draw(java.awt.Graphics2D g,
                 java.awt.geom.Rectangle2D bounds)
Draw this object on the provided graphics.

Specified by:
draw in interface PlotObject

print

public void print(java.awt.Graphics2D g,
                  java.awt.geom.Rectangle2D bounds)
Description copied from interface: PlotObject
Draw the object without buffering so it is a vector image.

Specified by:
print in interface PlotObject

getPropertiesPanel

public javax.swing.JComponent getPropertiesPanel()
Returns a panel that can be used to set the properties of this plot object.

Specified by:
getPropertiesPanel in interface PlotObject

treeAltered

public void treeAltered(PlotObject po)
Specified by:
treeAltered in interface PlotObject

setSelected

public void setSelected(boolean val)
Specified by:
setSelected in interface PlotObject

fireRedraw

public void fireRedraw()
Description copied from interface: PlotObject
Sends a message up the tree to redraw the screen.

Specified by:
fireRedraw in interface PlotObject

forceRedraw

public void forceRedraw()
Send a message down the tree that current draw buffers are invalid. This generally happens because data has changed.

Specified by:
forceRedraw in interface PlotObject

copy

public PlotText copy(PlotSpec p)
Specified by:
copy in interface PlotObject

relink

public void relink(java.util.Hashtable<GraphElement,GraphElement> linkHash)
Specified by:
relink in interface PlotObject

mousePressed

public void mousePressed(java.awt.event.MouseEvent e,
                         double mx,
                         double my)
Specified by:
mousePressed in interface PlotObject

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e,
                          double mx,
                          double my)
Specified by:
mouseReleased in interface PlotObject

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e,
                         double mx,
                         double my)
Specified by:
mouseClicked in interface PlotObject

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e,
                       double mx,
                       double my)
Specified by:
mouseMoved in interface PlotObject

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e,
                         double mx,
                         double my)
Specified by:
mouseDragged in interface PlotObject

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface PlotObject

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface PlotObject

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface PlotObject

children

public java.util.Enumeration<javax.swing.tree.TreeNode> children()
Specified by:
children in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int index)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

applyFont

public void applyFont(FontOptions fo)
Specified by:
applyFont in interface FontUser

applyFill

public void applyFill(FillOptions fo)
Specified by:
applyFill in interface FillUser

getBoundingBox

public java.awt.geom.Rectangle2D getBoundingBox()
Specified by:
getBoundingBox in interface FillUser

setText

private void setText(java.awt.AWTEvent e)

setX

private void setX(java.awt.AWTEvent e)

setY

private void setY(java.awt.AWTEvent e)

setAngle

private void setAngle(java.awt.AWTEvent e)