Package java.awt.geom

Examples of java.awt.geom.Dimension2D


                startDocumentLoader();
                return;
            }

            GraphicsNode gn = e.getGVTRoot();
            Dimension2D dim = bridgeContext.getDocumentSize();
            if (gn == null || dim == null) {
                JSVGComponent.this.image = null;
                repaint();
            } else {
                JSVGComponent.this.setGraphicsNode(gn, false);
View Full Code Here


            if (isDynamicDocument && JSVGComponent.this.eventsEnabled) {
                startSVGLoadEventDispatcher(e.getGVTRoot());
            } else {
                JSVGComponent.this.setGraphicsNode(e.getGVTRoot(), false);
            }
            Dimension2D dim = bridgeContext.getDocumentSize();
            setPreferredSize(new Dimension((int)dim.getWidth(),
                                           (int)dim.getHeight()));
            invalidate();
        }
View Full Code Here

                startDocumentLoader();
                return;
            }

            GraphicsNode gn = e.getGVTRoot();
            Dimension2D dim = bridgeContext.getDocumentSize();
            if (gn == null || dim == null) {
                JSVGComponent.this.image = null;
                repaint();
            } else {
                JSVGComponent.this.setGraphicsNode(gn, false);
                setPreferredSize(new Dimension((int)dim.getWidth(),
                                               (int)dim.getHeight()));
                invalidate();
            }
            userAgent.displayError(((GVTTreeBuilder)e.getSource())
                                   .getException());
        }
View Full Code Here

                startDocumentLoader();
                return;
            }

            GraphicsNode gn = e.getGVTRoot();
            Dimension2D dim = bridgeContext.getDocumentSize();
            if (gn == null || dim == null) {
                JSVGComponent.this.image = null;
                repaint();
            } else {
                JSVGComponent.this.setGraphicsNode(gn, false);
View Full Code Here

   *
   * @return The object.
   */
  public Object createObject()
  {
    final Dimension2D dim = new Dimension();

    final float width = getFloatParameter("width");
    final float height = getFloatParameter("height");
    dim.setSize(width, height);
    return dim;
  }
View Full Code Here

    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT, new Float(d.getHeight()));
      return;
    }
    if ("border-top-left-radius".equals(name))
    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT, new Float(d.getHeight()));
      return;
    }
    if ("border-bottom-right-radius".equals(name))
    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT, new Float(d.getHeight()));
      return;
    }
    if ("border-bottom-left-radius".equals(name))
    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT, new Float(d.getHeight()));
      return;
    }
    if ("absolute_pos".equals(name))
    {
      if (value instanceof Point2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Point2D d = (Point2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.POS_X, new Float(d.getX()));
      styleSheet.setStyleProperty(ElementStyleKeys.POS_Y, new Float(d.getY()));
      return;
    }
    if ("min-size".equals(name))
    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(d.getHeight()));
      return;
    }
    if ("max-size".equals(name))
    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.MAX_WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.MAX_HEIGHT, new Float(d.getHeight()));
      return;
    }
    if ("preferred-size".equals(name))
    {
      if (value instanceof Dimension2D == false)
      {
        throw new IllegalArgumentException("There is no handler for the stylekey: " + name);
      }
      final Dimension2D d = (Dimension2D) value;
      styleSheet.setStyleProperty(ElementStyleKeys.WIDTH, new Float(d.getWidth()));
      styleSheet.setStyleProperty(ElementStyleKeys.HEIGHT, new Float(d.getHeight()));
      return;
    }

    final StyleKey key = keyfactory.getStyleKey(name);
    if (key == null)
View Full Code Here

   *
   * @return The object.
   */
  public Object createObject()
  {
    final Dimension2D dim = new FloatDimension();

    final float width = getFloatParameter("width");
    final float height = getFloatParameter("height");
    dim.setSize(width, height);
    return dim;
  }
View Full Code Here

    if (!(o instanceof Dimension2D))
    {
      throw new ObjectFactoryException("The given object is no java.awt.geom.Dimension2D.");
    }

    final Dimension2D dim = (Dimension2D) o;
    final float width = (float) dim.getWidth();
    final float height = (float) dim.getHeight();

    setParameter("width", new Float(width));
    setParameter("height", new Float(height));
  }
View Full Code Here

            if (isDynamicDocument && JSVGComponent.this.eventsEnabled) {
                startSVGLoadEventDispatcher(e.getGVTRoot());
            } else {
                JSVGComponent.this.setGraphicsNode(e.getGVTRoot(), false);
            }
            Dimension2D dim = bridgeContext.getDocumentSize();
            setPreferredSize(new Dimension((int)dim.getWidth(),
                                           (int)dim.getHeight()));
            invalidate();
        }
View Full Code Here

                startDocumentLoader();
                return;
            }

            GraphicsNode gn = e.getGVTRoot();
            Dimension2D dim = bridgeContext.getDocumentSize();
            if (gn == null || dim == null) {
                JSVGComponent.this.image = null;
                repaint();
            } else {
                JSVGComponent.this.setGraphicsNode(gn, false);
                setPreferredSize(new Dimension((int)dim.getWidth(),
                                               (int)dim.getHeight()));
                invalidate();
            }
            userAgent.displayError(((GVTTreeBuilder)e.getSource())
                                   .getException());
        }
View Full Code Here

TOP

Related Classes of java.awt.geom.Dimension2D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.