rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGanttSubNode Class Reference

Gantt chart subnode class. More...

#include <ilviews/gantt/gantt.h>

Inheritance diagram for IlvGanttSubNode:
IlvGanttAbstractObject

List of all members.

Public Member Functions

 IlvGanttSubNode (IlInt startMin=0, IlInt startMax=0, IlInt endMin=0, IlInt endMax=0, IlvGanttLine *line=0, IlUShort capacity=1, IlvGraphic *graphic=0, IlBoolean asBreak=IlFalse)
 Constructor.
 ~IlvGanttSubNode ()
 Destructor.
void addLock (IlInt lock)
 Adds locks to the subnode.
IlUShort getCapacity () const
 Gets the capacity of the Gantt chart subnode.
IlInt getEndMax () const
 Returns the maximum end time of the Gantt chart subnode.
IlInt getEndMin () const
 Returns the minimum end time of the Gantt chart subnode.
IlvGanttLinegetLine () const
 Gets the line associated with the Gantt chart subnode.
IlInt getLock () const
 Gets the lock flags of the subnode.
IlBoolean getModified () const
 Indicates whether the size or position of a subnode has changed.
IlInt getStartMax () const
 Returns the maximum start time of the Gantt chart subnode.
IlInt getStartMin () const
 Returns the minimum start time of the Gantt chart subnode.
IlBoolean isBreak () const
 Indicates whether the subnode is a break subnode.
void removeLock (IlInt lock)
 Removes locks from the subnode.
void setCapacity (IlUShort capacity)
 Sets the capacity of the Gantt chart subnode to capacity.
virtual void setGraphic (IlvGraphic *, IlBoolean destroyOld=IlTrue, IlBoolean redraw=IlTrue)
 Sets the graphic object displayed by this Gantt object to graphic.
void setLine (IlvGanttLine *line)
 Sets the line associated with a subnode.
void setLock (IlInt lock)
 Locks the values of the subnode.
void setModified (IlBoolean modified=IlTrue)
 Marks the subnode as modified.
IlBoolean setValues (IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax)
 Sets the start and end times of the Gantt chart subnode.

Detailed Description

Gantt chart subnode class.

Library: ilvgantt

An IlvGanttSubNode object describes a part of a Gantt activity.

Subnodes are usually used to represent the activities of resources. They can also be used to represent resource breaks. A resource break is a time span during which the resource is not available.

You create a break in the same manner as you create an activity. That is, you call the constructor of IlvGanttSubNode with the asBreak argument set to IlTrue. Then you add this subnode to the Gantt chart.

A subnode representing a break is called a break subnode. There are three differences between breaks and activities:

  1. When a break is added to a row, its graphic object is resized to take the whole height of that row.
  2. Breaks are usually drawn after activities. The graphic object representing a break is usually associated with a transparent palette. The breaks will not hide the activities.
  3. The isBreak method returns IlTrue for a break.

Because breaks are subnodes, they can be easily manipulated using Gantt chart interactors, such as IlvGanttSelectInteractor, IlvGanttDragDrapInteractor, and IlvAddNodeInteractor. IlvGanttAddNodeInteractor contains the method setAsBreak, which you can use to set a subnode as a break.

A subnode has four values, which can be locked using lock functions. A locked value cannot be changed by the Gantt interactors.

See also:
IlvGanttChart, IlvGanttAbstractObject, IlvGanttLine.

Constructor & Destructor Documentation

IlvGanttSubNode::IlvGanttSubNode ( IlInt  startMin = 0,
IlInt  startMax = 0,
IlInt  endMin = 0,
IlInt  endMax = 0,
IlvGanttLine line = 0,
IlUShort  capacity = 1,
IlvGraphic graphic = 0,
IlBoolean  asBreak = IlFalse 
)

Constructor.

The constructor initializes a new instance of the IlvGanttSubNode class with the parameters you provide. The startMin, startMax, endMin, and endMax parameters indicate the start and end times of this Gantt subnode.

Parameters:
startMin The minimum start time of the subnode.
startMax The maximum start time of the subnode.
endMin The minimum end time of the subnode.
endMax The maximum end time of the subnode.
line Set to an IlvGanttLine object if you want to associate the subnode with a Gantt line.
capacity Indicates the capacity of the subnode.
graphic Set to an IlvGraphic object if you want to have a specific graphic representation for the Gantt subnode.
asBreak If set to IlTrue, a break subnode will be constructed.
IlvGanttSubNode::~IlvGanttSubNode (  ) 

Destructor.

