NPlot::DateTimeAxis Class Reference

The DateTimeAxis class. More...

Inheritance diagram for NPlot::DateTimeAxis:

NPlot::Axis List of all members.

Public Member Functions

override object Clone ()
 Deep copy of DateTimeAxis.
 DateTimeAxis (Axis a)
 Constructor.
 DateTimeAxis ()
 Default Constructor.
 DateTimeAxis (double worldMin, double worldMax)
 Constructor.
 DateTimeAxis (long worldMin, long worldMax)
 Constructor.
 DateTimeAxis (DateTime worldMin, DateTime worldMax)
 Constructor.

Protected Member Functions

override void DrawTicks (Graphics g, Point physicalMin, Point physicalMax, out object labelOffset, out object boundingBox)
 Draw the ticks.

Static Protected Member Functions

static void DoClone (DateTimeAxis b, DateTimeAxis a)
 Helper method for Clone.

Properties

TimeSpan LargeTickStep
 The distance between large ticks.
TimeSpan largeTickStep_ = TimeSpan.Zero

Private Types

enum  LargeTickLabelType {
  none = 0, year = 1, month = 2, day = 3,
  hourMinute = 4, hourMinuteSeconds = 5
}

Private Member Functions

void Init ()
 Helper function for constructors.
internal override void WorldTickPositions_FirstPass (Point physicalMin, Point physicalMax, out ArrayList largeTickPositions, out ArrayList smallTickPositions)
 Determines the positions, in world coordinates, of the large ticks.
internal override void WorldTickPositions_SecondPass (Point physicalMin, Point physicalMax, ArrayList largeTickPositions, ref ArrayList smallTickPositions)
 Compute the small tick positions for largetick size of one or more years.

Private Attributes

LargeTickLabelType LargeTickLabelType_

Detailed Description

The DateTimeAxis class.

Definition at line 67 of file DateTimeAxis.cs.


Member Enumeration Documentation

enum NPlot::DateTimeAxis::LargeTickLabelType [private]
 

Enumerator:
none 
year 
month 
day 
hourMinute 
hourMinuteSeconds 

Definition at line 270 of file DateTimeAxis.cs.


Constructor & Destructor Documentation

NPlot::DateTimeAxis::DateTimeAxis Axis  a  )  [inline]
 

Constructor.

Parameters:
a Axis to construct from

Definition at line 109 of file DateTimeAxis.cs.

NPlot::DateTimeAxis::DateTimeAxis  )  [inline]
 

Default Constructor.

Definition at line 120 of file DateTimeAxis.cs.

Referenced by Clone().

NPlot::DateTimeAxis::DateTimeAxis double  worldMin,
double  worldMax
[inline]
 

Constructor.

Parameters:
worldMin World min of axis
worldMax World max of axis

Definition at line 132 of file DateTimeAxis.cs.

NPlot::DateTimeAxis::DateTimeAxis long  worldMin,
long  worldMax
[inline]
 

Constructor.

Parameters:
worldMin World min of axis
worldMax World max of axis

Definition at line 144 of file DateTimeAxis.cs.

NPlot::DateTimeAxis::DateTimeAxis DateTime  worldMin,
DateTime  worldMax
[inline]
 

Constructor.

Parameters:
worldMin World min of axis
worldMax World max of axis

Definition at line 156 of file DateTimeAxis.cs.


Member Function Documentation

override object NPlot::DateTimeAxis::Clone  )  [inline, virtual]
 

Deep copy of DateTimeAxis.

Returns:
A copy of the DateTimeAxis Class.

Reimplemented from NPlot::Axis.

Definition at line 76 of file DateTimeAxis.cs.

References DateTimeAxis().

static void NPlot::DateTimeAxis::DoClone DateTimeAxis  b,
DateTimeAxis  a
[inline, static, protected]
 

Helper method for Clone.

Parameters:
a The original object to clone.
b The cloned object.

Definition at line 94 of file DateTimeAxis.cs.

override void NPlot::DateTimeAxis::DrawTicks Graphics  g,
Point  physicalMin,
Point  physicalMax,
out object  labelOffset,
out object  boundingBox
[inline, protected, virtual]
 

Draw the ticks.

Parameters:
g The drawing surface on which to draw.
physicalMin The minimum physical extent of the axis.
physicalMax The maximum physical extent of the axis.
boundingBox out: smallest box that completely encompasses all of the ticks and tick labels.
labelOffset out: a suitable offset from the axis to draw the axis label.

Reimplemented from NPlot::Axis.

Definition at line 171 of file DateTimeAxis.cs.

void NPlot::DateTimeAxis::Init  )  [inline, private]
 

Helper function for constructors.

Do initialization here so that Clear() method is handled properly

Reimplemented from NPlot::Axis.

Definition at line 100 of file DateTimeAxis.cs.

internal override void NPlot::DateTimeAxis::WorldTickPositions_FirstPass Point  physicalMin,
Point  physicalMax,
out ArrayList  largeTickPositions,
out ArrayList  smallTickPositions
[inline, private, virtual]
 

Determines the positions, in world coordinates, of the large ticks.

No small tick marks are currently calculated by this method.

Parameters:
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
largeTickPositions ArrayList containing the positions of the large ticks.
smallTickPositions null

Reimplemented from NPlot::Axis.

Definition at line 293 of file DateTimeAxis.cs.

internal override void NPlot::DateTimeAxis::WorldTickPositions_SecondPass Point  physicalMin,
Point  physicalMax,
ArrayList  largeTickPositions,
ref ArrayList  smallTickPositions
[inline, private, virtual]
 

Compute the small tick positions for largetick size of one or more years.

  • inside the domain or the large tick positons, is take the mid-point of pairs of large ticks
  • outside the large tick range, check if a half tick is inside the world min/max This method works only if there are atleast 2 large ticks, since we don't know if its minutes, hours, month, or yearly divisor.

Parameters:
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
largeTickPositions Read in the large tick positions
smallTickPositions Fill in the corresponding small tick positions
Added by Rosco Hill

Reimplemented from NPlot::Axis.

Definition at line 611 of file DateTimeAxis.cs.


Member Data Documentation

LargeTickLabelType NPlot::DateTimeAxis::LargeTickLabelType_ [private]
 

Definition at line 282 of file DateTimeAxis.cs.


Property Documentation

TimeSpan NPlot::DateTimeAxis::LargeTickStep [get, set]
 

The distance between large ticks.

If this is set to Zero [default], this distance will be calculated automatically.

Definition at line 647 of file DateTimeAxis.cs.

TimeSpan NPlot::DateTimeAxis::largeTickStep_ = TimeSpan.Zero [private]
 

Definition at line 657 of file DateTimeAxis.cs.


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 01:04:08 2005 for NPlot by  doxygen 1.4.5