From 900412ef06de45e1b9d8d18e638d143b1b35c999 Mon Sep 17 00:00:00 2001 From: GoldenGnu Date: Thu, 21 Sep 2023 13:31:51 +0200 Subject: [PATCH] New Feature: Added output volume column to the industry jobs tool (Issue #418) --- .../eve/jeveasset/data/api/my/MyIndustryJob.java | 8 ++++++++ .../gui/tabs/jobs/IndustryJobTableFormat.java | 14 ++++++++++++++ .../java/net/nikr/eve/jeveasset/i18n/TabsJobs.java | 2 ++ .../nikr/eve/jeveasset/i18n/TabsJobs.properties | 2 ++ 4 files changed, 26 insertions(+) diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java index 3505495d2..6f8d6f034 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java @@ -440,6 +440,14 @@ public String getOutputType() { return output.getTypeName(); } + public double getOutputVolume() { + if (isCopying()) { + return output.getVolumePackaged() * getRuns(); // Volume of the output blueprints (bp runs should not be counted) + } else { + return output.getVolumePackaged() * outputCount; + } + } + public String getInstaller() { return installer; } diff --git a/src/main/java/net/nikr/eve/jeveasset/gui/tabs/jobs/IndustryJobTableFormat.java b/src/main/java/net/nikr/eve/jeveasset/gui/tabs/jobs/IndustryJobTableFormat.java index adf2bee06..ddd85fbc0 100644 --- a/src/main/java/net/nikr/eve/jeveasset/gui/tabs/jobs/IndustryJobTableFormat.java +++ b/src/main/java/net/nikr/eve/jeveasset/gui/tabs/jobs/IndustryJobTableFormat.java @@ -200,6 +200,20 @@ public Object getColumnValue(final MyIndustryJob from) { return from.getOutputValue(); } }, + OUTPUT_VOLUME(Double.class, GlazedLists.comparableComparator()) { + @Override + public String getColumnName() { + return TabsJobs.get().columnOutputVolume(); + } + @Override + public String getColumnToolTip() { + return TabsJobs.get().columnOutputVolumeToolTip(); + } + @Override + public Object getColumnValue(final MyIndustryJob from) { + return from.getOutputVolume(); + } + }, OUTPUT_TYPE(String.class, GlazedLists.comparableComparator()) { @Override public String getColumnName() { diff --git a/src/main/java/net/nikr/eve/jeveasset/i18n/TabsJobs.java b/src/main/java/net/nikr/eve/jeveasset/i18n/TabsJobs.java index 12022e39d..86446b264 100644 --- a/src/main/java/net/nikr/eve/jeveasset/i18n/TabsJobs.java +++ b/src/main/java/net/nikr/eve/jeveasset/i18n/TabsJobs.java @@ -62,6 +62,8 @@ public TabsJobs(final Locale locale) { public abstract String columnRuns(); public abstract String columnOutputCount(); public abstract String columnOutputValue(); + public abstract String columnOutputVolume(); + public abstract String columnOutputVolumeToolTip(); public abstract String columnOutputType(); public abstract String columnBPO(); public abstract String columnMaterialEfficiency(); diff --git a/src/main/resources/net/nikr/eve/jeveasset/i18n/TabsJobs.properties b/src/main/resources/net/nikr/eve/jeveasset/i18n/TabsJobs.properties index 873326c28..0d42bf870 100644 --- a/src/main/resources/net/nikr/eve/jeveasset/i18n/TabsJobs.properties +++ b/src/main/resources/net/nikr/eve/jeveasset/i18n/TabsJobs.properties @@ -26,6 +26,8 @@ columnPauseDate=Paused Date columnRuns=Runs columnOutputCount=Output Count columnOutputValue=Output Value +columnOutputVolume=Output Volume +columnOutputVolumeToolTip=Total packaged volume of output items columnOutputType=Output Type columnBPO=BPO columnMaterialEfficiency=ME