Examples of mxIShape


Examples of com.mxgraph.shape.mxIShape

   * @see com.mxgraph.canvas.mxICanvas#drawCell()
   */
  public Object drawCell(mxCellState state)
  {
    Map<String, Object> style = state.getStyle();
    mxIShape shape = getShape(style);

    if (g != null && shape != null)
    {
      // Creates a temporary graphics instance for drawing this shape
      float opacity = mxUtils.getFloat(style, mxConstants.STYLE_OPACITY,
          100);
      Graphics2D previousGraphics = g;
      g = createTemporaryGraphics(style, opacity, state);

      // Paints the shape and restores the graphics object
      shape.paintShape(this, state);
      g.dispose();
      g = previousGraphics;
    }

    return shape;
View Full Code Here

Examples of com.mxgraph.shape.mxIShape

        // FIXME: Check if this should be used for all shapes
        if (mxUtils.getString(state.getStyle(),
            mxConstants.STYLE_SHAPE, "").equals(
            mxConstants.SHAPE_ARROW))
        {
          mxIShape shape = getShape(state.getStyle());

          if (shape instanceof mxBasicShape)
          {
            realShape = ((mxBasicShape) shape).createShape(this,
                state);
View Full Code Here

Examples of com.mxgraph.shape.mxIShape

   *
   */
  public mxIShape getShape(Map<String, Object> style)
  {
    String name = mxUtils.getString(style, mxConstants.STYLE_SHAPE, null);
    mxIShape shape = shapes.get(name);

    if (shape == null && name != null)
    {
      shape = mxStencilRegistry.getStencil(name);
    }
View Full Code Here

Examples of com.mxgraph.shape.mxIShape

   * @see com.mxgraph.canvas.mxICanvas#drawCell()
   */
  public Object drawCell(mxCellState state)
  {
    Map<String, Object> style = state.getStyle();
    mxIShape shape = getShape(style);

    if (g != null && shape != null)
    {
      // Creates a temporary graphics instance for drawing this shape
      float opacity = mxUtils.getFloat(style, mxConstants.STYLE_OPACITY,
          100);
      Graphics2D previousGraphics = g;
      g = createTemporaryGraphics(style, opacity, state);

      // Paints the shape and restores the graphics object
      shape.paintShape(this, state);
      g.dispose();
      g = previousGraphics;
    }

    return shape;
View Full Code Here

Examples of com.mxgraph.shape.mxIShape

        // FIXME: Check if this should be used for all shapes
        if (mxUtils.getString(state.getStyle(),
            mxConstants.STYLE_SHAPE, "").equals(
            mxConstants.SHAPE_ARROW))
        {
          mxIShape shape = getShape(state.getStyle());

          if (shape instanceof mxBasicShape)
          {
            realShape = ((mxBasicShape) shape).createShape(this,
                state);
View Full Code Here

Examples of com.mxgraph.shape.mxIShape

   * @see com.mxgraph.canvas.mxICanvas#drawCell()
   */
  public Object drawCell(mxCellState state)
  {
    Map<String, Object> style = state.getStyle();
    mxIShape shape = getShape(style);

    if (g != null && shape != null)
    {
      // Creates a temporary graphics instance for drawing this shape
      float opacity = mxUtils.getFloat(style, mxConstants.STYLE_OPACITY,
          100);
      Graphics2D previousGraphics = g;
      g = createTemporaryGraphics(style, opacity, state);

      // Paints the shape and restores the graphics object
      shape.paintShape(this, state);
      g.dispose();
      g = previousGraphics;
    }

    return shape;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.