From: <hr...@rh...> - 2008-10-09 15:38:15
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [1736] Some cleanup while I was here</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>1736</dd> <dt>Author</dt> <dd>hrupp</dd> <dt>Date</dt> <dd>2008-10-09 10:38:05 -0500 (Thu, 09 Oct 2008)</dd> </dl> <h3>Log Message</h3> <pre>Some cleanup while I was here</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguiimagechartHorizontalChartjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/HorizontalChart.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguiimagechartStackedPerformanceChartjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/StackedPerformanceChart.java</a></li> <li><a href="#rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitorvisibilityPerformanceActionjava">rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/visibility/PerformanceAction.java</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguiimagechartHorizontalChartjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/HorizontalChart.java (1735 => 1736)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/HorizontalChart.java 2008-10-09 15:37:05 UTC (rev 1735) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/HorizontalChart.java 2008-10-09 15:38:05 UTC (rev 1736) </span><span class="lines">@@ -100,10 +100,10 @@ </span><span class="cx"> String[] labels = this.getUnitLabels(); for (int i = 0; i < labels.length; i++) { </span><span class="rem">- int width = this.m_metricsLabel.stringWidth(labels[i]); </span><span class="add">+ int labelWidth = this.m_metricsLabel.stringWidth(labels[i]); </span><span class="cx"> </span><span class="rem">- if (width > maxWidth) { - maxWidth = width; </span><span class="add">+ if (labelWidth > maxWidth) { + maxWidth = labelWidth; </span><span class="cx"> } } </span><span class="lines">@@ -126,7 +126,6 @@ </span><span class="cx"> // Calculate points double dScale = this.scale(rect.width); </span><span class="rem">- int lineWidth = this.lineWidth; </span><span class="cx"> ////////////////////////////////////////////////////////// // Draw the Value (Y) Legend </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguiimagechartStackedPerformanceChartjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/StackedPerformanceChart.java (1735 => 1736)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/StackedPerformanceChart.java 2008-10-09 15:37:05 UTC (rev 1735) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/image/chart/StackedPerformanceChart.java 2008-10-09 15:38:05 UTC (rev 1736) </span><span class="lines">@@ -22,6 +22,7 @@ </span><span class="cx"> import java.awt.FontMetrics; import java.awt.Rectangle; import java.util.Iterator; </span><span class="add">+ </span><span class="cx"> import org.rhq.core.domain.measurement.MeasurementUnits; public class StackedPerformanceChart extends HorizontalChart { </span><span class="lines">@@ -66,6 +67,7 @@ </span><span class="cx"> m_destinationType = (destinationType != null) ? destinationType : DEFAULT_DESTINATION_TYPE; } </span><span class="add">+ @Override </span><span class="cx"> protected void init() { super.init(); </span><span class="lines">@@ -75,6 +77,7 @@ </span><span class="cx"> this.bottomBorder = 0; } </span><span class="add">+ @Override </span><span class="cx"> protected int calcVariableHeight() { int height = 0; </span><span class="lines">@@ -84,7 +87,7 @@ </span><span class="cx"> } // Iterator through each data set </span><span class="rem">- Iterator iterBars = this.getDataSetIterator(); </span><span class="add">+ Iterator<DataPointCollection> iterBars = this.getDataSetIterator(); </span><span class="cx"> for (int line = 0; iterBars.hasNext(); line++) { // Calculate the height PerfDataPointCollection coll = (PerfDataPointCollection) iterBars.next(); </span><span class="lines">@@ -108,6 +111,7 @@ </span><span class="cx"> return height; } </span><span class="add">+ @Override </span><span class="cx"> protected Class getDataCollectionClass() { return PerfDataPointCollection.class; } </span><span class="lines">@@ -127,6 +131,7 @@ </span><span class="cx"> return result; } </span><span class="add">+ @Override </span><span class="cx"> protected Rectangle draw(ChartGraphics g) { Rectangle rect = null; </span><span class="lines">@@ -240,6 +245,7 @@ </span><span class="cx"> m_perf.showStacked = true; } </span><span class="add">+ @Override </span><span class="cx"> public void setFormat(MeasurementUnits units) { super.setFormat(units); m_perf.setValueLegend(m_perf.getValueLegend() + " (" + m_fmtUnits + ")"); </span></pre></div> <a id="rhqtrunkmodulesenterpriseguiportalwarsrcmainjavaorgrhqenterpriseguilegacyactionresourcecommonmonitorvisibilityPerformanceActionjava"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/visibility/PerformanceAction.java (1735 => 1736)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/visibility/PerformanceAction.java 2008-10-09 15:37:05 UTC (rev 1735) +++ rhq/trunk/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/visibility/PerformanceAction.java 2008-10-09 15:38:05 UTC (rev 1736) </span><span class="lines">@@ -20,15 +20,18 @@ </span><span class="cx"> import java.util.HashMap; import java.util.Map; </span><span class="add">+ </span><span class="cx"> import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; </span><span class="add">+ </span><span class="cx"> import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; </span><span class="rem">-import org.rhq.enterprise.gui.legacy.Constants; </span><span class="add">+ </span><span class="cx"> import org.rhq.enterprise.gui.legacy.ParamConstants; </span><span class="add">+import org.rhq.enterprise.gui.legacy.RetCodeConstants; </span><span class="cx"> import org.rhq.enterprise.gui.legacy.util.ActionUtils; import org.rhq.enterprise.gui.legacy.util.SessionUtils; import org.rhq.enterprise.gui.util.WebUtility; </span><span class="lines">@@ -44,6 +47,7 @@ </span><span class="cx"> /** * Modify the metrics summary display as specified in the given <code>PerformanceForm</code>. */ </span><span class="add">+ @Override </span><span class="cx"> public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { PerformanceForm perfForm = (PerformanceForm) form; </span><span class="lines">@@ -85,6 +89,6 @@ </span><span class="cx"> String returnPath = ActionUtils.findReturnPath(mapping, params); SessionUtils.setReturnPath(request.getSession(), returnPath); </span><span class="rem">- return constructForward(request, mapping, Constants.CHART_URL, params, NO_RETURN_PATH); </span><span class="add">+ return constructForward(request, mapping, RetCodeConstants.CHART_URL, params, NO_RETURN_PATH); </span><span class="cx"> } } \ No newline at end of file </span> </pre> </div> </div> </body> </html> |