Java - ZUI(Zoomable用户界面) [英] Java - ZUI (Zoomable User Interface)

查看:171
本文介绍了Java - ZUI(Zoomable用户界面)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在做一个需要显示大量数据的小型个人项目,我突然想到实现一种可缩放的用户界面,以允许用户浏览大量数据。

I'm currently doing a small personal project that needs to display an extremely large amount of data, and I suddenly thought about implementing a form of zoomable user interface to allow the user to navigate around the large amounts of data.

我知道现有的项目,例如 ZVTM Piccolo2d ,我可能最终会用到这份工作,不过我也很有诱惑力开始写我自己的。但是,我有点不确定如何开始。

I'm aware of existing projects such as ZVTM and Piccolo2d which I'll probably end up using for the job, however I'm also quite tempted to embark upon writing my own. However, I'm a little unsure as how to start.

从我读过的内容来看,像Piccolo2d这样的项目似乎是由于缺乏'而开发的' Java中的场景图管理,Piccolo2d是基于旧版项目的工作开发的,如'Pad','Pad ++'和'Jazz'。

From what I've been reading, it seems that projects like Piccolo2d were developed due to a lack of 'scene graph' management within Java, and Piccolo2d was developed based on the work of older projects such as 'Pad', 'Pad++' and 'Jazz'.

快速谷歌搜索,我可以看到JavaFX中提供了场景图管理,但我想知道Java 7中的Swing是否具有此功能。

After a quick bit of Googling around, I can see that scene graph management is available in JavaFX, but I'm wondering if Swing in Java 7 has this functionality.

我有过一点思考,我想知道是否可以使用 JLayer API实现基本的缩放界面,实质上是根据不同的层来装饰具有不同层的对象。当前缩放级别。

I've had a bit of a think, and I'm wondering if it could be possible to implement a basic zooming interface using the JLayer API, essentially decorating an object with different layers dependant upon the current zoom level.

举个例子,假设我可以看到最远缩放级别的目录,放大后会显示目录内容和缩放进一步将显示所述目录中存在的文件内的文本。我一直在玩 Eagle模式一段时间,所以这是我的一个完美的例子思考。

So as an example, let's say I can see a directory at the furthest zoom level, zooming in would then show the contents of the directory, and zooming in further would show the text within the file present in said directory. I've been playing around with Eagle Mode for a while now, so that's a perfect example of what I'm thinking of.

我知道这是一个很长的问题(如果它真的是一个问题)。基本上,让我们假设Piccolo等人不存在,而我所拥有的只是核心Java 7 JDK,有人能提出一个好的起点吗?

I know this is a bit of a long question (if it's really a question at all). So essentially, let's pretend that Piccolo et al, don't exist, and all I have is the core Java 7 JDK, can anyone suggest a good starting point?

It似乎Piccolo2d很大程度上依赖于Java2d API,所以我想知道API是否已经进步,或者Java 7引入了新的机制来实现类似的效果。

It seems that the Piccolo2d is based heavily upon the Java2d API, so I'm wondering if the API has advanced in anyway, or perhaps Java 7 has introduced new mechanisms for achieving a similar effect.

我对可以提供的任何意见或建议感兴趣。我知道这不是一件容易的事,但没有任何时间限制,只是个人项目。

I'd be interested in any input or advice that can be offered. I know this isn't going to be an easy task, but there aren't any time limits involved, it's just a personal project.

谢谢

推荐答案


我所拥有的只是核心Java 7 JDK,有人能提出一个好的起点吗?

all I have is the core Java 7 JDK, can anyone suggest a good starting point?

我建议使用 JavaFX


  1. JavaFX包含在核心Oracle Java 7(和Java 8)JDK和运行时中。

  2. JavaFX Architecture 包含全面的场景图

  3. JavaFX具有用于场景图变换的内置工具,如缩放,平移,分层,动画,转换等。

  4. JavaFX执行硬件加速渲染。

  5. 使用现代编解码器(如H.264)可以实现可扩展的视频播放。

  6. JavaFX包含一个全面的基于矢量的控件集,在放大时看起来不错

  7. 包括对视网膜显示等的HiDPI支持(在Java 8中)。

  8. JavaFX中的硬件加速3D对象模型渲染场景图(在Java 8中)。

  9. 您可以使用FXML以声明方式定义UI,并使用 SceneBuilder以交互方式定义UI - 方面问题,但可能会让您更容易开发。

  10. JavaFX项目是开源并正在积极开发中。

  11. JPedal提供第三方 pdf viewer for JavaFX ,可用于查看可扩展的pdf文档。

  12. JavaFX包含一个HTML查看器(在Java 8中具有缩放功能)。

  1. JavaFX is included in the core Oracle Java 7 (and Java 8) JDKs and runtimes.
  2. The JavaFX Architecture includes a comprehensive scene graph.
  3. JavaFX has inbuilt facilities for scene graph transforms such as scaling, translating, layering, animating, transitioning, etc.
  4. JavaFX performs hardware accelerated rendering.
  5. You get scalable video playback using modern codecs like H.264.
  6. JavaFX includes a comprehensive vector based control set that looks good as it zooms in and out.
  7. HiDPI support for retina displays, etc. is included (in Java 8).
  8. Hardware accelerated 3D object model rendering within the JavaFX scene graph (in Java 8).
  9. You can define UI declaratively using FXML and interactively using SceneBuilder - side issue, but might make development easier for you.
  10. The JavaFX project is open source and under active development.
  11. JPedal provide a 3rd party pdf viewer for JavaFX which you could use for viewing scalable pdf documents.
  12. JavaFX includes an HTML viewer (with zoom capabilities in Java 8).

实施注意事项

我的猜测(这纯粹是我的观点是,在JavaFX中实现这个特定项目比在vanilla Swing中更容易实现,因为底层JavaFX技术和功能更符合您的要求。

My guess (and this is purely my opinion) is that it is going to be a whole lot easier for you to implement this particular project in JavaFX than it would be in vanilla Swing because the underlying JavaFX technology and capabilities more closely match your requirements.

显然,无论您选择何种技术,实现像Eagle Mode一样全面的功能仍然需要大量工作,并且需要在Java系统之外进行原生扩展(以显示虚拟桌面等)。 )。

Obviously, no matter what technology you choose, to implement something as comprehensive as Eagle Mode would still be a lot of work and would require native extensions outside of the Java system (in order to display virtual desktops, etc.).

JavaFX建议来自我所有的核心Java 7 JDK的立场。诸如 ZVTM 之类的系统具有支持ZUI构建的功能和API,而JavaFX应用程序(据我所知)还包括(例如镜头视图,门户视图,将UI映射到大型多屏幕阵列等)。如果您具有使用预构建库(如ZVTM)的灵活性,则应根据项目要求对其进行严格评估。

The JavaFX recommendation is from a "all I have is the core Java 7 JDK" standpoint. Systems such as ZVTM have supporting functionality and APIs for ZUI building which no JavaFX application (to my knowledge) yet includes (e.g. lens views, portal views, mapping UIs to large multi-screen arrays, etc). Uf you have the flexibility of using a pre-built library such as ZVTM, it should be seriously evaluated against your project requirements.

范围建议

为了使项目更易于管理,请将初始实现要求限制为基于ZUI的文件系统查看器,而不是功能齐全的ZUI桌面UI。

To make the project more easily manageable, restrict the initial implementation requirements to a ZUI based filesystem viewer rather than a fully functional ZUI desktop UI.

JavaFX ZUI样本

  • The grezi project is a ZUI presentation system based on the GroovyFX wrapper for JavaFX.
  • vworkflows from mihosoft provides a ZUI aware windowing system on top of the JavaFX scene graph.
  • Zooming JavaFX nodes in a ScrollPane.

祝你好运与您的项目。 。 。

Best of luck with your project . . .

这篇关于Java - ZUI(Zoomable用户界面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