Java Code Examples for org.jfree.chart.labels.ItemLabelAnchor#OUTSIDE6

The following examples show how to use org.jfree.chart.labels.ItemLabelAnchor#OUTSIDE6 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChartFactory.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a bar chart.  The chart object returned by this method uses a
 * {@link CategoryPlot} instance as the plot, with a {@link CategoryAxis}
 * for the domain axis, a {@link NumberAxis} as the range axis, and a
 * {@link BarRenderer} as the renderer.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param categoryAxisLabel  the label for the category axis
 *                           (<code>null</code> permitted).
 * @param valueAxisLabel  the label for the value axis
 *                        (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A bar chart.
 */
public static JFreeChart createBarChart(String title,
        String categoryAxisLabel, String valueAxisLabel,
        CategoryDataset dataset, boolean legend) {

    CategoryAxis categoryAxis = new CategoryAxis(categoryAxisLabel);
    ValueAxis valueAxis = new NumberAxis(valueAxisLabel);
    BarRenderer renderer = new BarRenderer();
    ItemLabelPosition position1 = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);
    renderer.setBasePositiveItemLabelPosition(position1);
    ItemLabelPosition position2 = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);
    renderer.setBaseNegativeItemLabelPosition(position2);
    renderer.setBaseToolTipGenerator(
            new StandardCategoryToolTipGenerator());
    CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis,
            renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
Example 2
Source File: Histogram.java    From chipster with MIT License 5 votes vote down vote up
private void updateHistogram() throws MicroarrayException, IOException {

		updateChipBox();

		int barCount = ((SpinnerNumberModel) barCountSpinner.getModel()).getNumber().intValue();
		String expression = ((Variable) chipBox.getSelectedItem()).getExpression();
		FloatArrayList histogram = getHistogram(barCount, expression);

		if (histogram != null) {
			CategoryDataset dataset = toCategoryDataset(histogram);

			CategoryAxis categoryAxis = new CategoryAxis("value");
			ValueAxis valueAxis = new NumberAxis("count");

			BarRenderer renderer = new BarRenderer();
			ItemLabelPosition position1 = new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);
			renderer.setBasePositiveItemLabelPosition(position1);
			ItemLabelPosition position2 = new ItemLabelPosition(ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);
			renderer.setBaseNegativeItemLabelPosition(position2);

			CategoryPlot plot = new CategoryPlot(dataset, categoryAxis, valueAxis, renderer);
			plot.setOrientation(PlotOrientation.VERTICAL);
			JFreeChart chart = new JFreeChart(data.getName(), JFreeChart.DEFAULT_TITLE_FONT, plot, false);

			visualisationPanel.removeAll();
			visualisationPanel.add(makePanel(chart), BorderLayout.CENTER);
			visualisationPanel.validate();

		} else {
			throw new IllegalArgumentException("histogram not supported for " + data.getName());
		}

	}
 
Example 3
Source File: AbstractRenderer.java    From openstock with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {
    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontMap = new HashMap<Integer, Font>();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFontMap = new HashMap<Integer, Font>();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();
}
 
Example 4
Source File: PseudoSpectraRenderer.java    From mzmine3 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Calculates the item label anchor point.
 *
 * @param anchor the anchor.
 * @param bar the bar.
 * @param orientation the plot orientation.
 *
 * @return The anchor point.
 */
