Tabnine Logo
RectangleFigure.setBounds
Code IndexAdd Tabnine to your IDE (free)

How to use
setBounds
method
in
org.jhotdraw.draw.RectangleFigure

Best Java code snippets using org.jhotdraw.draw.RectangleFigure.setBounds (Showing top 6 results out of 315)

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Moves the Figure to a new location.
 * @param tx the transformation matrix.
 */
@Override
public void transform(AffineTransform tx) {
  Point2D.Double anchor = getStartPoint();
  Point2D.Double lead = getEndPoint();
  setBounds(
      (Point2D.Double) tx.transform(anchor, anchor),
      (Point2D.Double) tx.transform(lead, lead)
      );
}

origin: stackoverflow.com

 // from your code
rectangle.setBackgroundColor(ColorConstants.green);

// new code
RectangleFigure r2 = new RectangleFigure();
r2.setBounds(new Rectangle(0,0,10,10));
r2.setBackgroundColor(ColorConstants.blue);
rectangle.add(r2);

// back to your code
lws.setContents(rectangle);
origin: stackoverflow.com

 ...

RectangleFigure rect=new RectangleFigure();
rect.setBounds(new Rectangle(10, 10, 5, 25));
rect.setBorder(new SimpleRaisedBorder());
rect.setLayoutManager(new StackLayout());

RectangleFigure rect2=new RectangleFigure();
rect2.setBounds(new Rectangle(10, 10, 5, 25));
rect2.setBorder(new SimpleRaisedBorder());
rect2.setLayoutManager(new StackLayout());

...

fp.add(content);
rect2.add(fp);
rect.add(rect2);
panel.add(rect);
origin: net.imagej/imagej-ui-swing

@Override
public void
  updateFigure(final OverlayView view, final RectangleFigure figure)
{
  super.updateFigure(view, figure);
  final RectangleOverlay overlay = downcastOverlay(view.getData());
  final double x0 = overlay.getOrigin(0);
  final double y0 = overlay.getOrigin(1);
  final double w = overlay.getExtent(0);
  final double h = overlay.getExtent(1);
  final Point2D.Double anch = new Point2D.Double(x0, y0);
  final Point2D.Double lead = new Point2D.Double(x0 + w, y0 + h);
  figure.setBounds(anch, lead);
}
origin: stackoverflow.com

Rectangle rect = new Rectangle(droppoint.x, droppoint.y, 20, 20);
Rectangle rect2 = new Rectangle(droppoint.x, droppoint.y, 100, 25);
node1.setBounds(rect);
node1.setBackgroundColor(ColorConstants.cyan);
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

ta.setBounds(new Point2D.Double(10, 10), new Point2D.Double(100, 100));
tb.setBounds(new Point2D.Double(210, 110), new Point2D.Double(300, 200));
org.jhotdraw.drawRectangleFiguresetBounds

Popular methods of RectangleFigure

  • <init>
  • getBounds
  • add
  • findConnector
  • getChildren
  • getEndPoint
  • getStartPoint
  • set
  • setAttributeEnabled
  • setBackgroundColor
  • setBorder
  • setLayoutManager
  • setBorder,
  • setLayoutManager

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Reference (javax.naming)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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