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);
}
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());
}
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++;
}
}
}
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);
}
Aggregations