congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Drawing.draw
Code IndexAdd Tabnine to your IDE (free)

How to use
draw
method
in
org.jhotdraw.draw.Drawing

Best Java code snippets using org.jhotdraw.draw.Drawing.draw (Showing top 2 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

protected void drawDrawing(Graphics2D gr) {
  if (drawing != null) {
    if (drawing.getChildCount() == 0 && emptyDrawingLabel != null) {
      emptyDrawingLabel.setBounds(0, 0, getWidth(), getHeight());
      emptyDrawingLabel.paint(gr);
    } else {
      Graphics2D g = (Graphics2D) gr.create();
      AffineTransform tx = g.getTransform();
      tx.translate(-translation.x, -translation.y);
      tx.scale(scaleFactor, scaleFactor);
      g.setTransform(tx);
      drawing.setFontRenderContext(g.getFontRenderContext());
      drawing.draw(g);
      g.dispose();
    }
  }
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

drawing.draw(g);
org.jhotdraw.drawDrawingdraw

Javadoc

Draws on the canvas area. The canvas is the background area onto which the drawing is drawn.

By convention this method is only invoked by DrawingView.

AttributeKeys defines a number of attribute keys which can be used to determine what to draw on the canvas.

Popular methods of Drawing

  • add
    Adds a figure to the drawing. The drawing sends an addNotify message to the figure after it has been
  • remove
    Removes a figure from the drawing. The drawing sends a removeNotify message to the figure before it
  • contains
  • addAll
    Adds a collection of figures to the drawing. The drawing sends an addNotify message to each figure a
  • addCompositeFigureListener
  • addFigureListener
  • addInputFormat
    Adds an input format to the drawing.
  • addOutputFormat
    Adds an output format to the drawing.
  • addUndoableEditListener
    Adds a listener for undooable edit events.
  • basicAdd
    Reinserts a figure which was temporarily removed using basicRemove. This is a convenience method for
  • basicAddAll
    Reinserts the specified figures which were temporarily removed from the drawing.
  • basicRemoveAll
    Removes the specified figures temporarily from the drawing.
  • basicAddAll,
  • basicRemoveAll,
  • bringToFront,
  • changed,
  • clone,
  • drawCanvas,
  • findFigure,
  • findFigureBehind,
  • findFigureExcept

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • JTextField (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now