Пример #1
0
  @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();
  }
Пример #2
0
 @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
 }
Пример #3
0
 /**
  * @see JPanel#dispatchEvent(AWTEvent)
  * @param componentEvent component event
  */
 public void dispatchEvent(ComponentEvent componentEvent) {
   evjpanel.dispatchEvent(componentEvent);
 }
Пример #4
0
 /** @see JPanel#revalidate() */
 public void revalidate() {
   evjpanel.revalidate();
 }
Пример #5
0
 /** @param cursor new cursor */
 public void setCursor(Cursor cursor) {
   evjpanel.setCursor(cursor);
 }
Пример #6
0
 public int getWidth() {
   return evjpanel.getWidth();
 }
Пример #7
0
 /**
  * Initializes this panel
  *
  * @param repaint ignored parameter
  */
 protected void initPanel(boolean repaint) {
   // preferred size
   evjpanel.setPreferredSize(null);
 }
Пример #8
0
 /** @return prefered size */
 public Dimension getPreferredSize() {
   return evjpanel.getPreferredSize();
 }
Пример #9
0
 /** @return mouse position */
 public java.awt.Point getMousePosition() {
   return evjpanel.getMousePosition();
 }
Пример #10
0
 @Override
 public GFont getFont() {
   // TODO Auto-generated method stub
   return new org.geogebra.desktop.awt.GFontD(evjpanel.getFont());
 }
Пример #11
0
 /** This view should be focused */
 public void requestFocus() {
   evjpanel.requestFocus();
 }
Пример #12
0
 @Override
 public void remove(org.geogebra.common.javax.swing.GBox box) {
   evjpanel.remove(((org.geogebra.desktop.javax.swing.BoxD) box).getImpl());
 }
Пример #13
0
 public void repaint() {
   this.updateBackgroundIfNecessary();
   evjpanel.repaint();
 }
Пример #14
0
 public boolean hasFocus() {
   return evjpanel.hasFocus();
 }
Пример #15
0
 /**
  * @see JPanel#setBorder(Border)
  * @param border new border
  */
 public void setBorder(Border border) {
   evjpanel.setBorder(border);
 }
Пример #16
0
 /** @param dimension new size */
 public void setSize(Dimension dimension) {
   evjpanel.setSize(dimension);
 }
Пример #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);
 }
Пример #18
0
 /**
  * @see EuclidianViewJPanelD#processMouseEventImpl(MouseEvent)
  * @param e mouse event
  */
 protected void processMouseEvent(MouseEvent e) {
   evjpanel.processMouseEventImpl(e);
 }
Пример #19
0
 /** @return whethe this view is visible */
 public boolean isShowing() {
   return evjpanel.isShowing();
 }
Пример #20
0
 // @Override
 public void setToolTipText(String plain) {
   if ((tooltipsInThisView == EuclidianStyleConstants.TOOLTIPS_ON)
       || (tooltipsInThisView == EuclidianStyleConstants.TOOLTIPS_AUTOMATIC)) {
     evjpanel.setToolTipText(plain);
   }
 }
Пример #21
0
 @Override
 public boolean requestFocusInWindow() {
   return evjpanel.requestFocusInWindow();
 }
Пример #22
0
 public int getHeight() {
   return evjpanel.getHeight();
 }
Пример #23
0
 /**
  * @see JPanel#setPreferredSize(Dimension)
  * @param preferredSize prefered size
  */
 public void setPreferredSize(Dimension preferredSize) {
   evjpanel.setPreferredSize(preferredSize);
 }
Пример #24
0
 @Override
 public void setPreferredSize(org.geogebra.common.awt.GDimension preferredSize) {
   evjpanel.setPreferredSize(org.geogebra.desktop.awt.GDimensionD.getAWTDimension(preferredSize));
 }
Пример #25
0
 protected void setBackground(GColor updatedColor, GColor applyedColor) {
   super.setBackground(updatedColor, applyedColor);
   evjpanel.setBackground(org.geogebra.desktop.awt.GColorD.getAwtColor(bgApplyedColor));
 }