001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: package org.cougaar.mlm.debug.ui;
028:
029: import java.awt.event.ActionListener;
030:
031: /** Interface which must be implemented by any object that wants
032: to be displayed as a bar graph.
033: */
034:
035: public interface UIBarGraphSource {
036:
037: /** Return the number of intervals to display on the x-axis.
038: @return number of x-axis intervals
039: */
040:
041: int getNumberOfXIntervals();
042:
043: /** Return the string to display beneath the x-axis.
044: @return string to display beneath the x-axis
045: */
046:
047: String getXLegend();
048:
049: /** Return the strings to display beneath the x-axis tick marks.
050: @return strings to display beneath x-axis tick marks
051: */
052:
053: String[] getXLabels();
054:
055: /** Return the number of intervals to display on the y-axis.
056: @return number of y-axis intervals
057: */
058:
059: int getNumberOfYIntervals();
060:
061: /** Return the string to display to the left of the y-axis
062: @return string to display for y-axis
063: */
064:
065: String getYLegend();
066:
067: /** Return the strings to display to the left of the y-axis tick marks
068: @return strings to display on y-axis tick marks
069: */
070:
071: String[] getYLabels();
072:
073: /** Return the strings to use in a legend explaining the vertical bar sets.
074: @return strings (one for each vertical bar) explaining the vertical bars
075: */
076:
077: String[] getLegend();
078:
079: /** Return the values to display.
080: @return sets of values for vertical bars
081: */
082:
083: int[][] getValues();
084:
085: /** Return whether or not to display the bars contiguously.
086: @return true for contiguous bars
087: */
088:
089: boolean getContiguous();
090:
091: /** Register for changes in the information displayed in the bar graph.
092: @param listener object to notify when data changes
093: */
094: void registerListener(ActionListener listener);
095:
096: /** Update the data fetched with the above methods.
097: */
098:
099: void update();
100:
101: /** Start subscription which will get data from CCV2 collection.
102: */
103:
104: void startSubscription();
105:
106: }
|