private Point2D calculateLabelAnchorPoint(ItemLabelAnchor anchor, Rectangle2D bar,
    PlotOrientation orientation) {

  Point2D result = null;
  double offset = getItemLabelAnchorOffset();
  double x0 = bar.getX() - offset;
  double x1 = bar.getX();
  double x2 = bar.getX() + offset;
  double x3 = bar.getCenterX();
  double x4 = bar.getMaxX() - offset;
  double x5 = bar.getMaxX();
  double x6 = bar.getMaxX() + offset;

  double y0 = bar.getMaxY() + offset;
  double y1 = bar.getMaxY();
  double y2 = bar.getMaxY() - offset;
  double y3 = bar.getCenterY();
  double y4 = bar.getMinY() + offset;
  double y5 = bar.getMinY();
  double y6 = bar.getMinY() - offset;

  if (anchor == ItemLabelAnchor.CENTER) {
    result = new Point2D.Double(x3, y3);
  } else if (anchor == ItemLabelAnchor.INSIDE1) {
    result = new Point2D.Double(x4, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE2) {
    result = new Point2D.Double(x4, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE3) {
    result = new Point2D.Double(x4, y3);
  } else if (anchor == ItemLabelAnchor.INSIDE4) {
    result = new Point2D.Double(x4, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE5) {
    result = new Point2D.Double(x4, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE6) {
    result = new Point2D.Double(x3, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE7) {
    result = new Point2D.Double(x2, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE8) {
    result = new Point2D.Double(x2, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE9) {
    result = new Point2D.Double(x2, y3);
  } else if (anchor == ItemLabelAnchor.INSIDE10) {
    result = new Point2D.Double(x2, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE11) {
    result = new Point2D.Double(x2, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE12) {
    result = new Point2D.Double(x3, y4);
  } else if (anchor == ItemLabelAnchor.OUTSIDE1) {
    result = new Point2D.Double(x5, y6);
  } else if (anchor == ItemLabelAnchor.OUTSIDE2) {
    result = new Point2D.Double(x6, y5);
  } else if (anchor == ItemLabelAnchor.OUTSIDE3) {
    result = new Point2D.Double(x6, y3);
  } else if (anchor == ItemLabelAnchor.OUTSIDE4) {
    result = new Point2D.Double(x6, y1);
  } else if (anchor == ItemLabelAnchor.OUTSIDE5) {
    result = new Point2D.Double(x5, y0);
  } else if (anchor == ItemLabelAnchor.OUTSIDE6) {
    result = new Point2D.Double(x3, y0);
  } else if (anchor == ItemLabelAnchor.OUTSIDE7) {
    result = new Point2D.Double(x1, y0);
  } else if (anchor == ItemLabelAnchor.OUTSIDE8) {
    result = new Point2D.Double(x0, y1);
  } else if (anchor == ItemLabelAnchor.OUTSIDE9) {
    result = new Point2D.Double(x0, y3);
  } else if (anchor == ItemLabelAnchor.OUTSIDE10) {
    result = new Point2D.Double(x0, y5);
  } else if (anchor == ItemLabelAnchor.OUTSIDE11) {
    result = new Point2D.Double(x1, y6);
  } else if (anchor == ItemLabelAnchor.OUTSIDE12) {
    result = new Point2D.Double(x3, y6);
  }

  return result;

}
 
Example 5
Source File: AbstractRenderer.java    From ccu-historian with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {
    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontMap = new HashMap<Integer, Font>();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFontMap = new HashMap<Integer, Font>();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();
}
 
Example 6
Source File: AbstractRenderer.java    From SIMVA-SoS with Apache License 2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {
    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontMap = new HashMap<Integer, Font>();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFontMap = new HashMap<Integer, Font>();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();
}
 
Example 7
Source File: PseudoSpectraRenderer.java    From mzmine2 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Calculates the item label anchor point.
 *
 * @param anchor the anchor.
 * @param bar the bar.
 * @param orientation the plot orientation.
 *
 * @return The anchor point.
 */
private Point2D calculateLabelAnchorPoint(ItemLabelAnchor anchor, Rectangle2D bar,
    PlotOrientation orientation) {

  Point2D result = null;
  double offset = getItemLabelAnchorOffset();
  double x0 = bar.getX() - offset;
  double x1 = bar.getX();
  double x2 = bar.getX() + offset;
  double x3 = bar.getCenterX();
  double x4 = bar.getMaxX() - offset;
  double x5 = bar.getMaxX();
  double x6 = bar.getMaxX() + offset;

  double y0 = bar.getMaxY() + offset;
  double y1 = bar.getMaxY();
  double y2 = bar.getMaxY() - offset;
  double y3 = bar.getCenterY();
  double y4 = bar.getMinY() + offset;
  double y5 = bar.getMinY();
  double y6 = bar.getMinY() - offset;

  if (anchor == ItemLabelAnchor.CENTER) {
    result = new Point2D.Double(x3, y3);
  } else if (anchor == ItemLabelAnchor.INSIDE1) {
    result = new Point2D.Double(x4, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE2) {
    result = new Point2D.Double(x4, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE3) {
    result = new Point2D.Double(x4, y3);
  } else if (anchor == ItemLabelAnchor.INSIDE4) {
    result = new Point2D.Double(x4, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE5) {
    result = new Point2D.Double(x4, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE6) {
    result = new Point2D.Double(x3, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE7) {
    result = new Point2D.Double(x2, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE8) {
    result = new Point2D.Double(x2, y2);
  } else if (anchor == ItemLabelAnchor.INSIDE9) {
    result = new Point2D.Double(x2, y3);
  } else if (anchor == ItemLabelAnchor.INSIDE10) {
    result = new Point2D.Double(x2, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE11) {
    result = new Point2D.Double(x2, y4);
  } else if (anchor == ItemLabelAnchor.INSIDE12) {
    result = new Point2D.Double(x3, y4);
  } else if (anchor == ItemLabelAnchor.OUTSIDE1) {
    result = new Point2D.Double(x5, y6);
  } else if (anchor == ItemLabelAnchor.OUTSIDE2) {
    result = new Point2D.Double(x6, y5);
  } else if (anchor == ItemLabelAnchor.OUTSIDE3) {
    result = new Point2D.Double(x6, y3);
  } else if (anchor == ItemLabelAnchor.OUTSIDE4) {
    result = new Point2D.Double(x6, y1);
  } else if (anchor == ItemLabelAnchor.OUTSIDE5) {
    result = new Point2D.Double(x5, y0);
  } else if (anchor == ItemLabelAnchor.OUTSIDE6) {
    result = new Point2D.Double(x3, y0);
  } else if (anchor == ItemLabelAnchor.OUTSIDE7) {
    result = new Point2D.Double(x1, y0);
  } else if (anchor == ItemLabelAnchor.OUTSIDE8) {
    result = new Point2D.Double(x0, y1);
  } else if (anchor == ItemLabelAnchor.OUTSIDE9) {
    result = new Point2D.Double(x0, y3);
  } else if (anchor == ItemLabelAnchor.OUTSIDE10) {
    result = new Point2D.Double(x0, y5);
  } else if (anchor == ItemLabelAnchor.OUTSIDE11) {
    result = new Point2D.Double(x1, y6);
  } else if (anchor == ItemLabelAnchor.OUTSIDE12) {
    result = new Point2D.Double(x3, y6);
  }

  return result;

}
 
Example 8
Source File: TSNEDemo.java    From COMP6237 with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public Component getComponent(int width, int height) throws IOException {
	final JPanel base = new JPanel();
	base.setOpaque(false);
	base.setPreferredSize(new Dimension(width, height));
	base.setLayout(new BoxLayout(base, BoxLayout.Y_AXIS));

	chart = ChartFactory.createScatterPlot("", "", "", dataset, PlotOrientation.VERTICAL, false, false, false);

	final XYItemRenderer renderer = new XYLineAndShapeRenderer(false, true) {
		private static final long serialVersionUID = 1L;

		@Override
		public ItemLabelPosition getPositiveItemLabelPosition(int row, int column) {
			return new ItemLabelPosition(ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_LEFT);
		}
	};
	final Font font = Font.decode("Helvetica Neue-22");
	renderer.setBaseItemLabelFont(font);
	chart.getXYPlot().setRenderer(renderer);
	// chart.getXYPlot().getDomainAxis().setRange(-0.5, 5.5)
	chart.getXYPlot().getDomainAxis().setTickLabelFont(font);
	// chart.getXYPlot().getDomainAxis().setTickUnit(new NumberTickUnit(1))
	// chart.getXYPlot().getRangeAxis().setRange(-0.5, 5.5)
	chart.getXYPlot().getRangeAxis().setTickLabelFont(font);
	// chart.getXYPlot().getRangeAxis().setTickUnit(new NumberTickUnit(1))

	chart.getXYPlot().getRenderer().setBaseItemLabelGenerator(new StandardXYItemLabelGenerator() {
		private static final long serialVersionUID = 1L;

		@Override
		public String generateLabel(XYDataset ds, int series, int item) {
			return ((Dataset) ds).getLabel(series, item);
		};
	});
	chart.getXYPlot().getRenderer().setBaseItemLabelsVisible(true);

	chartPanel = new ChartPanel(chart);
	chart.setBackgroundPaint(new java.awt.Color(255, 255, 255, 255));
	chart.getXYPlot().setBackgroundPaint(java.awt.Color.WHITE);
	chart.getXYPlot().setRangeGridlinePaint(java.awt.Color.GRAY);
	chart.getXYPlot().setDomainGridlinePaint(java.awt.Color.GRAY);

	chartPanel.setSize(width, height - 50);
	chartPanel.setPreferredSize(chartPanel.getSize());
	base.add(chartPanel);

	final JPanel controls = new JPanel();
	controls.setPreferredSize(new Dimension(width, 50));
	controls.setMaximumSize(new Dimension(width, 50));
	controls.setSize(new Dimension(width, 50));

	controls.add(new JSeparator(SwingConstants.VERTICAL));

	runBtn = new JButton("Run t-SNE");
	runBtn.setActionCommand("button.run");
	runBtn.addActionListener(this);
	controls.add(runBtn);

	controls.add(new JSeparator(SwingConstants.VERTICAL));

	cnclBtn = new JButton("Cancel");
	cnclBtn.setEnabled(false);
	cnclBtn.setActionCommand("button.cancel");
	cnclBtn.addActionListener(this);
	controls.add(cnclBtn);

	base.add(controls);

	controls.add(new JSeparator(SwingConstants.VERTICAL));
	iterLabel = new JLabel("                         ");
	final Dimension size = iterLabel.getPreferredSize();
	iterLabel.setMinimumSize(size);
	iterLabel.setPreferredSize(size);
	controls.add(iterLabel);

	updateImage();

	return base;
}
 
Example 9
Source File: MDSDemo.java    From COMP6237 with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public Component getComponent(int width, int height) throws IOException {
	final JPanel base = new JPanel();
	base.setOpaque(false);
	base.setPreferredSize(new Dimension(width, height));
	base.setLayout(new BoxLayout(base, BoxLayout.Y_AXIS));

	chart = ChartFactory.createScatterPlot("", "", "", dataset, PlotOrientation.VERTICAL, false, false, false);

	final XYItemRenderer renderer = new XYLineAndShapeRenderer(false, true) {
		private static final long serialVersionUID = 1L;

		@Override
		public ItemLabelPosition getPositiveItemLabelPosition(int row, int column) {
			return new ItemLabelPosition(ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_LEFT);
		}
	};
	final Font font = Font.decode("Helvetica Neue-22");
	renderer.setBaseItemLabelFont(font);
	chart.getXYPlot().setRenderer(renderer);
	// chart.getXYPlot().getDomainAxis().setRange(-0.5, 5.5)
	chart.getXYPlot().getDomainAxis().setTickLabelFont(font);
	// chart.getXYPlot().getDomainAxis().setTickUnit(new NumberTickUnit(1))
	// chart.getXYPlot().getRangeAxis().setRange(-0.5, 5.5)
	chart.getXYPlot().getRangeAxis().setTickLabelFont(font);
	// chart.getXYPlot().getRangeAxis().setTickUnit(new NumberTickUnit(1))

	chart.getXYPlot().getRenderer().setBaseItemLabelGenerator(new StandardXYItemLabelGenerator() {
		private static final long serialVersionUID = 1L;

		@Override
		public String generateLabel(XYDataset ds, int series, int item) {
			return ((Dataset) ds).getLabel(series, item);
		};
	});
	chart.getXYPlot().getRenderer().setBaseItemLabelsVisible(true);

	chartPanel = new ChartPanel(chart);
	chart.setBackgroundPaint(new java.awt.Color(255, 255, 255, 255));
	chart.getXYPlot().setBackgroundPaint(java.awt.Color.WHITE);
	chart.getXYPlot().setRangeGridlinePaint(java.awt.Color.GRAY);
	chart.getXYPlot().setDomainGridlinePaint(java.awt.Color.GRAY);

	chartPanel.setSize(width, height - 50);
	chartPanel.setPreferredSize(chartPanel.getSize());
	base.add(chartPanel);

	final JPanel controls = new JPanel();
	controls.setPreferredSize(new Dimension(width, 50));
	controls.setMaximumSize(new Dimension(width, 50));
	controls.setSize(new Dimension(width, 50));

	controls.add(new JSeparator(SwingConstants.VERTICAL));
	controls.add(new JLabel("Distance:"));

	distCombo = new JComboBox<String>();
	distCombo.addItem("Euclidean");
	distCombo.addItem("1-Pearson");
	distCombo.addItem("1-Cosine");
	controls.add(distCombo);

	controls.add(new JSeparator(SwingConstants.VERTICAL));

	runBtn = new JButton("Run MDS");
	runBtn.setActionCommand("button.run");
	runBtn.addActionListener(this);
	controls.add(runBtn);

	controls.add(new JSeparator(SwingConstants.VERTICAL));

	cnclBtn = new JButton("Cancel");
	cnclBtn.setEnabled(false);
	cnclBtn.setActionCommand("button.cancel");
	cnclBtn.addActionListener(this);
	controls.add(cnclBtn);

	base.add(controls);

	controls.add(new JSeparator(SwingConstants.VERTICAL));
	iterLabel = new JLabel("                         ");
	final Dimension size = iterLabel.getPreferredSize();
	iterLabel.setMinimumSize(size);
	iterLabel.setPreferredSize(size);
	controls.add(iterLabel);

	updateImage();

	return base;
}
 
Example 10
Source File: CustomClusteredXYBarRenderer.java    From openbd-core with GNU General Public License v3.0 4 votes vote down vote up
private Point2D calculateLabelAnchorPoint(ItemLabelAnchor anchor, Rectangle2D bar, PlotOrientation orientation) {
	Point2D result = null;
	double offset = getItemLabelAnchorOffset();
	double x0 = bar.getX() - offset;
	double x1 = bar.getX();
	double x2 = bar.getX() + offset;
	double x3 = bar.getCenterX();
	double x4 = bar.getMaxX() - offset;
	double x5 = bar.getMaxX();
	double x6 = bar.getMaxX() + offset;

	double y0 = bar.getMaxY() + offset;
	double y1 = bar.getMaxY();
	double y2 = bar.getMaxY() - offset;
	double y3 = bar.getCenterY();
	double y4 = bar.getMinY() + offset;
	double y5 = bar.getMinY();
	double y6 = bar.getMinY() - offset;

	if (anchor == ItemLabelAnchor.CENTER) {
		result = new Point2D.Double(x3, y3);
	} else if (anchor == ItemLabelAnchor.INSIDE1) {
		result = new Point2D.Double(x4, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE2) {
		result = new Point2D.Double(x4, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE3) {
		result = new Point2D.Double(x4, y3);
	} else if (anchor == ItemLabelAnchor.INSIDE4) {
		result = new Point2D.Double(x4, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE5) {
		result = new Point2D.Double(x4, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE6) {
		result = new Point2D.Double(x3, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE7) {
		result = new Point2D.Double(x2, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE8) {
		result = new Point2D.Double(x2, y2);
	} else if (anchor == ItemLabelAnchor.INSIDE9) {
		result = new Point2D.Double(x2, y3);
	} else if (anchor == ItemLabelAnchor.INSIDE10) {
		result = new Point2D.Double(x2, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE11) {
		result = new Point2D.Double(x2, y4);
	} else if (anchor == ItemLabelAnchor.INSIDE12) {
		result = new Point2D.Double(x3, y4);
	} else if (anchor == ItemLabelAnchor.OUTSIDE1) {
		result = new Point2D.Double(x5, y6);
	} else if (anchor == ItemLabelAnchor.OUTSIDE2) {
		result = new Point2D.Double(x6, y5);
	} else if (anchor == ItemLabelAnchor.OUTSIDE3) {
		result = new Point2D.Double(x6, y3);
	} else if (anchor == ItemLabelAnchor.OUTSIDE4) {
		result = new Point2D.Double(x6, y1);
	} else if (anchor == ItemLabelAnchor.OUTSIDE5) {
		result = new Point2D.Double(x5, y0);
	} else if (anchor == ItemLabelAnchor.OUTSIDE6) {
		result = new Point2D.Double(x3, y0);
	} else if (anchor == ItemLabelAnchor.OUTSIDE7) {
		result = new Point2D.Double(x1, y0);
	} else if (anchor == ItemLabelAnchor.OUTSIDE8) {
		result = new Point2D.Double(x0, y1);
	} else if (anchor == ItemLabelAnchor.OUTSIDE9) {
		result = new Point2D.Double(x0, y3);
	} else if (anchor == ItemLabelAnchor.OUTSIDE10) {
		result = new Point2D.Double(x0, y5);
	} else if (anchor == ItemLabelAnchor.OUTSIDE11) {
		result = new Point2D.Double(x1, y6);
	} else if (anchor == ItemLabelAnchor.OUTSIDE12) {
		result = new Point2D.Double(x3, y6);
	}

	return result;
}
 
Example 11
Source File: AbstractRenderer.java    From ECG-Viewer with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {
    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontMap = new HashMap<Integer, Font>();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFontMap = new HashMap<Integer, Font>();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();
}
 
Example 12
Source File: AbstractRenderer.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {

    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = false;

    this.itemLabelFontList = new ObjectList();
    this.baseItemLabelFont = new Font("Tahoma", Font.PLAIN, 10);

    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPositionList = new ObjectList();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPositionList = new ObjectList();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFont = new ObjectList();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();

    this.selectedItemAttributes = new RenderAttributes();
    this.selectedItemAttributes.setDefaultFillPaint(Color.WHITE);
}
 
Example 13
Source File: AbstractRenderer.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {

    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = false;

    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = false;

    this.itemLabelFontList = new ObjectList();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPositionList = new ObjectList();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);
    
    this.negativeItemLabelPositionList = new ObjectList();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;
    
    this.listenerList = new EventListenerList();

}
 
Example 14
Source File: AbstractRenderer.java    From opensim-gui with Apache License 2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {

    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;
    
    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontList = new ObjectList();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionList = new ObjectList();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
        ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER
    );
    
    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionList = new ObjectList();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
        ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER
    );

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;
    
    this.listenerList = new EventListenerList();

}
 
Example 15
Source File: AbstractRenderer.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {
    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontMap = new HashMap<Integer, Font>();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFontMap = new HashMap<Integer, Font>();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();
}
 
Example 16
Source File: AbstractRenderer.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public AbstractRenderer() {
    this.seriesVisible = null;
    this.seriesVisibleList = new BooleanList();
    this.baseSeriesVisible = true;

    this.seriesVisibleInLegend = null;
    this.seriesVisibleInLegendList = new BooleanList();
    this.baseSeriesVisibleInLegend = true;

    this.paint = null;
    this.paintList = new PaintList();
    this.basePaint = DEFAULT_PAINT;
    this.autoPopulateSeriesPaint = true;

    this.fillPaint = null;
    this.fillPaintList = new PaintList();
    this.baseFillPaint = Color.white;
    this.autoPopulateSeriesFillPaint = false;

    this.outlinePaint = null;
    this.outlinePaintList = new PaintList();
    this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
    this.autoPopulateSeriesOutlinePaint = false;

    this.stroke = null;
    this.strokeList = new StrokeList();
    this.baseStroke = DEFAULT_STROKE;
    this.autoPopulateSeriesStroke = true;

    this.outlineStroke = null;
    this.outlineStrokeList = new StrokeList();
    this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
    this.autoPopulateSeriesOutlineStroke = false;

    this.shape = null;
    this.shapeList = new ShapeList();
    this.baseShape = DEFAULT_SHAPE;
    this.autoPopulateSeriesShape = true;

    this.itemLabelsVisible = null;
    this.itemLabelsVisibleList = new BooleanList();
    this.baseItemLabelsVisible = Boolean.FALSE;

    this.itemLabelFont = null;
    this.itemLabelFontMap = new HashMap<Integer, Font>();
    this.baseItemLabelFont = new Font("SansSerif", Font.PLAIN, 10);

    this.itemLabelPaint = null;
    this.itemLabelPaintList = new PaintList();
    this.baseItemLabelPaint = Color.black;

    this.positiveItemLabelPosition = null;
    this.positiveItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.basePositiveItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER);

    this.negativeItemLabelPosition = null;
    this.negativeItemLabelPositionMap 
            = new HashMap<Integer, ItemLabelPosition>();
    this.baseNegativeItemLabelPosition = new ItemLabelPosition(
            ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER);

    this.createEntities = null;
    this.createEntitiesList = new BooleanList();
    this.baseCreateEntities = true;

    this.defaultEntityRadius = 3;

    this.legendShapeList = new ShapeList();
    this.baseLegendShape = null;

    this.treatLegendShapeAsLine = false;

    this.legendTextFontMap = new HashMap<Integer, Font>();
    this.baseLegendTextFont = null;

    this.legendTextPaint = new PaintList();
    this.baseLegendTextPaint = null;

    this.listenerList = new EventListenerList();
}