⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resourcesrendererimpl.java

📁 It is all about project scheduling. GanttProject is a tool for creating a project schedule by means
💻 JAVA
字号:
/* * Created on 03.12.2004 */package net.sourceforge.ganttproject.chart;import java.util.List;import net.sourceforge.ganttproject.chart.GraphicPrimitiveContainer.Text;import net.sourceforge.ganttproject.task.ResourceAssignment;import net.sourceforge.ganttproject.task.Task;import net.sourceforge.ganttproject.time.TimeFrame;import net.sourceforge.ganttproject.time.TimeUnit;/** * @author bard */public class ResourcesRendererImpl extends ChartRendererBase implements        TimeUnitVisitor {    public ResourcesRendererImpl(ChartModelImpl model) {        super(model);        // TODO Auto-generated constructor stub    }    public void beforeProcessingTimeFrames() {        // TODO Auto-generated method stub    }    public void afterProcessingTimeFrames() {        List visibleTasks = ((ChartModelImpl) getChartModel())                .getVisibleTasks();        int bottomY = getConfig().getRowHeight();        for (int i = 0; i < visibleTasks.size(); i++) {            Task nextTask = (Task) visibleTasks.get(i);            ResourceAssignment[] assignments = nextTask.getAssignments();            if (assignments.length > 0) {                StringBuffer resources = new StringBuffer();                for (int j = 0; j < assignments.length; j++) {                    resources.append(assignments[j].getResource().getName());                    if (j < assignments.length - 1) {                        resources.append(", ");                    }                }                Text text = getPrimitiveContainer().createText(0, bottomY,                        resources.toString());                text.setStyle("task.resources");            }            bottomY += getConfig().getRowHeight();        }    }    public void startTimeFrame(TimeFrame timeFrame) {        // TODO Auto-generated method stub    }    public void endTimeFrame(TimeFrame timeFrame) {        // TODO Auto-generated method stub    }    public void startUnitLine(TimeUnit timeUnit) {        // TODO Auto-generated method stub    }    public void endUnitLine(TimeUnit timeUnit) {        // TODO Auto-generated method stub    }    public void nextTimeUnit(int unitIndex) {        // TODO Auto-generated method stub    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -