Search in sources :

Example 1 with CustomColumnManager

use of teamdash.wbs.columns.CustomColumnManager in project processdash by dtuma.

the class WBSTabPanel method saveOrderOfProjectSpecificCustomColumns.

/**
     * Update the project-specific custom column model so its contents match the
     * order the columns appear in the UI
     */
public void saveOrderOfProjectSpecificCustomColumns() {
    if (customColumnsTab == null)
        return;
    // get the IDs of project-specific custom columns
    CustomColumnManager colMgr = wbsTable.dataModel.getCustomColumnManager();
    Set<String> customColumnIDs = colMgr.getProjectSpecificColumnIDs();
    if (customColumnIDs.isEmpty())
        return;
    // find the order that columns appear on the custom columns tab
    List<String> columnOrder = new ArrayList<String>();
    for (int i = 0; i < customColumnsTab.getColumnCount(); i++) {
        Object oneID = customColumnsTab.getColumn(i).getIdentifier();
        if (customColumnIDs.contains(oneID))
            columnOrder.add((String) oneID);
    }
    // tell the custom column manager to rearrange the columns in its model
    colMgr.setOrderOfProjectSpecificColumns(columnOrder);
}
Also used : CustomColumnManager(teamdash.wbs.columns.CustomColumnManager) ArrayList(java.util.ArrayList)

Example 2 with CustomColumnManager

use of teamdash.wbs.columns.CustomColumnManager in project processdash by dtuma.

the class DataTableModel method buildDataColumns.

/** Create a set of data columns for this data model. */
protected void buildDataColumns(TeamMemberList teamList, TeamProcess teamProcess, WorkflowWBSModel workflows, ProxyWBSModel proxies, MilestonesWBSModel milestones, CustomColumnSpecs projectColumns, TaskDependencySource dependencySource, String currentUser) {
    addDataColumn(new WBSNodeColumn(wbsModel));
    SizeTypeColumn.createSizeColumns(this, teamProcess);
    addDataColumn(new PhaseColumn(this, teamProcess, workflows));
    memberColumnManager = new TeamMemberColumnManager(this, workflows, teamList);
    addDataColumn(new TaskSizeColumn(this, teamProcess));
    addDataColumn(new TaskSizeUnitsColumn(this, teamProcess));
    addDataColumn(new TeamTimeColumn(this));
    addDataColumn(new TeamActualTimeColumn(this, teamList));
    addDataColumn(new TaskLabelColumn(this));
    addDataColumn(new MilestoneColumn(this, milestones));
    addDataColumn(new ProxyEstTypeColumn(this, proxies));
    addDataColumn(new ProxyEstBucketColumn(this, proxies, teamProcess));
    addDataColumn(new TaskDependencyColumn(this, dependencySource, teamProcess.getIconMap()));
    addDataColumn(new NotesColumn(currentUser));
    addDataColumn(new ErrorNotesColumn(currentUser));
    addDataColumn(new PlanTimeWatcher(this));
    customColumnManager = new CustomColumnManager(this, projectColumns, teamProcess.getProcessID());
}
Also used : TaskSizeUnitsColumn(teamdash.wbs.columns.TaskSizeUnitsColumn) TaskSizeColumn(teamdash.wbs.columns.TaskSizeColumn) CustomColumnManager(teamdash.wbs.columns.CustomColumnManager) ErrorNotesColumn(teamdash.wbs.columns.ErrorNotesColumn) TeamTimeColumn(teamdash.wbs.columns.TeamTimeColumn) PhaseColumn(teamdash.wbs.columns.PhaseColumn) TeamActualTimeColumn(teamdash.wbs.columns.TeamActualTimeColumn) TaskLabelColumn(teamdash.wbs.columns.TaskLabelColumn) PlanTimeWatcher(teamdash.wbs.columns.PlanTimeWatcher) ProxyEstBucketColumn(teamdash.wbs.columns.ProxyEstBucketColumn) WBSNodeColumn(teamdash.wbs.columns.WBSNodeColumn) TeamMemberColumnManager(teamdash.wbs.columns.TeamMemberColumnManager) TaskDependencyColumn(teamdash.wbs.columns.TaskDependencyColumn) NotesColumn(teamdash.wbs.columns.NotesColumn) ErrorNotesColumn(teamdash.wbs.columns.ErrorNotesColumn) MilestoneColumn(teamdash.wbs.columns.MilestoneColumn) ProxyEstTypeColumn(teamdash.wbs.columns.ProxyEstTypeColumn)

