Package clips.shedule.template

Source Code of clips.shedule.template.TimeSpanWork

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package clips.shedule.template;

import TimeTable.spans.SpanException;
import TimeTable.spans.TimeSpanAlphBtn;
import clips.delegate.directory.complex.DirectoryWorkTypeItem;
import cli_fmw.main.ClipsException;
import clips.delegate.shedule.individual.SheduleIndividualData;

/**
*
* @author axe
*/
class TimeSpanWork extends TimeSpanAlphBtn {

    private SheduleIndividualData work;
   
    public TimeSpanWork(SheduleIndividualData work) throws ClipsException {
        super(work.getBegin(), work.getWorkDuration());

        DirectoryWorkTypeItem type = work.getType();
        setColorDarken(type.getColorShadow());
        setColorLighten(type.getColorHightlight());
        setText(type.getTitle() + " (" + work.getCabinet().toString() + ") ");
       
        this.work = work;
    }

    public SheduleIndividualData getWork() {
        return work;
    }
   
    /**
     *
     * @throws cli_fmw.delegate.ClipsException
     */
    public void updateSpan() throws  SpanException, ClipsException {

        set(work.getBegin(), work.getWorkDuration());
       
        DirectoryWorkTypeItem workType = work.getType();
        setColorDarken(workType.getColorShadow());
        setColorLighten(workType.getColorHightlight());
        setText(workType.getTitle()  + " (" + work.getCabinet().toString() + ") ");
       
        fireEvent();
    }       
  
}
TOP

Related Classes of clips.shedule.template.TimeSpanWork

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.