Documentation of 'com.mxgraph.canvas.mxGraphics2DCanvas' Java class
mxGraphics2DCanvas
com.mxgraph.canvas

Class mxGraphics2DCanvas

    • Field Detail

      • TEXT_SHAPE_DEFAULT

        public static final java.lang.String TEXT_SHAPE_DEFAULT
        See Also:
        Constant Field Values
      • IMAGE_SCALING

        public static int IMAGE_SCALING
        Specifies the image scaling quality. Default is Image.SCALE_SMOOTH.
    • Constructor Detail

      • mxGraphics2DCanvas

        public mxGraphics2DCanvas()
        Constructs a new graphics canvas with an empty graphics object.
      • mxGraphics2DCanvas

        public mxGraphics2DCanvas(java.awt.Graphics2D g)
        Constructs a new graphics canvas for the given graphics object.
    • Method Detail

      • putShape

        public static void putShape(java.lang.String name,
                                    mxIShape shape)
      • getShape

        public mxIShape getShape(java.util.Map<java.lang.String,java.lang.Object> style)
      • putTextShape

        public static void putTextShape(java.lang.String name,
                                        mxITextShape shape)
      • getTextShape

        public mxITextShape getTextShape(java.util.Map<java.lang.String,java.lang.Object> style,
                                         boolean html)
      • getRendererPane

        public javax.swing.CellRendererPane getRendererPane()
      • getGraphics

        public java.awt.Graphics2D getGraphics()
        Returns the graphics object for this canvas.
      • setGraphics

        public void setGraphics(java.awt.Graphics2D g)
        Sets the graphics object for this canvas.
      • drawCell

        public java.lang.Object drawCell(mxCellState state)
        Description copied from interface: mxICanvas
        Draws the given cell.
        Parameters:
        state - State of the cell to be painted.
        Returns:
        Object that represents the cell.
      • drawLabel

        public java.lang.Object drawLabel(java.lang.String text,
                                          mxCellState state,
                                          boolean html)
        Description copied from interface: mxICanvas
        Draws the given label.
        Parameters:
        text - String that represents the label.
        state - State of the cell whose label is to be painted.
        html - Specifies if the label contains HTML markup.
        Returns:
        Object that represents the label.
      • drawImage

        public void drawImage(java.awt.Rectangle bounds,
                              java.lang.String imageUrl)
      • drawImage

        public void drawImage(java.awt.Rectangle bounds,
                              java.lang.String imageUrl,
                              boolean preserveAspect,
                              boolean flipH,
                              boolean flipV)
      • paintPolyline

        public void paintPolyline(mxPoint[] points,
                                  boolean rounded)
      • paintRectangle

        public void paintRectangle(java.awt.Rectangle bounds,
                                   java.awt.Color background,
                                   java.awt.Color border)
      • fillShape

        public void fillShape(java.awt.Shape shape)
      • fillShape

        public void fillShape(java.awt.Shape shape,
                              boolean shadow)
      • createStroke

        public java.awt.Stroke createStroke(java.util.Map<java.lang.String,java.lang.Object> style)
      • createFillPaint

        public java.awt.Paint createFillPaint(mxRectangle bounds,
                                              java.util.Map<java.lang.String,java.lang.Object> style)
      • createTemporaryGraphics

        public java.awt.Graphics2D createTemporaryGraphics(java.util.Map<java.lang.String,java.lang.Object> style,
                                                           float opacity,
                                                           mxRectangle bounds)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.