draw2d

issue drawing aligned text using TextFlow and FlowPage

我的未来我决定 提交于 2020-03-06 04:51:21
问题 i'm drawing a multiline text label using a FlowPage object that contains a TextFlow object. the code of my label class is: class TransitionLabel extends FlowPage { private TextFlow content; public TransitionLabel() { setForegroundColor(ColorConstants.white); setHorizontalAligment(PositionConstants.CENTER); content = new TextFlow(); content.setOpaque(true); content.setText(""); add(content); } public void setText(String content) { this.content.setText(content); revalidate(); repaint(); }

How to draw rotated text inside of a GC

喜夏-厌秋 提交于 2020-02-06 07:29:45
问题 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? 回答1: This should do it: Transform tr = new Transform(display); tr.rotate(-90); gc.setTransform(tr); gc.drawText("Text", x, y); 来源: https://stackoverflow.com/questions/12618023/how-to-draw-rotated-text-inside-of-a-gc

Sending Ajax Request Using JavaScript to JSF

China☆狼群 提交于 2020-01-22 15:24:28
问题 Currently, I am working on a web application that uses draw2d library to draw shapes and charts. On the server side I am using Java(JSF). I can say that 95% of this application is just pure JavaScript. I like to be able to send Ajax requests from inside my JavaScript with no need of using hidden fields such as <f:inputText> (perhaps using jQuery Ajax components?). I tried to hack around this by adding different hidden JFS component and jsf.ajax.request , but for whatever reason they are not

Is there any tooltip functionality in Graphiti?

蹲街弑〆低调 提交于 2019-12-13 02:43:25
问题 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:) 回答1: Yes, this functionality is now available: http://draw2d.org/draw2d_touch/jsdoc/#!/example/tooltip_diy 来源: https://stackoverflow.com/questions/12387256/is-there-any-tooltip-functionality-in-graphiti

Sending Ajax Request Using JavaScript to JSF

谁都会走 提交于 2019-12-03 20:20:57
Currently, I am working on a web application that uses draw2d library to draw shapes and charts. On the server side I am using Java(JSF). I can say that 95% of this application is just pure JavaScript. I like to be able to send Ajax requests from inside my JavaScript with no need of using hidden fields such as <f:inputText> (perhaps using jQuery Ajax components?). I tried to hack around this by adding different hidden JFS component and jsf.ajax.request , but for whatever reason they are not very reliable and sometimes they don't send the ajax request. Any suggestion? Also, about jQuery, I am