com.mxgraph.canvas.mxICanvas Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jgraphx Show documentation
Show all versions of jgraphx Show documentation
JGraphX Swing Component - Java Graph Visualization Library
This is a binary & source redistribution of the original, unmodified JGraphX library originating from:
"https://github.com/jgraph/jgraphx/archive/v3.4.1.3.zip".
The purpose of this redistribution is to make the library available to other Maven projects.
/**
* $Id: mxICanvas.java,v 1.23 2010/05/31 08:49:27 gaudenz Exp $
* Copyright (c) 2007-2010, Gaudenz Alder, David Benson
*/
package com.mxgraph.canvas;
import java.awt.Point;
import com.mxgraph.view.mxCellState;
/**
* Defines the requirements for a canvas that paints the vertices and edges of
* a graph.
*/
public interface mxICanvas
{
/**
* Sets the translation for the following drawing requests.
*/
void setTranslate(int x, int y);
/**
* Returns the current translation.
*
* @return Returns the current translation.
*/
Point getTranslate();
/**
* Sets the scale for the following drawing requests.
*/
void setScale(double scale);
/**
* Returns the scale.
*/
double getScale();
/**
* Draws the given cell.
*
* @param state State of the cell to be painted.
* @return Object that represents the cell.
*/
Object drawCell(mxCellState state);
/**
* Draws the given label.
*
* @param text String that represents the label.
* @param state State of the cell whose label is to be painted.
* @param html Specifies if the label contains HTML markup.
* @return Object that represents the label.
*/
Object drawLabel(String text, mxCellState state, boolean html);
}