From 40aee755466b1d99bc6204112e923ed13201d89a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 14 May 2008 22:05:45 +0000 Subject: [PATCH] add type column git-svn-id: http://trooper/svn/projects/jSite/trunk@885 c3eda9e8-030b-0410-8277-bc7414b0a119 --- src/net/pterodactylus/jsite/gui/RequestTableModel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/net/pterodactylus/jsite/gui/RequestTableModel.java b/src/net/pterodactylus/jsite/gui/RequestTableModel.java index c238cb1..1c37437 100644 --- a/src/net/pterodactylus/jsite/gui/RequestTableModel.java +++ b/src/net/pterodactylus/jsite/gui/RequestTableModel.java @@ -29,6 +29,7 @@ import java.util.logging.Logger; import javax.swing.table.AbstractTableModel; import net.pterodactylus.jsite.core.Request; +import net.pterodactylus.jsite.core.Request.Type; import net.pterodactylus.util.logging.Logging; /** @@ -46,7 +47,7 @@ public class RequestTableModel extends AbstractTableModel implements PropertyCha private static final Logger logger = Logging.getLogger(RequestTableModel.class.getName()); /** The column names. */ - private static final String[] COLUMN_NAMES = new String[] { "ID", "Progress" }; + private static final String[] COLUMN_NAMES = new String[] { "ID", "Progress", "Type" }; /** The requests. */ private final List requests = Collections.synchronizedList(new ArrayList()); @@ -121,6 +122,8 @@ public class RequestTableModel extends AbstractTableModel implements PropertyCha return "unknown"; } return String.valueOf((request.getSuccessfulBlocks() * 10000 / request.getRequiredBlocks()) / 100.0) + "%"; + case 2: + return ((request.getType() != null) ? request.getType() : Type.unknown).name(); } return null; } -- 2.7.4