[virtualcommons-svn] commit/irrigation: 2 new changesets
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-02-13 23:41:15
|
2 new commits in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/4709732f981a/ changeset: 4709732f981a user: alllee date: 2012-02-14 00:40:38 summary: fixing range errors in upstream/downstream check affected #: 1 file diff -r a00ac8fd4f1039a7d84e5d31ed75f513f35b5f3a -r 4709732f981a7ec93c5b5fabdb115c89c23a6f4c src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java --- a/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java +++ b/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java @@ -112,6 +112,9 @@ } // checkRestrictedVisibility(); for (ClientData clientData : clientDataModel.getClientDataSortedByPriority()) { + if (restrictedVisibility && ! clientDataModel.isImmediateNeighbor(clientData)) { + continue; + } int priority = clientData.getPriority(); Gate gate = gates[priority]; graphics2D.setColor(Color.BLUE); @@ -162,11 +165,11 @@ int upstreamNeighborIndex = thisClientIndex - 1; int downstreamNeighborIndex = thisClientIndex + 1; for (int i = 0; i < gates.length; i++) { - if (i < upstreamNeighborIndex) { + if (i < upstreamNeighborIndex && upstreamNeighborIndex > 0) { ClientData upstreamNeighbor = sortedClients.get(upstreamNeighborIndex); gates[i].setHeight(upstreamNeighbor.getAvailableFlowCapacity()); } - else if (i > downstreamNeighborIndex) { + else if (i > downstreamNeighborIndex && downstreamNeighborIndex < sortedClients.size()) { ClientData downstreamNeighbor = sortedClients.get(downstreamNeighborIndex); gates[i].setHeight(downstreamNeighbor.getAvailableFlowCapacity()); } https://bitbucket.org/virtualcommons/irrigation/changeset/1bf48421a184/ changeset: 1bf48421a184 user: alllee date: 2012-02-14 00:40:54 summary: minor chart refinement affected #: 1 file diff -r 4709732f981a7ec93c5b5fabdb115c89c23a6f4c -r 1bf48421a184f562f675a2f0db08b66a45c32f36 src/main/java/edu/asu/commons/irrigation/client/TokenContributionChartPanel.java --- a/src/main/java/edu/asu/commons/irrigation/client/TokenContributionChartPanel.java +++ b/src/main/java/edu/asu/commons/irrigation/client/TokenContributionChartPanel.java @@ -1,6 +1,7 @@ package edu.asu.commons.irrigation.client; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Font; import java.util.List; import java.util.Map; @@ -10,6 +11,8 @@ import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.PiePlot; import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.category.CategoryDataset; @@ -92,7 +95,10 @@ private JFreeChart createBarChart(final CategoryDataset dataset) { JFreeChart chart = ChartFactory.createBarChart("Tokens Contributed", "Participant", "Tokens Invested", dataset, - PlotOrientation.HORIZONTAL, false, false, false); + PlotOrientation.VERTICAL, false, false, false); + CategoryPlot plot = chart.getCategoryPlot(); + plot.getRangeAxis().setStandardTickUnits(NumberAxis.createIntegerTickUnits()); + plot.getRenderer().setSeriesPaint(0, Color.BLUE); return chart; } Repository URL: https://bitbucket.org/virtualcommons/irrigation/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |