Package com.mxgraph.shape

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


        // 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

   *
   */
  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

   * @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

        // 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

   * @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

Related Classes of com.mxgraph.shape.mxIShape

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.