是否有一个 GWT 小部件(或其排列)用于“当用户选择内联字段时打开编辑上下文”?
我什至不确定如何称呼这种 UI 技术,但请考虑以下来自 IntelliJ IDEA 的示例。
IntelliJ 示例
这里,“字段”是方法的返回类型,“编辑上下文”是可用类型的下拉列表。它是“内联”的,因为这不是带有标签字段的表单,而是一个“叙述”(Java 中的语句)。
我的应用程序
我想尝试同样的事情我正在编写的浏览器应用程序。在这里,叙述会是这样的:
“预约安排在下午 1 点 今天。'
这里,短语“今天下午 1 点”是日期时间字段的“短语渲染”。当用户选择它(通过选项卡或单击它)时,短语下方应该“弹出”一个面板,以便可以编辑该字段。在这种情况下,编辑器可能是日历小部件和时间旋转器小部件。
GWT 术语中的粗略概念
如果有一个 GWT 小部件,它可以执行以下操作,那就太好了:
- 混合使用多个小部件,其中每个小部件都有一个“文本短语渲染”和(可选)一个“编辑器面板”,
- 用于布局所有内容文本友好流程中呈现的短语
- 应用了一致的视觉提示,其中文本短语具有编辑器,并
- 在“选择”短语时在流程中文本短语的呈现下方显示编辑器
问题
是否存在像这样的东西?它叫什么?如果我做了一个,我会叫它什么?
I'm not even sure what to call this UI technique, but consider the following example from IntelliJ IDEA.
IntelliJ Example
Here, the 'field' is the return type of a method, and the 'editing context' is a drop-down of available types. It's 'inline' because this is not a form with labelled fields, it's a 'narrative' (a statement in Java) instead.
My Application
I'm wanting to try the same kind of thing for a browser application I'm writing. Here, the narrative would be something like:
'The appointment is sheduled for 1pm
today.'
Here, the phrase '1pm today' is the 'phrase rendering' of a date-time field. When the user selects it (via tabbing or clicking on it), a panel should 'pop up' beneath the phrase so that the field can be edited. In this case, the editor might be a calendar widget and a time-spinner widget.
Rough conceptualisation in GWT terms
It'd be nice to have a GWT widget which did something like:
- take a mix of widgets, where each widget has a 'text-phrase rendering' and (optionally) an 'editor panel'
- lay out all the rendered phrases in a text-friendly flow
- applied a consistent visual hint where a text-phrase had an editor, and
- displayed the editor underneath the rendering of the text-phrase in the flow, when the phrase was 'selected'
The question
Does there exist something like this? What is it called? If I made one, what would I call it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请查看 GWT Showcase 示例、Cell Sampler 侧面菜单。单击 DatePicker 列下方。
http://gwt.google.com/samples/Showcase/Showcase.html# !CwCellSampler
这是您想要实现的目标吗?
这是一个开源示例
http: //code.google.com/p/google-web-toolkit/source/browse/#svn%2Ftrunk%2Fsamples%2Fshowcase
http://code.google. com/p/google-web-toolkit/source/browse/#svn%2Ftrunk%2Fsamples%2Fshowcase%2Fsrc%2Fcom%2Fgoogle%2Fgwt%2Fsample%2Fshowcase%2Fclient%2Fcontent%2Fcell
Please look at GWT Showcase sample, Cell Sampler side menu. Click under DatePicker column.
http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellSampler
Is this what you are trying to achieve?
This is an open source sample
http://code.google.com/p/google-web-toolkit/source/browse/#svn%2Ftrunk%2Fsamples%2Fshowcase
http://code.google.com/p/google-web-toolkit/source/browse/#svn%2Ftrunk%2Fsamples%2Fshowcase%2Fsrc%2Fcom%2Fgoogle%2Fgwt%2Fsample%2Fshowcase%2Fclient%2Fcontent%2Fcell