Example 3 with CustomColumnManager

use of teamdash.wbs.columns.CustomColumnManager in project processdash by dtuma.

the class WBSTabPanel method replaceCustomColumns.

public void replaceCustomColumns(CustomColumnSpecs columns) {
    CustomColumnManager colMgr = wbsTable.dataModel.getCustomColumnManager();
    try {
        currentlyReplacingCustomColumns = true;
        colMgr.replaceProjectSpecificColumns(columns);
    } finally {
        currentlyReplacingCustomColumns = false;
    }
    // same order they were presented in the new set of specs
    if (customColumnsTab != null && !columns.isEmpty()) {
        int destPos = customColumnsTab.getColumnCount() - customColumnInsertPosDelta - columns.size();
        for (String oneID : columns.keySet()) {
            int pos = customColumnsTab.getColumnIndex(oneID);
            if (pos != -1 && pos != destPos)
                customColumnsTab.moveColumn(pos, destPos);
            destPos++;
        }
    }
}
Also used : CustomColumnManager(teamdash.wbs.columns.CustomColumnManager)

Example 4 with CustomColumnManager

use of teamdash.wbs.columns.CustomColumnManager in project processdash by dtuma.

the class WBSTabPanel method makeCustomColumnsAction.

private CustomColumnsAction makeCustomColumnsAction() {
    CustomColumnManager colMgr = wbsTable.dataModel.getCustomColumnManager();
    colMgr.addCustomColumnListener(this);
    if (!WBSPermissionManager.hasPerm("wbs.columns", "2.3.1.2"))
        return null;
    else
        return new CustomColumnsAction(this, wbsTable.dataModel, colMgr);
}
Also used : CustomColumnsAction(teamdash.wbs.columns.CustomColumnsAction) CustomColumnManager(teamdash.wbs.columns.CustomColumnManager)

Aggregations

CustomColumnManager (teamdash.wbs.columns.CustomColumnManager)4 ArrayList (java.util.ArrayList)1 CustomColumnsAction (teamdash.wbs.columns.CustomColumnsAction)1 ErrorNotesColumn (teamdash.wbs.columns.ErrorNotesColumn)1 MilestoneColumn (teamdash.wbs.columns.MilestoneColumn)1 NotesColumn (teamdash.wbs.columns.NotesColumn)1 PhaseColumn (teamdash.wbs.columns.PhaseColumn)1 PlanTimeWatcher (teamdash.wbs.columns.PlanTimeWatcher)1 ProxyEstBucketColumn (teamdash.wbs.columns.ProxyEstBucketColumn)1 ProxyEstTypeColumn (teamdash.wbs.columns.ProxyEstTypeColumn)1 TaskDependencyColumn (teamdash.wbs.columns.TaskDependencyColumn)1 TaskLabelColumn (teamdash.wbs.columns.TaskLabelColumn)1 TaskSizeColumn (teamdash.wbs.columns.TaskSizeColumn)1 TaskSizeUnitsColumn (teamdash.wbs.columns.TaskSizeUnitsColumn)1 TeamActualTimeColumn (teamdash.wbs.columns.TeamActualTimeColumn)1 TeamMemberColumnManager (teamdash.wbs.columns.TeamMemberColumnManager)1 TeamTimeColumn (teamdash.wbs.columns.TeamTimeColumn)1 WBSNodeColumn (teamdash.wbs.columns.WBSNodeColumn)1