Hey,

\n

I want to multi select Cells to move them together.\nI know that there is the Method mxGraphComponent.getCells(Rectangle).\nBut then i just got the Cells and i dont moved them. \nI think this could be done via mouseDragged.

\n

Is there Method in jGraph which can select some cells and move them together?

asked 20 May '11, 01:00

ImproSnake's gravatar image

ImproSnake
30416
accept rate: 0%


mxGraph.moveCells

link

answered 20 May '11, 07:08

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Hey Guy's i solved the Problem.

\n

You can create an Rectangle via Mouse Methods (mousePressed, mouseReleased etc.).\nAfter this u use the Method mxGraphComponent.getCells(Rectangle) and then you get the Cells which are in the rectangle. Then you use the cells in the rectangle to select them.\nmxGraph.selectCellsForEvent(Object[], MouseEvent)

\n

After this u can move them via mouse drag automatically.

link

answered 20 May '11, 11:46

ImproSnake's gravatar image

ImproSnake
30416
accept rate: 0%

Try the Rubberband Handler

\n
rubberBand = new mxRubberband(grphComponent);\n
link

answered 31 Jan '12, 21:40

Saju%20Chithran's gravatar image

Saju Chithran
11916
accept rate: 27%

Hi!

I also set the fill color so that I have a transparent rectangle rather than a fill color.

  rubberBand = new mxRubberband(graphComponent);
  rubberBand.setFillColor(new Color(0,0,0,0));

Bobby

link

answered 04 Sep '12, 21:52

Bobby%20Krupczak's gravatar image

Bobby Krupczak
2629
accept rate: 7%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×194
×66
×29
×22

Asked: 20 May '11, 01:00

Seen: 3,913 times

Last updated: 04 Sep '12, 21:52