Previous Next        Current Page: NeXtMidas Training / File Handlers / Lab 2 / Axis Definition Methods
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   
   + Introduction   
   + Lab 1   
   - Lab 2   
      - PlotFile   
      - Axis Definition Methods   
      - Other Methods   
      + Solution   


  • implements PlotFile:
    • Since we are now implementing PlotFiler we need to add implements PlotFile to the top of the class definition. For example:
      
                
  • The X-Axis:
    • In Lab 1 we implemented getXStart() and getXDelta(), now we need to add getXUnits() and getXFrame().
    • getXUnits() is looking for the units associated with the X-axis (PLOT uses this for the axis title). Since an ORANGE file does not have any units specified, we can just return Units.NONE.
    • getXFrame() gives the frame size for a 2D file. In our case we have 1D data so the x-axis frame size is 1.
  • The Y-Axis:
    • Since we only have 1D data, there is no Y-axis to speak of. So we are just going to return the default values for everything.
        public double getYStart () { return 0.0; }
        public double getYDelta () { return 1.0; }
        public int    getYUnits () { return Units.NONE; }
        public int    getYFrame () { return 1;   }
      
  • The "Primary" Axis:
    • The "primary" axis is just the main axis. Most of the time this is the X-axis, except in the case of 2D data where the Y-axis is used.
        public double getStart () { return getXStart(); }
        public double getDelta () { return getXDelta(); }
        public int    getUnits () { return getXUnits(); }
        public int    getFrame () { return getXFrame(); }
      
  • continued on next page