Skip to content

Commit

Permalink
whiteboard style
Browse files Browse the repository at this point in the history
  • Loading branch information
witek committed Jul 3, 2015
1 parent 3c4d680 commit 67d6692
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 95 deletions.
14 changes: 10 additions & 4 deletions src/main/java/scrum/client/tasks/TaskListWidget.java
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <wi@koczewski.de>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand All @@ -29,6 +29,7 @@
import scrum.client.sprint.Task;

import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

public class TaskListWidget extends AScrumWidget {
Expand All @@ -39,13 +40,15 @@ public class TaskListWidget extends AScrumWidget {
private TaskBlockContainer container;
private Requirement requirement;
private boolean createTaskButton;
private String color;

public TaskListWidget(Requirement requirement, TaskBlockContainer container, BlockListDropAction<Task> dropAction,
boolean createTaskButton) {
boolean createTaskButton, String color) {
this.requirement = requirement;
this.container = container;
this.dropAction = dropAction;
this.createTaskButton = createTaskButton;
this.color = color;
}

public Task getSelectedTask() {
Expand All @@ -64,6 +67,9 @@ protected Widget onInitialization() {
}

FlowPanel panel = new FlowPanel();

panel.add(new HTML("<div style='background: " + color + "; height: 3px;'></div>"));

panel.add(list);
if (createTaskButton)
panel.add(Gwt.createDiv("CreateTaskButtonWrapper",
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/scrum/client/tasks/WhiteboardWidget.java
Expand Up @@ -129,11 +129,11 @@ protected void onUpdate() {

for (Requirement requirement : requirements) {
openTasks.put(requirement, new TaskListWidget(requirement, this, new UnclaimTaskDropAction(requirement),
true));
true, "#f99"));
ownedTasks.put(requirement, new TaskListWidget(requirement, this, new ClaimTaskDropAction(requirement),
false));
false, "#ff9"));
closedTasks.put(requirement, new TaskListWidget(requirement, this, new CloseTaskDropAction(requirement),
false));
false, "#9e9"));
}

setWidget(0, 0, openLabel, "33%", "WhiteboardWidget-header");
Expand All @@ -154,9 +154,9 @@ protected void onUpdate() {
updateTaskLists(requirement);

// grid.setWidget(row, 0, new Label(requirement.getLabel()));
setWidget(row, 0, openTasks.get(requirement), null, "WhiteboardWidget-open");
setWidget(row, 1, ownedTasks.get(requirement), null, "WhiteboardWidget-owned");
setWidget(row, 2, closedTasks.get(requirement), null, "WhiteboardWidget-done");
setWidget(row, 0, openTasks.get(requirement), "33%", "WhiteboardWidget-open");
setWidget(row, 1, ownedTasks.get(requirement), "33%", "WhiteboardWidget-owned");
setWidget(row, 2, closedTasks.get(requirement), "33%", "WhiteboardWidget-done");

row++;
}
Expand Down

0 comments on commit 67d6692

Please sign in to comment.