|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| BorderLayoutRenderer.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* EJTools, the Enterprise Java Tools
|
|
| 3 |
*
|
|
| 4 |
* Distributable under LGPL license.
|
|
| 5 |
* See terms of license at www.gnu.org.
|
|
| 6 |
*/
|
|
| 7 |
package org.ejtools.graph.renderer;
|
|
| 8 |
|
|
| 9 |
import java.awt.BorderLayout;
|
|
| 10 |
|
|
| 11 |
import javax.swing.JComponent;
|
|
| 12 |
|
|
| 13 |
import org.ejtools.graph.DefaultGraphElement;
|
|
| 14 |
import org.ejtools.graph.GraphRenderer;
|
|
| 15 |
|
|
| 16 |
/**
|
|
| 17 |
* @author Laurent Etiemble
|
|
| 18 |
* @version $Revision: 1.6 $
|
|
| 19 |
* @todo Javadoc to complete
|
|
| 20 |
*/
|
|
| 21 |
public class BorderLayoutRenderer extends JPanelGraphRenderer |
|
| 22 |
{
|
|
| 23 |
/** Constructor for Graph. */
|
|
| 24 | 0 |
public BorderLayoutRenderer()
|
| 25 |
{
|
|
| 26 | 0 |
super(new BorderLayout()); |
| 27 | 0 |
this.element = new DefaultGraphElement(); |
| 28 |
} |
|
| 29 |
|
|
| 30 |
|
|
| 31 |
/**
|
|
| 32 |
* Sets the renderer attribute of the Graph object
|
|
| 33 |
*
|
|
| 34 |
* @param renderer The new renderer value
|
|
| 35 |
* @param position The feature to be added to the Renderer attribute
|
|
| 36 |
*/
|
|
| 37 | 0 |
public void addRenderer(GraphRenderer renderer, String position) |
| 38 |
{
|
|
| 39 | 0 |
renderer.setGraphElement(this.element);
|
| 40 | 0 |
this.renderers.add(renderer);
|
| 41 | 0 |
this.add((JComponent) renderer, position);
|
| 42 |
} |
|
| 43 |
|
|
| 44 |
} |
|
| 45 |
|
|
||||||||||