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

Connection-link selection not accurate using javascript library draw2d

I want to implement a graph designer using draw2d library. In demo, the click on any connection-link is accurate, otherwise in my application the click on the links is not accurate because most of the times the connection is not selected (the…
0
votes
3 answers

GEF editor functionality to view

I have created one small GEF project which contains the GEF editor. Now I want to convert all the functionality to View except the GEF pallette. Is it possible to do? Because when I tried to do the editpolicies and all not working. I am able to draw…
user414967
  • 5,225
  • 10
  • 40
  • 61
0
votes
1 answer

GEF: How to add figures to different BorderLayout sections of RootEditPart/-Figure

I have a GEF Editor with the following RootEditPart. public class MyProjectEditPart extends AbstractGraphicalEditPart { @Override protected IFigure createFigure() { ScalableFreeformLayeredPane layer = new ScalableFreeformLayeredPane(); …
0
votes
1 answer

draw2d and gef classes in windowbuilder implementation

I'm browsing the source code of windowbuilder. In the org.eclipse.wb.core plug-in, beside the src folder, there exists src-draw2d and src-gef folders which contains an identical (or at least very similar) implementation of eclipse.gef and…
Aykut Kllic
  • 898
  • 9
  • 14
0
votes
2 answers

rectangle without border

In draw2d,How can I draw a figure without having any border? How to implements the CustomBorder for rectangles to remove the border? I know if we implement a class which extends Border, and in the paint method what should I do to remove the border?
user414967
  • 5,225
  • 10
  • 40
  • 61
0
votes
1 answer

How to draw diagrams using draw2d?

I have designed a meta model for my systems, and I want to create a graphical editor to facilitate the creation of a model. For this, I'm using the GEF editor. I have failed to come across any easy to understand tutorial on how to draw diagrams…
rIshab1988
  • 125
  • 1
  • 4
  • 16
0
votes
1 answer

regarding gef selection

I am new to GEF. I would like to post some doubts here. I have created a rectangle figure on the graphical editor. Now I am unable to select that figure. In order to select a figure, do I need to use the edit policies and commands? Also the…
user414967
  • 5,225
  • 10
  • 40
  • 61
0
votes
2 answers

changing the image of a draw2d button after creation

I am writing an eclipse plugin using draw2d. I am creating a draw2d button using the constructor : Button(Image image). At some point I want to change the image on that button! I can not find a way of doing it. Can anyone help me please? Kind…
Kyriakos
  • 757
  • 8
  • 23
0
votes
1 answer

zoom in and out functionality by using Draw2d

Is there any way for implementing Zoom in and Zoom out by using Draw2d? I dont want to use GEF framework. Is it possible to implement by using Draw2d,request you to give some examples or links. A Small change I am adding here. I can use ZoomManager.…
user414967
  • 5,225
  • 10
  • 40
  • 61
0
votes
1 answer

How to gives a black border to TreeItem SWT?

I have created Tree with more than 1 column using TreeColumn. Right now what I want to achieve is to create border cell for the cell item in Tree. Here is my implementation now: Anyone know?
Agung Pratama
  • 3,666
  • 7
  • 36
  • 77
-1
votes
1 answer

Keep canvas selection when a click is done outside of the canvas

I have a web page (developed in Vaadin) with multiple components in it. In the center, I have a draw2d canvas with items that I can select, drag n drop, remove, etc. Selection gets updated when I click in the canvas, and I want to keep this…
V. Courtois
  • 315
  • 7
  • 20
-1
votes
1 answer

Unable to cancel zooming operation using Job

I am working on an eclipse RCP application. I have a ScalableLayeredPane on which I have around 800 figures. I need to change the zoom value by using setScale() method. Also I want to display progress of the zooming using Job. I am using…
SaurabhJinturkar
  • 554
  • 7
  • 20
1 2 3
9
10