Questions tagged [draw2d]

Draw2d is a layout and rendering toolkit for displaying graphics on an SWT canvas

Draw2d is a lightweight toolkit for displaying graphical components on an SWT canvas. Lightweight means that all graphical components, which are called figures in Draw2d, are simply Java objects, with no corresponding resource in the operating system.

A LightweightSystem associates a figure composition with an SWT canvas. It hooks listeners for most SWT events, and forwards most of them to an EventDispatcher, which translates them into events on the appropriate figure. Paint events are forwarded from the figures to an UpdateManager, which coordinates painting and layouting on the canvas.

Figures can be composed via a parent-child relationship. Every figure has a rectangular bounds inside which it, and its children, paint. A layout manager can be used to place children based on their index and/or constraint. Figures can be updated in ways which affect their appearance or size, and the update manager ensures that only one layout occurs, followed by a repaint of only the region which was updated.

Any type of diagram, document, or drawing can be easily constructed and efficiently updated by combining the provided figure and layout implementations along with the use of custom figures or layouts when needed.

(Excerpt from the Eclipse Draw2d site.)

147 questions
0
votes
1 answer

How to draw rotated text inside of a GC

I doing some 2D drawing in a SWT GUI. For that I have a GC Object. How can I draw rotatet text inside of an SWT Canvas?
Skip
  • 6,240
  • 11
  • 67
  • 117
0
votes
2 answers

Create a hollow arrow at the end of a PolylineConnection?

How can I create a hollow arrow at the end of a PolylineConnection? Currently I have a solid arrow using: PolylineConnection c PolygonDecoration decoration = new PolygonDecoration(); PointList decorationPointList = new…
Whitecat
  • 3,882
  • 7
  • 48
  • 78
0
votes
1 answer

Is there any tooltip functionality in Graphiti?

Is there any tooltip functionality, so that on mouse over of any shape(node) it will appear showing the information for the shape. Thanks in advance:)
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

How to calculate figure's size including all sub figures (that have separate edit parts) in GEF?

I'm trying to draw diagram that contains a single entity which holds multiple elements inside. My MVC structure looks something like this: Model: contains EntityModel.java and ElementModel.java which represents my model objects. View:…
akaspi
  • 275
  • 1
  • 3
  • 12
0
votes
2 answers

How to overcome the port detach issue?

In this example : Undo/Redo Drop the start node on to the canvas. Mousedown on the port and drag it. Now while dragging press RIGHT CLICK. Now the issue is that the port become detach from the start node. It should not be happen. Please look in to…
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

Is there any resizeable limit for a shape in Graphiti?

In the Graphiti example : Drag And Drop Edit Policy When we drag any shape then it is draggble to some limited area that we have defined. But when we are going to resize any of the shapes then it got resize outside the dragging limit(no limlt for…
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
2 answers

draw2d imports not resolved

I am doing an eclipse plugin using gef. When I restart eclipse after a plugin installation I got a lot of errors regarding draw2d imports. For example in one of my classes I had: import org.eclipse.draw2d.ImageFigure; import…
Kyriakos
  • 757
  • 8
  • 23
0
votes
1 answer

What Eclipse GEF software package contains Draw2d?

I'm trying to get the Eclipse GEF package "Draw2d". What Eclipse GEF software package contains Draw2d? When I search for it, nothing appears in the list.
Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152
0
votes
1 answer

How to create a collapsable Figure in Graphiti?

The Figure is made of multiple figures (all SVGFigure). I want the parent figure to have a button that change its state so it is rendered simplified (hiding most sub-figures and connectors) What's the best way to achieve this?
Zerzio
  • 237
  • 3
  • 11
0
votes
1 answer

Scrolling distance of FigureCanvas

I am doing an eclipse plug-in using GEF for drawing graphs. I am using a FigureCanvas to display the graphs. When I am scrolling canvas is there any way to get the distance that the canvas was scrolled?
Kyriakos
  • 757
  • 8
  • 23
0
votes
1 answer

Is ImageFigure() Constructor present in graphiti.js like draw2d?

i found one method ImageFigure() in draw2d. So i want to know is it presnt in graphiti.js also. If it present in graphiti then it solves my problem on grouping object. Thanks In advance.
0
votes
1 answer

How to handle figure overlapping in Graphiti?

I have a big rectangle and a small rectangle made of graphiti, now when I drag small rectangle over big rectangle then I am not able to select that small rectangle instead big rectangle got selected. In short that small rectangle doesn't has mouse…
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

How to make diamond shape using graphiti?

Can you please provide me how to make diamond shape in graphiti , i have tried it using RestoreBridge example but that example is SVG import so please provide me some idea or code for making diamond like shapes ( resizable and draggable diamond…
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

How will i get to use the darw2d and graphiti for drawing flowcharts?

Here is the link : http://www.draw2d.org/draw2d/ I want to create flowchart as in the above link using the draw2d library and now the prob is that it is not open source and it is paid, but i have some queries before buying this product: -Want to…
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

Javascript Draw2d - CanvasRenderingContext2D.implement is not a function

In the browser console, when the page using draw2d library is loaded it appears "CanvasRenderingContext2D.implement is not a function". Is an important problem? The application seems to run correctly. I use mootools compatible with jquery, because…
1 2 3
9
10