use of org.knime.base.node.viz.plotter.Axis in project knime-core by knime.
the class ScatterMatrixDrawingPane method paintHorizontalCoordinate.
/**
* Paints the horizontal coordinates of the matrix elements at the border
* of the drawing pane.
*
* @param g graphics
* @param element the element to provide position and coordinate
* @param y y position
* @param top true if the coordinate is painted at the top.
*/
protected void paintHorizontalCoordinate(final Graphics g, final ScatterMatrixElement element, final int y, final boolean top) {
Axis paintAxis = new Axis(Axis.HORIZONTAL, element.getWidth(), top);
paintAxis.setCoordinate(element.getXCoordinate());
int axisX = element.getCorner().x;
g.translate(axisX, y);
paintAxis.paintComponent(g);
g.translate(-axisX, -y);
}
use of org.knime.base.node.viz.plotter.Axis in project knime-core by knime.
the class ScatterMatrixDrawingPane method paintVerticalCoordinate.
/**
* Paints the vertical coordinates at the border of the drawing pane.
*
* @param g graphics
* @param element element to provide position and coordinate
* @param x the x position
* @param left true if the coordinate is painted on the left side.
*/
protected void paintVerticalCoordinate(final Graphics g, final ScatterMatrixElement element, final int x, final boolean left) {
Axis paintAxis = new Axis(Axis.VERTICAL, element.getHeight(), !left);
paintAxis.setCoordinate(element.getYCoordinate());
int axisY = element.getCorner().y;
int transX = x - Axis.SIZE;
g.translate(transX, axisY);
paintAxis.paintComponent(g);
g.translate(-transX, -axisY);
}
Aggregations