Package samer.tools

Class Trace

  • java.lang.Object
    • VCanvas
      • samer.tools.Trace
  • All Implemented Interfaces:
    java.util.Observer, Task
    Direct Known Subclasses:
    LineTrace, SignalTrace, VectorTrace


    public class Trace
    extends VCanvas
    implements java.util.Observer, Task
    Displays values of a single real variable as a trace: value vs time. The trace can be set to scroll or wrap when it reaches the right-hand edge.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected int dx 
      protected int j0 
      protected IMap map 
      protected int x1 
      protected int x2 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Trace() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear(java.awt.Graphics g) 
      void dispose() 
      void drawAxis(java.awt.Graphics g) 
      void execute(java.lang.String cmd, Environment env) 
      void getCommands(Registry r) 
      IMap getMap() 
      java.awt.Dimension getPreferredSize() 
      void paint(java.awt.Graphics g) 
      void run()
      moves the trace along one time step, by preparing space for the next bit of plotting.
      void setAxis(boolean f) 
      void setAxisColor(java.awt.Color c) 
      void setScroll(boolean f) 
      void setStep(int s) 
      protected void sized() 
      void starting() 
      void stopping() 
      void update(java.util.Observable o, java.lang.Object arg) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • dx

        protected int dx
      • j0

        protected int j0
      • map

        protected IMap map
      • x1

        protected int x1
      • x2

        protected int x2
    • Constructor Detail

      • Trace

        public Trace()
    • Method Detail

      • getMap

        public IMap getMap()
      • setScroll

        public void setScroll(boolean f)
      • setStep

        public void setStep(int s)
      • setAxisColor

        public void setAxisColor(java.awt.Color c)
      • setAxis

        public void setAxis(boolean f)
      • drawAxis

        public void drawAxis(java.awt.Graphics g)
      • paint

        public void paint(java.awt.Graphics g)
      • clear

        public void clear(java.awt.Graphics g)
      • dispose

        public void dispose()
        Specified by:
        dispose in interface Task
      • starting

        public void starting()
        Specified by:
        starting in interface Task
      • stopping

        public void stopping()
        Specified by:
        stopping in interface Task
      • run

        public void run()
        moves the trace along one time step, by preparing space for the next bit of plotting.
        Specified by:
        run in interface Task
      • update

        public void update(java.util.Observable o,
                           java.lang.Object arg)
        Specified by:
        update in interface java.util.Observer
      • getPreferredSize

        public java.awt.Dimension getPreferredSize()
      • sized

        protected void sized()
      • getCommands

        public void getCommands(Registry r)
      • execute

        public void execute(java.lang.String cmd,
                            Environment env)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception