快速 Java 形状操作

发布于 2024-09-25 00:37:42 字数 157 浏览 0 评论 0原文

我的团队缺乏时间来实现简单的形状编辑器。我们必须能够创建、删除、移动和复制简单的形状,例如矩形和线条。这必须是一个独立的应用程序(可能不使用小程序)。我们已经完全实现了支撑应用程序的模型以及控制器。有什么建议吗?

编辑:这是一个更大的应用程序的一部分。只是缺少演示元素,需要澄清一下。

My team is short on time in implementing a simple shape editor. We have to be able to create, delete, move, and copy simple shapes like rectangles and lines. This has to be a stand-alone application (may not use applets). We've fully implemented our model underpinning the application, as well as the controllers. Any advice?

Edit: This is part of a much larger application. Just missing the presentation element, to clarify.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

许仙没带伞 2024-10-02 00:37:42

如果您只想显示图形,请查看 Java2D 库。

这是 API: http://download- llnw.oracle.com/javase/1.4.2/docs/guide/2d/spec.html
还有很多很多教程:(这里是一个) http://download.oracle .com/javase/tutorial/2d/index.html

只需尝试谷歌搜索 Java 2D 示例或一些类似的查询。

我想您会发现用 Java 绘制 2D 形状实际上非常容易:)

If you're just wanting to display graphics, check out the Java2D library.

Here is the API: http://download-llnw.oracle.com/javase/1.4.2/docs/guide/2d/spec.html
There are also many many tutorials: (here is one) http://download.oracle.com/javase/tutorial/2d/index.html

Just try Googling Java 2D examples or some similar query.

I think you'll find it's actually pretty easy to draw 2D shape in Java :)

两人的回忆 2024-10-02 00:37:42

我一直在使用 JHotDraw,这是我自己的应用程序中的图形编辑器。你可以参考他们的源代码。他们相当广泛地使用设计模式。

它是一款还不错的图形编辑器,由经典设计模式的作者之一Erich Gamma 原创。

JHotDraw是二维图形
结构化绘图框架
用 Java 编写的编辑器。这是
基于 Erich Gamma 的 JHotDraw,
版权所有 1996, 1997 由 IFA
Informatik 和 Erich Gamma。

I had been using JHotDraw, a figure editor in my own application. You may refer to their source code. They are using design pattern quite extensively.

It is a not too bad figure editor, and it is originated by Erich Gamma, one of the author of classic design pattern.

JHotDraw is a two-dimensional graphics
framework for structured drawing
editors that is written in Java. It is
based on Erich Gamma's JHotDraw, which
is copyright 1996, 1997 by IFA
Informatik and Erich Gamma.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文