|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| AbstractGraphRenderer.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.Graphics;
|
|
| 10 |
|
|
| 11 |
import javax.swing.JComponent;
|
|
| 12 |
|
|
| 13 |
import org.ejtools.graph.GraphElement;
|
|
| 14 |
import org.ejtools.graph.GraphRenderer;
|
|
| 15 |
|
|
| 16 |
/**
|
|
| 17 |
* @author Laurent Etiemble
|
|
| 18 |
* @version $Revision: 1.7 $
|
|
| 19 |
* @todo Javadoc to complete
|
|
| 20 |
*/
|
|
| 21 |
public abstract class AbstractGraphRenderer extends JComponent implements GraphRenderer |
|
| 22 |
{
|
|
| 23 |
/** Description of the Field */
|
|
| 24 |
protected GraphElement element = null; |
|
| 25 |
/** Description of the Field */
|
|
| 26 |
protected double horizontalScale = 1.0d; |
|
| 27 |
/** Description of the Field */
|
|
| 28 |
protected int horizontalScaling = ALIGN_RIGHT; |
|
| 29 |
/** Description of the Field */
|
|
| 30 |
protected double verticalScale = 1.0d; |
|
| 31 |
/** Description of the Field */
|
|
| 32 |
protected int verticalScaling = BOUNDED; |
|
| 33 |
|
|
| 34 |
|
|
| 35 |
/** Constructor for TrackRenderer. */
|
|
| 36 | 0 |
public AbstractGraphRenderer()
|
| 37 |
{
|
|
| 38 | 0 |
super();
|
| 39 |
} |
|
| 40 |
|
|
| 41 |
|
|
| 42 |
/**
|
|
| 43 |
* @param element The new graphElement value
|
|
| 44 |
*/
|
|
| 45 | 0 |
public void setGraphElement(GraphElement element) |
| 46 |
{
|
|
| 47 | 0 |
this.element = element;
|
| 48 |
} |
|
| 49 |
|
|
| 50 |
|
|
| 51 |
/**
|
|
| 52 |
* @param multiplier The new horizontalScale value
|
|
| 53 |
*/
|
|
| 54 | 0 |
public void setHorizontalScale(double multiplier) |
| 55 |
{
|
|
| 56 | 0 |
this.horizontalScale = multiplier;
|
| 57 |
} |
|
| 58 |
|
|
| 59 |
|
|
| 60 |
/**
|
|
| 61 |
* @param type The new horizontalScaling value
|
|
| 62 |
*/
|
|
| 63 | 0 |
public void setHorizontalScaling(int type) |
| 64 |
{
|
|
| 65 | 0 |
this.horizontalScaling = type;
|
| 66 |
} |
|
| 67 |
|
|
| 68 |
|
|
| 69 |
/**
|
|
| 70 |
* @param multiplier The new verticalScale value
|
|
| 71 |
*/
|
|
| 72 | 0 |
public void setVerticalScale(double multiplier) |
| 73 |
{
|
|
| 74 | 0 |
this.verticalScale = multiplier;
|
| 75 |
} |
|
| 76 |
|
|
| 77 |
|
|
| 78 |
/**
|
|
| 79 |
* @param type The new verticalScaling value
|
|
| 80 |
*/
|
|
| 81 | 0 |
public void setVerticalScaling(int type) { } |
| 82 |
|
|
| 83 |
|
|
| 84 |
/**
|
|
| 85 |
* @param graphics Description of the Parameter
|
|
| 86 |
*/
|
|
| 87 |
protected abstract void paintComponent(Graphics graphics); |
|
| 88 |
} |
|
| 89 |
|
|
||||||||||