@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();
 }
Esempio n. 10
0
 @Override
 public GFont getFont() {
   // TODO Auto-generated method stub
   return new org.geogebra.desktop.awt.GFontD(evjpanel.getFont());
 }
Esempio n. 11
0
 /** This view should be focused */
 public void requestFocus() {
   evjpanel.requestFocus();
 }
Esempio n. 12
0
 @Override
 public void remove(org.geogebra.common.javax.swing.GBox box) {
   evjpanel.remove(((org.geogebra.desktop.javax.swing.BoxD) box).getImpl());
 }
Esempio n. 13
0
 public void repaint() {
   this.updateBackgroundIfNecessary();
   evjpanel.repaint();
 }
Esempio n. 14
0
 public boolean hasFocus() {
   return evjpanel.hasFocus();
 }
Esempio n. 15
0
 /**
  * @see JPanel#setBorder(Border)
  * @param border new border
  */
 public void setBorder(Border border) {
   evjpanel.setBorder(border);
 }
Esempio n. 16
0
 /** @param dimension new size */
 public void setSize(Dimension dimension) {
   evjpanel.setSize(dimension);
 }
Esempio n. 17
0
 /**
  * @see JPanel#getFontMetrics(java.awt.Font)
  * @param font font
  * @return font metrics
  */
 public FontMetrics getFontMetrics(java.awt.Font font) {
   return evjpanel.getFontMetrics(font);
 }
Esempio n. 18
0
 /**
  * @see EuclidianViewJPanelD#processMouseEventImpl(MouseEvent)
  * @param e mouse event
  */
 protected void processMouseEvent(MouseEvent e) {
   evjpanel.processMouseEventImpl(e);
 }
Esempio n. 19
0
 /** @return whethe this view is visible */
 public boolean isShowing() {
   return evjpanel.isShowing();
 }
Esempio n. 20
0
 // @Override
 public void setToolTipText(String plain) {
   if ((tooltipsInThisView == EuclidianStyleConstants.TOOLTIPS_ON)
       || (tooltipsInThisView == EuclidianStyleConstants.TOOLTIPS_AUTOMATIC)) {
     evjpanel.setToolTipText(plain);
   }
 }
Esempio n. 21
0
 @Override
 public boolean requestFocusInWindow() {
   return evjpanel.requestFocusInWindow();
 }
Esempio n. 22
0
 public int getHeight() {
   return evjpanel.getHeight();
 }
Esempio n. 23
0
 /**
  * @see JPanel#setPreferredSize(Dimension)
  * @param preferredSize prefered size
  */
 public void setPreferredSize(Dimension preferredSize) {
   evjpanel.setPreferredSize(preferredSize);
 }
Esempio n. 24
0
 @Override
 public void setPreferredSize(org.geogebra.common.awt.GDimension preferredSize) {
   evjpanel.setPreferredSize(org.geogebra.desktop.awt.GDimensionD.getAWTDimension(preferredSize));
 }
Esempio n. 25
0
 protected void setBackground(GColor updatedColor, GColor applyedColor) {
   super.setBackground(updatedColor, applyedColor);
   evjpanel.setBackground(org.geogebra.desktop.awt.GColorD.getAwtColor(bgApplyedColor));
 }