/*
i-net software provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties
of merchantability and/or fitness for a particular purpose. This programming example
assumes that you are familiar with the programming language being demonstrated and
the tools used to create and debug procedures. i-net software support professionals
can help explain the functionality of a particular procedure, but they will not modify
these examples to provide added functionality or construct procedures to meet your
specific needs.
© i-net software 1998-2013
*/
namespace Inet.Viewer
{
///
/// A single group tree node - representing a group. Stores the level, request type (individual
/// or all nodes), number of group, request URL (for drilling down), name of group, and
/// exact position in the report.
///
public class GroupTreeNode
{
///
/// Standard expandable node
public const int TypeStandard = 2;
///
/// Non expandable node, click on this node release drilldown over this group
public const int TypeMagnifier = 3;
///
/// Hierarchical level of node in group tree
private byte level;
///
/// Type of node standard or magnifier
private byte requestType;
///
/// Number of node in group tree
private int groupNumber;
///
/// URL of current node to create a drilldown report
private string requestURL;
///
/// Displayed name of node
private string groupName;
///
/// yFrom y position in a current page, begin of GroupHeader
private float yFrom;
///
/// y position in a current page, end of GroupFooter
private float yTo;
///
/// Page number of begin of GroupHeader
private int pageFrom;
///
/// Page number of end of GroupFooter
private int pageTo;
///
/// Create an empty Group Tree Node (root node).
///
public GroupTreeNode()
{
}
///
/// Sets this group tree node's group name, level in the tree (0-based), type, group number and request URL for drill-down.
/// hierarchical level of node in group tree
/// type of current node (standard or magnifier)
/// number of node in group tree
/// url of current node to create a drilldown report
/// displayed name of node
public virtual void SetName(byte level, byte requestType, int groupNumber, string requestURL, string groupName)
{
this.level = level;
this.requestType = requestType;
this.groupNumber = groupNumber;
this.requestURL = requestURL;
this.groupName = groupName;
}
///
/// Sets the position of the group this group tree node represents - a highlight of this group should highlight from position
/// yFrom on pageFrom to yTo on pageTo.
/// y position in a current page, begin of GroupHeader
/// y position in a current page, end of GroupFooter
/// page number of begin of GroupHeader
/// page number of end of GroupFooter
public virtual void SetPosition(float yFrom, float yTo, int pageFrom, int pageTo)
{
this.yFrom = yFrom;
this.yTo = yTo;
this.pageFrom = pageFrom;
this.pageTo = pageTo;
}
/// Level of this group tree node (0-based)
public virtual byte Level
{
get
{
return level;
}
}
///
/// Type of request for this group tree node - GROUP_TREE_TYPE_INDIVIDUAL_NODE or
/// GROUPTREE_TYPE_ALL_NODES
/// type of node
///
///
public virtual byte RequestType
{
get
{
return requestType;
}
}
/// Number of the group this group tree node represents
public virtual int GroupNumber
{
get
{
return groupNumber;
}
}
/// Request URL of this group tree node if it is to be drilled down into.
public virtual string RequestURL
{
get
{
return requestURL;
}
}
/// Name of the group represented by this group tree node
public virtual string GroupName
{
get
{
return groupName;
}
}
///
/// returns the groupName
/// node name
public override string ToString()
{
return groupName;
}
/// Y position in twips of the beginning of the group on the first page this
/// group starts on.
public virtual float YFrom
{
get
{
return yFrom;
}
}
/// Y position in twips of the end of the group on the page this group ends on.
public virtual float YTo
{
get
{
return yTo;
}
}
/// Page this group starts on (1-based)
public virtual int PageFrom
{
get
{
return pageFrom;
}
}
/// Page this group ends on (1-based)
public virtual int PageTo
{
get
{
return pageTo;
}
}
}
}