From: David ‘Bombe’ Roden Date: Wed, 14 May 2008 22:05:45 +0000 (+0000) Subject: add type column X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=40aee755466b1d99bc6204112e923ed13201d89a;p=jSite2.git add type column git-svn-id: http://trooper/svn/projects/jSite/trunk@885 c3eda9e8-030b-0410-8277-bc7414b0a119 --- 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; }