
// Removes the horizontal grid from the gantt sheet.
sheet {
        horizontalGrid  : "";
}

// Customizes the vertical grid, by using a grey color for the week-end.
verticalGrid {
        weekendDisplayed : true;
        weekendColor     : lightgrey;
}

// The leaf activities use a composite graphic renderer, made of a rectangular
// shape and a text.
activity:leaf {
        class : "ilog.views.gantt.graphic.renderer.composite.IlvActivityCompositeGraphicRenderer" ;
        graphic : "@+composite" ;
        bottomMargin : "0.1" ;
}

Subobject#composite {
        class : "ilog.views.graphic.composite.IlvCompositeGraphic" ;
        layout : "@+layout" ;
        children[0] : "@+activityShape" ;
        children[1] : "@+Text" ;
        constraints[1] : "@+AttachmentText" ;
        resizingPolicy : "ResizingBase" ;
}

Subobject#layout {
        class : "ilog.views.graphic.composite.layout.IlvAttachmentLayout" ;
}

Subobject#activityShape:leaf {
        _sdmBuilder_canBeRemoved : "false" ;
        _shapeType : "rectangle" ;
        class : "ilog.views.graphic.IlvGeneralPath" ;
        fillPaint : "@#fillPaint" ;
        fillOn : "true" ;
        strokeOn : "true" ;
        stroke : "@#Stroke" ;
        strokePaint : "#000000" ;
        shape : "path \"M-10.0 -10.0L10.0 -10.0L10.0 10.0L-10.0 10.0L-10.0 -10.0z\" rule \"nonzero\" " ;
        maximumStrokeWidth : "1.0" ;
}

Subobject#Stroke:leaf {
        class : "java.awt.BasicStroke(lineWidth)" ;
        lineWidth : "2" ;
}

Subobject#fillPaint {
        class : "ilog.views.util.java2d.IlvPattern(type,foreground,background)" ;
        type : "6" ;
        foreground : "white" ;
        background : "51,51,255" ;
}

Subobject#Text {
        class : "ilog.views.graphic.IlvText" ;
        label : "@name" ;
        font : "Dialog-bold-12" ;
}

Subobject#AttachmentText {
        class : "ilog.views.graphic.composite.layout.IlvAttachmentConstraint" ;
        anchor : "RightCenter" ;
        hotSpot : "LeftCenter" ;
        offset : "10.0,0.0" ;
        relativeOffset : "false" ;
}


// The parent activities use a composite renderer, made of a summary bar and
// a label.
activity:parent {
        class           : ilog.views.gantt.graphic.renderer.IlvActivityCompositeRenderer;
        renderer[0]     : @#parentBar;
        renderer[1]     : @#parentLabel;
}

Subobject#parentBar {
        class           : ilog.views.gantt.graphic.renderer.IlvActivitySummary;
        startSymbol     : @+parentStartSymbol;
        mainBar         : @+parentMainBar;
        endSymbol       : @+parentEndSymbol;
}

Subobject#parentMainBar {
        class           : ilog.views.gantt.graphic.renderer.IlvBasicActivityBar;
        background      : black;
        foreground      : black;
        bottomMargin    : 0.5;
        toolTipText     : '@|"<html><center>Summary</center>Task: " + @name + "<br>Start: " + formatDate("MM/dd/yy",@startTime)  + "&nbsp;&nbsp;&nbsp; Duration: " + formatDuration(LARGEST_UNIT_MEDIUM,@duration) + "<br>Finish: " + formatDate("MM/dd/yy",@endTime) + "</html>"';
}

Subobject#parentStartSymbol {
        class           : ilog.views.gantt.graphic.renderer.IlvBasicActivitySymbol;
        shape           : DOWN_PENTAGON;
        foreground      : black;
        alignment       : START;
        bottomMargin    : 0.1;
        toolTipText     : '@|"<html><center>Summary</center>Task: " + @name + "<br>Start: " + formatDate("MM/dd/yy",@startTime)  + "&nbsp;&nbsp;&nbsp; Duration: " + formatDuration(LARGEST_UNIT_MEDIUM,@duration) + "<br>Finish: " + formatDate("MM/dd/yy",@endTime) + "</html>"';
}

Subobject#parentEndSymbol {
        class           : ilog.views.gantt.graphic.renderer.IlvBasicActivitySymbol;
        shape           : DOWN_PENTAGON;
        foreground      : black;
        alignment       : END;
        bottomMargin    : 0.1;
        graphic         : @; // to ignore this property
        toolTipText     : '@|"<html><center>Summary</center>Task: " + @name + "<br>Start: " + formatDate("MM/dd/yy",@startTime)  + "&nbsp;&nbsp;&nbsp; Duration: " + formatDuration(LARGEST_UNIT_MEDIUM,@duration) + "<br>Finish: " + formatDate("MM/dd/yy",@endTime) + "</html>"';
}

Subobject#parentLabel {
        class           : ilog.views.gantt.graphic.renderer.IlvBasicActivityLabel;
        label           : '@name';
        horizontalAlignment : RIGHT;
        verticalAlignment   : CENTER;
        font            : system,bold,10;
        offset          : 14;
        toolTipText     : '@|"<html><center>Summary</center>Task: " + @name + "<br>Start: " + formatDate("MM/dd/yy",@startTime)  + "&nbsp;&nbsp;&nbsp; Duration: " + formatDuration(LARGEST_UNIT_MEDIUM,@duration) + "<br>Finish: " + formatDate("MM/dd/yy",@endTime) + "</html>"';
}

// Milestone activities use a composite renderer, made of a symbol and
// a label.
activity:milestone {
        class           : ilog.views.gantt.graphic.renderer.IlvActivityCompositeRenderer;
        renderer[0]     : @#milestoneSymbol;
        renderer[1]     : @#milestoneLabel;
        graphic         : @;  // to ignore this property
        bottomMargin    : @;  // to ignore this property
}

Subobject#milestoneSymbol {
        class           : ilog.views.gantt.graphic.renderer.IlvBasicActivitySymbol;
        shape           : DIAMOND;
        background      : black;
        foreground      : black;
        topMargin       : 0.1;
        bottomMargin    : 0.1;
        graphic         : @; // to ignore this property
        toolTipText     : '@|"<html><center>Milestone</center>Task: " + @name + "<br>Start: " + formatDate("MM/dd/yy",@startTime) + "</html>"';
}

Subobject#milestoneLabel {
        class           : ilog.views.gantt.graphic.renderer.IlvBasicActivityLabel;
        label           : '@|formatDate("MM/dd",@startTime)';
        horizontalAlignment : RIGHT;
        verticalAlignment   : CENTER;
        font            : system,bold,10;
        offset          : 14;
        toolTipText     : '@|"<html><center>Milestone</center>Task: " + @name + "<br>Start: " + formatDate("MM/dd/yy",@startTime) + "</html>"';
}

// Constraints
constraint {
        class: 'ilog.views.gantt.graphic.IlvConstraintGraphic';
        foreground      : blue;
        visible         : true;
        horizontalExtremitySegmentLength : 12;
        toolTipText: '@|"<html>Task Link: " + @constraintType + "<br>From: (" + activityProperty(@fromActivity,"id") + ")&nbsp;&nbsp;" + activityProperty(@fromActivity,"name") + "<br>To: (" + activityProperty(@toActivity, "id") + ")&nbsp;&nbsp;" + activityProperty(@toActivity,"name") + "</html>"';
}
