// * This code is licensed under:
// * jeHEP License, Version 1.0
// * - for license details see http://jehep.sourceforge.net/license.html
// *
// * Copyright (c) 2005 by S.Chekanov (chekanov@mail.desy.de).
// * All rights reserved.
package japlot;
import org.freehep.graphics2d.VectorGraphics;
import japlot.jaxodraw.*;
import java.awt.*;
import jhplot.jadraw.*;
// global methods for drawings
public class Plot {
/**
* Draw the rest
**/
public static void drawRest(JaObject jaxoOb,
VectorGraphics g2, boolean drawToScreen) {
if (jaxoOb instanceof JaAxes)
((JaAxes)jaxoOb).drawData(g2);
// then all text labels
if (jaxoOb instanceof JaText)
((JaText)jaxoOb).jaxoDraw(g2,drawToScreen);
if (jaxoOb instanceof JaTextBox)
((JaTextBox)jaxoOb).jaxoDraw(g2,drawToScreen);
// then all keys
if (jaxoOb instanceof JaKey)
((JaKey)jaxoOb).jaxoDraw(g2,drawToScreen);
}
// do not draw this
public static boolean drawFirst(JaObject jaxoOb) {
// then all text labels
if (jaxoOb instanceof JaText) return false;
if (jaxoOb instanceof JaTextBox) return false;
if (jaxoOb instanceof JaKey) return false;
return true;
}
}
Ads help maintain this website.