Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2015-04-29 22:05:05 +0000
committerAlexander Kurtakov2015-04-30 06:46:52 +0000
commitf8ec8024434bafeb169686eca24cf1ab36c04f98 (patch)
tree60f055a7ee43980b325b06657807414756024fb5
parentaa85a9ad290706d8e8b26a7b876388fc890593ce (diff)
downloadorg.eclipse.linuxtools-f8ec8024434bafeb169686eca24cf1ab36c04f98.tar.gz
org.eclipse.linuxtools-f8ec8024434bafeb169686eca24cf1ab36c04f98.tar.xz
org.eclipse.linuxtools-f8ec8024434bafeb169686eca24cf1ab36c04f98.zip
Systemtap: add missing javadocs to graphing.ui.
Add javadocs to satisfy graphing.ui API requirements. Also add javadocs to some private methods for consistency. Change-Id: I285e989166dc5066774b8a35a5a6305d261cc90e Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/46820 Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/GraphingUIPlugin.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithAxisBuilder.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithoutAxisBuilder.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChart.java1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChartBuilder.java11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java5
7 files changed, 63 insertions, 32 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/GraphingUIPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/GraphingUIPlugin.java
index dc065e71fb..818a4105c8 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/GraphingUIPlugin.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/GraphingUIPlugin.java
@@ -41,7 +41,7 @@ public class GraphingUIPlugin extends AbstractUIPlugin {
}
/**
- * Returns the shared instance.
+ * @return the shared {@link GraphingUIPlugin} instance.
*/
public static GraphingUIPlugin getDefault() {
return plugin;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithAxisBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithAxisBuilder.java
index 477bcb9151..61d8c2f0ce 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithAxisBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithAxisBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2014 IBM Corporation.
+ * Copyright (c) 2010-2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Red Hat Inc - modified to handle SWTChart 0.9.0 vs 0.8.0
+ * Red Hat Inc. - modified to handle SWTChart 0.9.0 vs 0.8.0; ongoing maintenance
*******************************************************************************/
package org.eclipse.linuxtools.internal.systemtap.graphing.ui.charts;
@@ -31,8 +31,7 @@ import org.swtchart.LineStyle;
import org.swtchart.Range;
/**
- * Builds the chart with axis.
- *
+ * A {@link AbstractChartBuilder} for building a chart with axes.
* @author Qi Liang
*/
public abstract class AbstractChartWithAxisBuilder extends AbstractChartBuilder {
@@ -40,24 +39,28 @@ public abstract class AbstractChartWithAxisBuilder extends AbstractChartBuilder
private PaintListener titleBoundsPaintListener;
private double defaultMargin = 0.04;
/**
+ * @return The size of the chart's left margin.
* @since 3.0
*/
protected double getChartMarginXL() {
return defaultMargin;
}
/**
+ * @return The size of the chart's right margin.
* @since 3.0
*/
protected double getChartMarginXU() {
return defaultMargin;
}
/**
+ * @return The size of the chart's top margin.
* @since 3.0
*/
protected double getChartMarginYL() {
return defaultMargin;
}
/**
+ * @return The size of the chart's bottom margin.
* @since 3.0
*/
protected double getChartMarginYU() {
@@ -71,7 +74,9 @@ public abstract class AbstractChartWithAxisBuilder extends AbstractChartBuilder
protected int xSeriesTicks, ySeriesTicks;
/**
- * Create a chart series for that chart.
+ * Creates a chart series for this chart.
+ * @param i The index of the series to create.
+ * @return The newly created series.
*/
protected abstract ISeries createChartISeries(int i);
@@ -95,8 +100,12 @@ public abstract class AbstractChartWithAxisBuilder extends AbstractChartBuilder
}
/**
- * Constructor.
- */
+ * Constructs a builder for a chart with axes and associates it to one data set.
+ * @param adapter An {@link IAdapter} for reading from the chart's data set.
+ * @param parent The parent {@link Composite} that will contain this chart builder.
+ * @param style The style of the chart to construct.
+ * @param title The title of the chart to construct.
+ */
public AbstractChartWithAxisBuilder(IAdapter adapter, Composite parent, int style, String title) {
super(adapter, parent, style, title);
xLineGrid = store.getBoolean(GraphingPreferenceConstants.P_SHOW_X_GRID_LINES);
@@ -299,7 +308,9 @@ public abstract class AbstractChartWithAxisBuilder extends AbstractChartBuilder
}
/**
- * This updates the visible range of the chart's x-axis.
+ * Updates the visible range of the chart's x-axis.
+ * @param min The smallest x-value that should be in range.
+ * @param max The largest x-value that should be in range.
*/
private void applyRangeX(double min, double max) {
IAxis axis = chart.getAxisSet().getXAxis(0);
@@ -313,7 +324,9 @@ public abstract class AbstractChartWithAxisBuilder extends AbstractChartBuilder
}
/**
- * This updates the visible range of the chart's y-axis.
+ * Updates the visible range of the chart's y-axis.
+ * @param min The smallest y-value that should be in range.
+ * @param max The largest y-value that should be in range.
* @since 3.0
*/
protected void applyRangeY(double min, double max) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithoutAxisBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithoutAxisBuilder.java
index fbf3368109..4ef5f597bd 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithoutAxisBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/AbstractChartWithoutAxisBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation.
+ * Copyright (c) 2010-2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,26 +7,29 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Red Hat Inc. - ongoing maintenance
*******************************************************************************/
package org.eclipse.linuxtools.internal.systemtap.graphing.ui.charts;
-import org.eclipse.swt.widgets.Composite;
import org.eclipse.linuxtools.systemtap.graphing.core.adapters.IAdapter;
import org.eclipse.linuxtools.systemtap.graphing.ui.charts.AbstractChartBuilder;
+import org.eclipse.swt.widgets.Composite;
/**
- * Builds the chart with axis.
- *
+ * A {@link AbstractChartBuilder} for building a chart without axes.
* @author Qi Liang
*/
public abstract class AbstractChartWithoutAxisBuilder extends AbstractChartBuilder {
/**
- * Constructor.
+ * Constructs a builder for a chart with no axes and associates it to one data set.
+ * @param adapter An {@link IAdapter} for reading from the chart's data set.
+ * @param parent The parent {@link Composite} that will contain this chart builder.
+ * @param style The style of the chart to construct.
+ * @param title The title of the chart to construct.
*/
-
public AbstractChartWithoutAxisBuilder(IAdapter adapter, Composite parent, int style, String title) {
super(adapter, parent, style, title);
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChart.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChart.java
index 684a38a12d..09b2a6857f 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChart.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChart.java
@@ -76,6 +76,7 @@ public class BarChart extends Chart {
* Returns a list of the full (non-trimmed) label names of each bar.
* Use this instead of accessing the x-axis' category series, which
* may contain trimmed label names.
+ * @return An array containing the names of each bar in the chart.
*/
public String[] getCategorySeries() {
String[] copiedCategorySeries = null;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChartBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChartBuilder.java
index 3e9e49f33c..4f4d064669 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChartBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/internal/systemtap/graphing/ui/charts/BarChartBuilder.java
@@ -1,14 +1,13 @@
/****************************************************************
- * Copyright (c) 2006-2013 IBM Corp.
+ * Copyright (c) 2006-2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - initial API and implementation
- * Red Hat - ongoing maintenance
- *
+ * IBM Corporation - initial API and implementation
+ * Red Hat Inc. - ongoing maintenance
****************************************************************
*/
package org.eclipse.linuxtools.internal.systemtap.graphing.ui.charts;
@@ -22,11 +21,9 @@ import org.swtchart.ISeries.SeriesType;
import org.swtchart.Range;
/**
- * Builds bar chart.
- *
+ * A {@link Composite} for building a bar chart.
* @author Qi Liang
*/
-
public class BarChartBuilder extends AbstractChartWithAxisBuilder {
public static final String ID = "org.eclipse.linuxtools.systemtap.graphing.ui.charts.barchartbuilder"; //$NON-NLS-1$
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java
index 4139de4692..8e98f2b5e5 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/charts/AbstractChartBuilder.java
@@ -1,13 +1,13 @@
/****************************************************************
- * Copyright (c) 2006-2013 IBM Corp.
+ * Copyright (c) 2006-2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - initial API and implementation
- *
+ * IBM Corporation - initial API and implementation
+ * Red Hat Inc. - ongoing maintenance
****************************************************************
*/
package org.eclipse.linuxtools.systemtap.graphing.ui.charts;
@@ -34,8 +34,7 @@ import org.swtchart.Chart;
import org.swtchart.ITitle;
/**
- * Provides the common members and the framework to build one chart.
- *
+ * A {@link Composite} that provides the common members and the framework to build one chart.
* @author Qi Liang
*/
public abstract class AbstractChartBuilder extends Composite implements IUpdateListener {
@@ -132,7 +131,11 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
private IPropertyChangeListener propertyChangeListener;
/**
- * Constructs one chart builder and associate it to one data set.
+ * Constructs a chart builder and associates it to one data set.
+ * @param adapter An {@link IAdapter} for reading from the chart's data set.
+ * @param parent The parent {@link Composite} that will contain this chart builder.
+ * @param style The style of the chart to construct.
+ * @param title The title of the chart to construct.
*/
public AbstractChartBuilder(IAdapter adapter, Composite parent, int style, String title) {
super(parent, style);
@@ -258,6 +261,7 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
+ * @param scale The desired vertical scale of the chart.
* @since 3.0
*/
public void setScaleY(double scale) {
@@ -280,6 +284,7 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
+ * @param scroll The desired horizontal scroll of the chart.
* @since 3.0
*/
public void setScroll(double scroll) {
@@ -302,6 +307,7 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
+ * @param scroll The desired vertical scroll of the chart.
* @since 3.0
*/
public void setScrollY(double scroll) {
@@ -324,6 +330,10 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
+ * Converts a value into its {@link Double} equivalent.
+ * @param o The object to convert to a {@link Double}.
+ * @return The object in the form of a {@link Double}. May be <code>null</code>
+ * if conversion is not possible, or if the object was null in the first place.
* @since 3.0
*/
protected Double getDoubleOrNullValue(Object o) {
@@ -351,6 +361,7 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
+ * @param l A {@link IUpdateListener} to register with this chart.
* @since 3.0
*/
public void addUpdateListener(IUpdateListener l) {
@@ -358,6 +369,10 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
+ * @param l A previously-registered {@link IUpdateListener} to remove.
+ * @return <code>true</code> if the listener was removed,
+ * <code>false</code> otherwise (such as when the provided
+ * listener was not already registered).
* @since 3.0
*/
public boolean removeUpdateListener(IUpdateListener l) {
@@ -379,8 +394,9 @@ public abstract class AbstractChartBuilder extends Composite implements IUpdateL
}
/**
- * Given an array of label strings, returns a new array in which all duplicate labels
+ * Given an array of label name strings, returns a new array in which all duplicate labels
* have been given unique names.
+ * @param labels An array of label names.
* @return A new array containing unique label names.
* @since 3.0
*/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java
index beb79f89dd..9175e985a1 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.ui/src/org/eclipse/linuxtools/systemtap/graphing/ui/datadisplay/DataGrid.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ * Red Hat Inc. - ongoing maintenance
*******************************************************************************/
package org.eclipse.linuxtools.systemtap.graphing.ui.datadisplay;
@@ -47,8 +48,6 @@ import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
-
-
public class DataGrid implements IUpdateListener {
public static final int NONE = 0;
@@ -69,6 +68,8 @@ public class DataGrid implements IUpdateListener {
private IPropertyChangeListener propertyChangeListener;
/**
+ * @param composite The {@link Composite} in which the grid will reside.
+ * @param set The data set this grid is associated with.
* @since 3.0 set must be a IFilteredDataSet.
*/
public DataGrid(Composite composite, IFilteredDataSet set) {

Back to the top