use of teamdash.team.TeamMember in project processdash by dtuma.
the class WBSEditor method buildTeamMenu.
private JMenu buildTeamMenu(String initials, DataTableModel dataModel) {
JMenu result = new JMenu("Team");
result.setMnemonic('T');
if (isMode(MODE_PLAIN))
result.add(new ShowTeamMemberListEditorMenuItem());
TeamMember m = null;
if (initials != null)
m = teamProject.getTeamMemberList().findTeamMember(initials);
if (m != null) {
if (!readOnly) {
WatchCoworkerTimesMenuItem watchMenu = new WatchCoworkerTimesMenuItem(dataModel);
result.add(new OptimizeEditingForIndivMenuItem(m, watchMenu));
result.add(watchMenu);
}
// make nodes visible if they have a data problem and they are
// assigned to this user
ErrorNotesColumn.showNodesWithErrors(teamProject.getWBS(), null, new AssignedToMemberTest(dataModel, m));
}
result.add(new ShowTeamTimePanelMenuItem());
if (showActualData) {
ButtonGroup g = new ButtonGroup();
result.add(new BottomUpShowReplanMenuItem(g));
result.add(new BottomUpShowPlanMenuItem(g));
}
if (isMode(MODE_PLAIN)) {
result.add(new SubteamBalancingMenu(teamProject.getTeamMemberList(), teamTimePanel, dirtyListener, showTeamTimePanelMenuItem, guiPrefs));
result.add(new BottomUpShowBalancedTeamBar());
result.add(new BottomUpShowHoursPerWeekMenuItem());
result.add(new BottomUpIncludeUnassignedMenuItem());
}
return result;
}
use of teamdash.team.TeamMember in project processdash by dtuma.
the class WBSSynchronizer method run.
public void run() {
effectiveDate = new Date(0);
createdNewTasks = foundActualData = needsWbsEvent = false;
foundActualSizeData = sizeDataIncomplete = false;
Element directDumpData = getDirectDumpData();
Map<String, File> exportFiles = getExportFiles();
nodeMap = teamProject.getWBS().getNodeMap();
clientIdMap = buildClientIdMap(teamProject.getWBS());
WBSNode wbsRoot = teamProject.getWBS().getRoot();
wbsRoot.setAttribute(SYNC_IN_PROGRESS_ATTR, Boolean.TRUE);
maxPastClientIDs = buildMaxClientIdMap(wbsRoot);
Map<String, String> datasetIDMap = new HashMap<String, String>();
for (Iterator i = teamProject.getTeamMemberList().getTeamMembers().iterator(); i.hasNext(); ) {
TeamMember m = (TeamMember) i.next();
Element dump = getUserDumpData(m, exportFiles, directDumpData);
addDatasetIdMapping(datasetIDMap, dump);
syncTeamMember(m, dump);
if (dump == directDumpData)
reloadedMemberNames.remove(m.getName());
}
if (createMissingTeamMembers)
addMissingTeamMembers(exportFiles, datasetIDMap);
UserGroupManagerWBS.getInstance().addDatasetIDMappings(finalizeDatasetIdMappings(datasetIDMap));
wbsRoot.setAttribute(EFFECTIVE_DATE_ATTR, effectiveDate);
wbsRoot.removeAttribute(SYNC_IN_PROGRESS_ATTR);
int col = dataModel.findColumn(TeamActualTimeColumn.COLUMN_ID);
dataModel.columnChanged(dataModel.getColumn(col));
if (needsWbsEvent)
teamProject.getWBS().fireTableRowsUpdated(0, 0);
nodeMap = null;
clientIdMap = null;
maxPastClientIDs = null;
}
use of teamdash.team.TeamMember in project processdash by dtuma.
the class TeamMemberColumnManager method createColumns.
/** Create or recreate TeamMemberTimeColumn objects for each team member
*/
private void createColumns() {
List<TeamMemberTimeColumn> obsoletePlanTimeColumns = planTimeColumnList;
List<TeamMemberActualTimeColumn> obsoleteActualTimeColumns = actualTimeColumnList;
ArrayList newColumns = new ArrayList();
planTimeColumnList = new ArrayList<TeamMemberTimeColumn>();
actualTimeColumnList = new ArrayList<TeamMemberActualTimeColumn>();
Iterator teamMembers = teamList.getTeamMembers().iterator();
while (teamMembers.hasNext()) {
// Loop through the list of team members.
TeamMember m = (TeamMember) teamMembers.next();
// try to find a preexisting planned time column for this team member.
TeamMemberTimeColumn planTimeCol = getExistingValidTimeColumn(obsoletePlanTimeColumns, m);
if (planTimeCol == null) {
// create a new column for this team member.
planTimeCol = new TeamMemberTimeColumn(dataModel, m);
newColumns.add(planTimeCol);
}
// add the column to our master list.
planTimeColumnList.add(planTimeCol);
// try to find a preexisting actual time column for this team member.
TeamMemberActualTimeColumn actualTimeCol = getExistingValidTimeColumn(obsoleteActualTimeColumns, m);
if (actualTimeCol == null) {
// create a new column for this team member.
actualTimeCol = new TeamMemberActualTimeColumn(m);
newColumns.add(actualTimeCol);
}
// add the column to our master list.
actualTimeColumnList.add(actualTimeCol);
}
// make the changes to the columns in the data model.
if (!newColumns.isEmpty() || !obsoletePlanTimeColumns.isEmpty() || !obsoleteActualTimeColumns.isEmpty()) {
List obsoleteColumns = new ArrayList();
obsoleteColumns.addAll(obsoletePlanTimeColumns);
obsoleteColumns.addAll(obsoleteActualTimeColumns);
dataModel.addRemoveDataColumns(newColumns, obsoleteColumns);
}
// alert any listeners that have registered interest
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : listeners) l.stateChanged(e);
}
use of teamdash.team.TeamMember in project processdash by dtuma.
the class TeamActualTimeColumn method refreshTeam.
private void refreshTeam() {
List people = teamMembers.getTeamMembers();
teamSize = people.size();
initials = new String[teamSize];
nodeTimeAttrs = new String[teamSize];
actTimeAttrs = new String[teamSize];
completionDateAttrs = new String[teamSize];
subtaskDataAttrs = new String[teamSize];
planTimeAttrs = new String[teamSize];
assignedWithZeroAttrs = new String[teamSize];
matchesTeamFilter = new boolean[teamSize];
for (int i = 0; i < initials.length; i++) {
TeamMember m = (TeamMember) people.get(i);
initials[i] = m.getInitials();
nodeTimeAttrs[i] = TeamMemberActualTimeColumn.getNodeDataAttrName(m);
actTimeAttrs[i] = TeamMemberActualTimeColumn.getResultDataAttrName(m);
completionDateAttrs[i] = TeamCompletionDateColumn.getMemberNodeDataAttrName(m);
subtaskDataAttrs[i] = TeamMemberActualTimeColumn.getSubtaskDataAttrName(m);
planTimeAttrs[i] = TopDownBottomUpColumn.getTopDownAttrName(TeamMemberTimeColumn.getColumnID(m));
assignedWithZeroAttrs[i] = TeamTimeColumn.getMemberAssignedZeroAttrName(m);
matchesTeamFilter[i] = teamFilter == null || teamFilter.include(m);
}
}
use of teamdash.team.TeamMember in project processdash by dtuma.
the class TeamProjectBottomUp method getTeamMemberInitials.
private List getTeamMemberInitials(TeamProject proj) {
List result = new LinkedList();
List teamMembers = proj.getTeamMemberList().getTeamMembers();
for (Iterator i = teamMembers.iterator(); i.hasNext(); ) {
TeamMember t = (TeamMember) i.next();
result.add(t.getInitials());
}
return result;
}
Aggregations