// Path: gantt-addon/src/main/java/org/tltv/gantt/SubStepComponent.java
// public class SubStepComponent extends AbstractStepComponent {
// 
//     public SubStepComponent(StepComponent stepComponent, SubStep data) {
//         if (data.getUid() == null) {
//             data.setUid(UUID.randomUUID().toString());
//         }
//         setParent(stepComponent);
//         getState().step = data;
//     }
// 
//     @Override
//     public SubStepState getState() {
//         return (SubStepState) super.getState();
//     }
// 
//     @Override
//     public SubStepState getState(boolean markAsDirty) {
//         return (SubStepState) super.getState(markAsDirty);
//     }
// 
// }
// 
// Path: gantt-addon/src/main/java/org/tltv/gantt/client/shared/SubStepState.java
// public class SubStepState extends com.vaadin.shared.AbstractComponentState {
// 
//     public SubStep step;
// 
// }


import org.tltv.gantt.SubStepComponent;
import org.tltv.gantt.client.shared.SubStepState;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.TooltipInfo;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.ContentMode;
    public void onStateChanged(StateChangeEvent stateChangeEvent) {
        super.onStateChanged(stateChangeEvent);

        if (!(getParent() instanceof StepConnector)) {
            return;
        }

        if (step == null) {
            step = ((StepConnector) getParent()).getWidget();
            getWidget().setOwner(step);
        }

        if (stateChangeEvent.hasPropertyChanged("step")) {
            getWidget().setStep(getState().step);
        }
        if (!getWidget().getElement().hasParentElement()) {
            step.add(getWidget());
            getWidget().getOwner().updateStylesForSubSteps();
        }
        getWidget().updateWidth();
    }

    @Override
    public TooltipInfo getTooltipInfo(Element element) {
        return new TooltipInfo(getState().step.getDescription(), ContentMode.HTML, getState().errorMessage);
    }

    @Override
    public boolean hasTooltip() {
        // Normally, there is a tooltip if description or errorMessage is set
// Path: gantt-addon/src/main/java/org/tltv/gantt/SubStepComponent.java
// public class SubStepComponent extends AbstractStepComponent {
// 
//     public SubStepComponent(StepComponent stepComponent, SubStep data) {
//         if (data.getUid() == null) {
//             data.setUid(UUID.randomUUID().toString());
//         }
//         setParent(stepComponent);
//         getState().step = data;
//     }
// 
//     @Override
//     public SubStepState getState() {
//         return (SubStepState) super.getState();
//     }
// 
//     @Override
//     public SubStepState getState(boolean markAsDirty) {
//         return (SubStepState) super.getState(markAsDirty);
//     }
// 
// }
// 
// Path: gantt-addon/src/main/java/org/tltv/gantt/client/shared/SubStepState.java
// public class SubStepState extends com.vaadin.shared.AbstractComponentState {
// 
//     public SubStep step;
// 
// }


// Path: gantt-addon/src/main/java/org/tltv/gantt/client/SubStepConnector.java
import org.tltv.gantt.SubStepComponent;
import org.tltv.gantt.client.shared.SubStepState;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.TooltipInfo;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.shared.ui.Connect;
import com.vaadin.shared.ui.ContentMode;

    public void onStateChanged(StateChangeEvent stateChangeEvent) {
        super.onStateChanged(stateChangeEvent);

        if (!(getParent() instanceof StepConnector)) {
            return;
        }

        if (step == null) {
            step = ((StepConnector) getParent()).getWidget();
            getWidget().setOwner(step);
        }

        if (stateChangeEvent.hasPropertyChanged("step")) {
            getWidget().setStep(getState().step);
        }
        if (!getWidget().getElement().hasParentElement()) {
            step.add(getWidget());
            getWidget().getOwner().updateStylesForSubSteps();
        }
        getWidget().updateWidth();
    }

    @Override
    public TooltipInfo getTooltipInfo(Element element) {
        return new TooltipInfo(getState().step.getDescription(), ContentMode.HTML, getState().errorMessage);
    }

    @Override
    public boolean hasTooltip() {
        // Normally, there is a tooltip if description or errorMessage is set
        SubStepState state = getState();