Rogue Wave Views
Gantt Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvGanttSubNode Class Reference

Gantt chart subnode class. More...

#include <ilviews/gantt/gantt.h>

Inheritance diagram for IlvGanttSubNode:
IlvGanttAbstractObject IlvValueInterface

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. More...
 
 ~IlvGanttSubNode ()
 Destructor. More...
 
void addLock (IlInt lock)
 Adds locks to the subnode. More...
 
IlUShort getCapacity () const
 Gets the capacity of the Gantt chart subnode. More...
 
IlInt getEndMax () const
 Returns the maximum end time of the Gantt chart subnode. More...
 
IlInt getEndMin () const
 Returns the minimum end time of the Gantt chart subnode. More...
 
IlvGanttLinegetLine () const
 Gets the line associated with the Gantt chart subnode. More...
 
IlInt getLock () const
 Gets the lock flags of the subnode. More...
 
IlBoolean getModified () const
 Indicates whether the size or position of a subnode has changed. More...
 
IlInt getStartMax () const
 Returns the maximum start time of the Gantt chart subnode. More...
 
IlInt getStartMin () const
 Returns the minimum start time of the Gantt chart subnode. More...
 
IlBoolean isBreak () const
 Indicates whether the subnode is a break subnode. More...
 
void removeLock (IlInt lock)
 Removes locks from the subnode. More...
 
void setCapacity (IlUShort capacity)
 Sets the capacity of the Gantt chart subnode to capacity. More...
 
virtual void setGraphic (IlvGraphic *, IlBoolean destroyOld=IlTrue, IlBoolean redraw=IlTrue)
 Sets the graphic object displayed by this Gantt object to graphic. More...
 
void setLine (IlvGanttLine *line)
 Sets the line associated with a subnode. More...
 
void setLock (IlInt lock)
 Locks the values of the subnode. More...
 
void setModified (IlBoolean modified=IlTrue)
 Marks the subnode as modified. More...
 
IlBoolean setValues (IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax)
 Sets the start and end times of the Gantt chart subnode. More...
 
- Public Member Functions inherited from IlvGanttAbstractObject
 IlvGanttAbstractObject (const char *name=0, IlBoolean copy=IlTrue, IlvGraphic *graphic=0)
 Constructor. More...
 
virtual ~IlvGanttAbstractObject ()
 Destructor. More...
 
IlAny getClientData () const
 Gets the client data if any has been set. More...
 
IlvGraphicgetGraphic () const
 Gets the graphic object stored in the Gantt object. More...
 
const char * getName () const
 Gets the name stored in the Gantt object. More...
 
void setClientData (IlAny data)
 Sets the new client data in this Gantt object. More...
 
void setName (const char *name, IlBoolean copy=IlTrue)
 Sets the name of the Gantt object. More...
 

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
startMinThe minimum start time of the subnode.
startMaxThe maximum start time of the subnode.
endMinThe minimum end time of the subnode.
endMaxThe maximum end time of the subnode.
lineSet to an IlvGanttLine object if you want to associate the subnode with a Gantt line.
capacityIndicates the capacity of the subnode.
graphicSet to an IlvGraphic object if you want to have a specific graphic representation for the Gantt subnode.
asBreakIf 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
lockThe 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
lockThe lock to remove.
See also
setLock
void IlvGanttSubNode::setCapacity ( IlUShort  capacity)

Sets the capacity of the Gantt chart subnode to capacity.

Parameters
capacityThe 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
graphicThe graphic object to display.
destroyOldSet to IlTrue to destroy the previous graphic object.
redrawIlTrue if the subnode is to be redrawn.

Reimplemented from IlvGanttAbstractObject.

void IlvGanttSubNode::setLine ( IlvGanttLine line)

Sets the line associated with a subnode.

Parameters
lineThe 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
lockThe 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
modifiedIlTrue 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
startMinThe minimum start time of the subnode.
startMaxThe maximum start time of the subnode.
endMinThe minimum end time of the subnode.
endMaxThe maximum end time of the subnode.
Returns
An IlBoolean to indicate whether the call is successful.

© Copyright 2016, 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.