The destructor deletes the graphic object stored in the Gantt subnode.


Member Function Documentation

void IlvGanttSubNode::addLock ( IlInt  lock  ) 

Adds locks to the subnode.

This method does not replace the old lock flags.

Parameters:
lock The lock to add.
See also:
setLock
IlUShort IlvGanttSubNode::getCapacity (  )  const

Gets the capacity of the Gantt chart subnode.

Returns:
The capacity of the subnode.
IlInt IlvGanttSubNode::getEndMax (  )  const

Returns the maximum end time of the Gantt chart subnode.

Returns:
The maximum end time of the subnode.
IlInt IlvGanttSubNode::getEndMin (  )  const

Returns the minimum end time of the Gantt chart subnode.

Returns:
The minimum end time of the subnode.
IlvGanttLine* IlvGanttSubNode::getLine (  )  const

Gets the line associated with the Gantt chart subnode.

Returns:
The line associated with the subnode.
IlInt IlvGanttSubNode::getLock (  )  const

Gets the lock flags of the subnode.

Returns:
The lock flags.
See also:
The setLock member function.
IlBoolean IlvGanttSubNode::getModified (  )  const

Indicates whether the size or position of a subnode has changed.

Returns:
The modified flag of the subnode.
IlInt IlvGanttSubNode::getStartMax (  )  const

Returns the maximum start time of the Gantt chart subnode.

Returns:
The maximum start time of the subnode.
IlInt IlvGanttSubNode::getStartMin (  )  const

Returns the minimum start time of the Gantt chart subnode.

Returns:
The minimum start time of the subnode.
IlBoolean IlvGanttSubNode::isBreak (  )  const

Indicates whether the subnode is a break subnode.

Returns:
IlTrue if the Gantt chart subnode is a break subnode.
void IlvGanttSubNode::removeLock ( IlInt  lock  ) 

Removes locks from the subnode.

This method does not replace the old lock flags.

Parameters:
lock The lock to remove.
See also:
setLock
void IlvGanttSubNode::setCapacity ( IlUShort  capacity  ) 

Sets the capacity of the Gantt chart subnode to capacity.

Parameters:
capacity The capacity of the subnode.
virtual void IlvGanttSubNode::setGraphic ( IlvGraphic graphic,
IlBoolean  destroyOld = IlTrue,
IlBoolean  redraw = IlTrue 
) [virtual]

Sets the graphic object displayed by this Gantt object to graphic.

The previous graphic object stored will be destroyed unless the parameter destroyOld is set to IlFalse.

Parameters:
graphic The graphic object to display.
destroyOld Set to IlTrue to destroy the previous graphic object.
redraw IlTrue if the subnode is to be redrawn.

Reimplemented from IlvGanttAbstractObject.

void IlvGanttSubNode::setLine ( IlvGanttLine line  ) 

Sets the line associated with a subnode.

Parameters:
line The line to associate with the subnode.
void IlvGanttSubNode::setLock ( IlInt  lock  ) 

Locks the values of the subnode.

Use this function to lock the values of the subnode. The lock can be one or a combination of the following values:

  • ILVGANTT_NOTHING - Used to reset the subnode lock. No value will be locked.
  • ILVGANTT_STARTMIN - Used to lock the minimum start time.
  • ILVGANTT_STARTMAX - Used to lock the maximum start time.
  • ILVGANTT_ENDMIN - Used to lock the minimum end time.
  • ILVGANTT_ENDMAX - Used to lock the maximum end time.
  • ILVGANTT_LINE - Used to lock the row of the subnode. If a subnode is locked for a row it cannot be moved to other rows.
  • This function replaces the old lock flags of the subnode.
Parameters:
lock The lock value.
void IlvGanttSubNode::setModified ( IlBoolean  modified = IlTrue  ) 

Marks the subnode as modified.

When a subnode has been moved or reshaped by IlvGanttSelectInteractor, its modified flag is set to IlTrue.

Parameters:
modified IlTrue if the subnode has been modified.
IlBoolean IlvGanttSubNode::setValues ( IlInt  startMin,
IlInt  startMax,
IlInt  endMin,
IlInt  endMax 
)

Sets the start and end times of the Gantt chart subnode.

Parameters:
startMin The minimum start time of the subnode.
startMax The maximum start time of the subnode.
endMin The minimum end time of the subnode.
endMax The maximum end time of the subnode.
Returns:
An IlBoolean to indicate whether the call is successful.
 All Classes Files Functions Variables Typedefs Enumerations Friends

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.