@Override protected void updateSizeKeepDrawables() { // record the old coord system setWidth(getWidth()); setHeight(getHeight()); if ((getWidth() <= 0) || (getHeight() <= 0)) { return; } // real world values companion.setXYMinMaxForUpdateSize(); setRealWorldBounds(); // ================================================ // G.Sturr 8/27/10: test: rescale on window resize // // reset the coord system so that our view dimensions are restored // using the new scaling factors. // setRealWorldCoordSystem(xminTemp, xmaxTemp, yminTemp, ymaxTemp); GraphicsConfiguration gconf = evjpanel.getGraphicsConfiguration(); try { createImage(gconf); } catch (OutOfMemoryError e) { bgImage = null; bgGraphics = null; } updateBackgroundImage(); }
@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 }
/** * @see JPanel#dispatchEvent(AWTEvent) * @param componentEvent component event */ public void dispatchEvent(ComponentEvent componentEvent) { evjpanel.dispatchEvent(componentEvent); }
/** @see JPanel#revalidate() */ public void revalidate() { evjpanel.revalidate(); }
/** @param cursor new cursor */ public void setCursor(Cursor cursor) { evjpanel.setCursor(cursor); }
public int getWidth() { return evjpanel.getWidth(); }
/** * Initializes this panel * * @param repaint ignored parameter */ protected void initPanel(boolean repaint) { // preferred size evjpanel.setPreferredSize(null); }
/** @return prefered size */ public Dimension getPreferredSize() { return evjpanel.getPreferredSize(); }
/** @return mouse position */ public java.awt.Point getMousePosition() { return evjpanel.getMousePosition(); }
@Override public GFont getFont() { // TODO Auto-generated method stub return new org.geogebra.desktop.awt.GFontD(evjpanel.getFont()); }
/** This view should be focused */ public void requestFocus() { evjpanel.requestFocus(); }
@Override public void remove(org.geogebra.common.javax.swing.GBox box) { evjpanel.remove(((org.geogebra.desktop.javax.swing.BoxD) box).getImpl()); }
public void repaint() { this.updateBackgroundIfNecessary(); evjpanel.repaint(); }
public boolean hasFocus() { return evjpanel.hasFocus(); }
/** * @see JPanel#setBorder(Border) * @param border new border */ public void setBorder(Border border) { evjpanel.setBorder(border); }
/** @param dimension new size */ public void setSize(Dimension dimension) { evjpanel.setSize(dimension); }
/** * @see JPanel#getFontMetrics(java.awt.Font) * @param font font * @return font metrics */ public FontMetrics getFontMetrics(java.awt.Font font) { return evjpanel.getFontMetrics(font); }
/** * @see EuclidianViewJPanelD#processMouseEventImpl(MouseEvent) * @param e mouse event */ protected void processMouseEvent(MouseEvent e) { evjpanel.processMouseEventImpl(e); }
/** @return whethe this view is visible */ public boolean isShowing() { return evjpanel.isShowing(); }
// @Override public void setToolTipText(String plain) { if ((tooltipsInThisView == EuclidianStyleConstants.TOOLTIPS_ON) || (tooltipsInThisView == EuclidianStyleConstants.TOOLTIPS_AUTOMATIC)) { evjpanel.setToolTipText(plain); } }
@Override public boolean requestFocusInWindow() { return evjpanel.requestFocusInWindow(); }
public int getHeight() { return evjpanel.getHeight(); }
/** * @see JPanel#setPreferredSize(Dimension) * @param preferredSize prefered size */ public void setPreferredSize(Dimension preferredSize) { evjpanel.setPreferredSize(preferredSize); }
@Override public void setPreferredSize(org.geogebra.common.awt.GDimension preferredSize) { evjpanel.setPreferredSize(org.geogebra.desktop.awt.GDimensionD.getAWTDimension(preferredSize)); }
protected void setBackground(GColor updatedColor, GColor applyedColor) { super.setBackground(updatedColor, applyedColor); evjpanel.setBackground(org.geogebra.desktop.awt.GColorD.getAwtColor(bgApplyedColor)); }