@Override public void drawActionObjects(org.geogebra.common.awt.GGraphics2D g2) { // TODO layers for Buttons and Textfields // for cross-platform UI the stroke must be reset to show buttons // properly, see #442 g2.setStroke(org.geogebra.common.euclidian.EuclidianStatic.getDefaultStroke()); evjpanel.paintChildren(org.geogebra.desktop.awt.GGraphics2DD.getAwtGraphics(g2)); // draws // Buttons // and // Textfields }
protected void drawLabel(GGraphics2D g2, GeoElement geo0, String text) { if (isLatexString(text)) { drawLatex(g2, geo0, getLabelFont(), text, xLabel, yLabel); } else { g2.setPaint(geo.getObjectColor()); EuclidianStatic.drawIndexedString( view.getApplication(), g2, text, xLabel, yLabel + getTextBottom(), false, false); } }
protected void drawOnCanvas(org.geogebra.common.awt.GGraphics2D g2, String text) { App app = view.getApplication(); setPreferredSize(getPreferredSize()); GFont vFont = view.getFont(); setLabelFont(app.getFontCanDisplay(text, false, vFont.getStyle(), getLabelFontSize())); g2.setFont(getLabelFont()); g2.setStroke(EuclidianStatic.getDefaultStroke()); g2.setPaint(geo.getObjectColor()); if (geo.isVisible()) { drawWidget(g2); } }
protected boolean measureLabel(GGraphics2D g2, GeoElement geo0, String text) { boolean latex = false; if (geo.isLabelVisible()) { latex = isLatexString(text); // no drawing, just measuring. if (latex) { GDimension d = measureLatex(g2, geo0, getLabelFont(), text); labelSize.x = d.getWidth(); labelSize.y = d.getHeight(); } else { setLabelSize( EuclidianStatic.drawIndexedString( view.getApplication(), g2, text, 0, 0, false, false, false)); } calculateBoxBounds(latex); } else { calculateBoxBounds(); } return latex; }