com::cosylab::gui::components::r2::chart::Interval Class Reference

Collaboration diagram for com::cosylab::gui::components::r2::chart::Interval:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Interval ()
 Interval (double min, double max)
synchronized void addIntervalListener (IntervalListener l)
boolean equals (Object o)
double getLength ()
boolean isLogaritmic ()
double length ()
double max ()
double min ()
synchronized void removeIntervalListener (IntervalListener l)
void set (double min, double max)
void set (Interval interval)
void setLogaritmic (boolean newLogaritmic)
void setMax (double max)
void setMin (double min)
void shift (double shift)
String toString ()
void unionWith (Interval interval)

Private Member Functions

void fireIntervalChange ()

Private Attributes

double min = 0.0
double max = 1.0
java.util.ArrayList list
boolean logaritmic = false

Detailed Description

This class represent interval between two values and is usually used for specification of axis scale. It can fire event to listeners, when is changed.


Constructor & Destructor Documentation

com::cosylab::gui::components::r2::chart::Interval::Interval (  )  [inline]

Interval constructor.

com::cosylab::gui::components::r2::chart::Interval::Interval ( double  min,
double  max 
) [inline]

Interval constructor, which takes as an argument minimal and maximal value of interval.


Member Function Documentation

synchronized void com::cosylab::gui::components::r2::chart::Interval::addIntervalListener ( IntervalListener  l  )  [inline]
boolean com::cosylab::gui::components::r2::chart::Interval::equals ( Object  o  )  [inline]

This method tests if compared object is instance of Interval object and if is, then tests is values of both intervals are the same.

References max(), and min().

void com::cosylab::gui::components::r2::chart::Interval::fireIntervalChange (  )  [inline, private]

References list.

Referenced by set(), setLogaritmic(), setMax(), setMin(), shift(), and unionWith().

double com::cosylab::gui::components::r2::chart::Interval::getLength (  )  [inline]

This method return length of interval.

References max(), and min().

Referenced by com::cosylab::gui::components::r2::chart::HistoryTrendPointService::transform().

boolean com::cosylab::gui::components::r2::chart::Interval::isLogaritmic (  )  [inline]

Return true if this is logaritmic interval.

Returns:
boolean true if this is logaritmic interval.

References logaritmic.

Referenced by com::cosylab::gui::components::r2::chart::DefaultChartYAxis::drawAxis(), and com::cosylab::gui::components::r2::chart::DefaultChartXAxis::drawAxis().

double com::cosylab::gui::components::r2::chart::Interval::length (  )  [inline]

This method returns value on the end of interval (maximal value).

Referenced by equals(), getLength(), length(), set(), shift(), toString(), and unionWith().

This method returns value at start of interval (minimal value).

Referenced by equals(), getLength(), length(), set(), shift(), toString(), and unionWith().

synchronized void com::cosylab::gui::components::r2::chart::Interval::removeIntervalListener ( IntervalListener  l  )  [inline]
void com::cosylab::gui::components::r2::chart::Interval::set ( Interval  interval  )  [inline]

This method change interval to parameter specified interval and fires event IntervalChange to all listeners in list.

References fireIntervalChange(), max(), and min().

void com::cosylab::gui::components::r2::chart::Interval::set ( double  min,
double  max 
) [inline]
void com::cosylab::gui::components::r2::chart::Interval::setLogaritmic ( boolean  newLogaritmic  )  [inline]

Sets this object to present logaritmic interval. Interval event is fired.

Parameters:
newLogaritmic boolean true to set logaritmic interval.

References fireIntervalChange(), and logaritmic.

void com::cosylab::gui::components::r2::chart::Interval::setMax ( double  max  )  [inline]

This method sets end of interval (maximal value) and fires event IntervalChange to all listeners in list.

References fireIntervalChange().

void com::cosylab::gui::components::r2::chart::Interval::setMin ( double  min  )  [inline]

This method sets start of interval (minimal value) and fires event IntervalChange to all listeners in list.

References fireIntervalChange().

void com::cosylab::gui::components::r2::chart::Interval::shift ( double  shift  )  [inline]

This method adds to start and end of interval parameter specified value and fires event IntervalChange to all listeners in list.

References fireIntervalChange(), max(), and min().

String com::cosylab::gui::components::r2::chart::Interval::toString (  )  [inline]

This method return string that describe this class object.

References max(), and min().

void com::cosylab::gui::components::r2::chart::Interval::unionWith ( Interval  interval  )  [inline]

If union of parameter specified interval and this interval is not just this interval, this method change this interval to union of both intervals and fires event IntervalChange to all listeners in list.

References fireIntervalChange(), max, and min.

Referenced by com::cosylab::gui::components::r2::chart::DefaultChartViewManager::setToPreferedXScale(), and com::cosylab::gui::components::r2::chart::DefaultChartViewManager::setToPreferedYScale().


Member Data Documentation

Referenced by isLogaritmic(), and setLogaritmic().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2