是否有用于配置一组元素的分区的标准用户界面范例?

发布于 2024-08-16 18:05:05 字数 378 浏览 9 评论 0原文

假设您有一组对象 X(例如,A、B、C、D),您希望将其划分为覆盖所有 X 的非空子集。数学上,集合的分区

因此,一开始您可能会将它们视为完全不同的 {{A}、{B}、{C}、{D}}。或者,您可以将它们分为元音和辅音,即 {{A}, {B,C,D}}。或者,任意,{{A,D}, {B,C}}。

是否有支持此功能的标准用户界面小部件/概念/范式/模式?使用两个列表框添加 ->、添加全部 ->、<- 删除和 <-- 删除全部在它们之间切换(即列表生成器)仅适用于 2 个子集,但不适用于任意 k 个子集。

Consider you have a set of objects X (e.g., A, B, C, D) that you wish to divide into non-empty subsets that cover all of X. Mathematically, a partition of the set.

So, at first you might treat them as all different, {{A}, {B}, {C}, {D}}. Alternatively, you could separate them into vowels and consonants, i.e. {{A}, {B,C,D}}. Or, arbitrarily, {{A,D}, {B,C}}.

Is there a standard user interface widget/concept/paradigm/pattern that supports this? Having two list boxes with Add ->, Add All ->, <- Remove, and <-- Remove All to switch between them (i.e. a list builder) works for only 2 subsets, but doesn't work for an arbitrary k number of subsets.

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

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

发布评论

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

评论(3

陌生 2024-08-23 18:05:05

我不知道具体的 UI 小部件可以完全满足您的要求,但这里有一些可能有用的 UI 范例(取决于定义子集后需要对子集执行的操作):

  • 颜色编码列表框(允许用户或程序根据项目属于哪个子集,用不同的颜色突出显示项目。在此模型中,能够按颜色对项目进行分组并显示图例非常有用)。
  • 树控件(将组显示为树中节点的子节点。通常,这将是一棵只有两层的树 - 顶部一层是分区,下一层是分区中的项目。能够在分区(节点)之间拖动项目并能够重命名顶级分区在此模型中非常有用。)
  • 分层网格(类似于树控件,但显示附加信息列来描述分区的详细信息)显示的项目)
  • 多列可拖动列表(一组多列,您可以将项目拖入其中。每列代表分区中的一个子集)。

I don't know of specific UI widgets that do exactly what you are asking but here are a few UI paradigms that might be useful (depending on what you need to do with the subsets after they are defined):

  • Color coded list box (allows user or program to highlight items with different colors depending on which subset they belong to.Being able to group items by color and displying a legend are useful in this model).
  • Tree control (displays groups as children of nodes in a tree. Generally this would be a tree with only two levels - the top one being the partition, the next being the items in the partition. The ability to drag items between partitions (nodes) and being able to rename the top level partition can be useful in this model.)
  • Hierarchical grid (similar to a tree control but shows additional columns of information to describe details of the items being displayed)
  • Multi-column draggable lists (a set of multiple columns into which you can drag items. Each column represents one subset in the partition).
执笏见 2024-08-23 18:05:05

将项目分组为集合的标准 UI 是单选按钮列表。糟糕的 ASCII 近似:

A B C
o x o - Item One
o x o - Item Two
o o x - Item Three

这仅适用于少量的集合,但可以用于大量的项目。大多数人会发现这很容易理解并且可以快速浏览。这是塔夫特所说的小倍数的一个例子。如果有人需要将大量物品从一组移动到另一组,这可能会很乏味。我敢打赌,通过允许按下单选按钮进行选择可以减少这种情况。如果你这样做的话,你肯定需要一个撤消功能。

其经常使用的变体使用选项菜单而不是单选按钮组。

它可以像您想要的那样在视觉上复杂 - 大多数 UI 工具包都支持单选按钮状态的自定义图像。这可能是对小倍数概念的更好利用,否则它可能会退化为愤怒的水果沙拉。

我会犹豫是否使用移动物品的设计。拖放选择项非常繁琐,您将遇到菲特定律的麻烦,而不仅仅是几组,并且您将失去独立于分组来组织列表的好处。

The standard UI for grouping items into sets is a list of radio buttons. Terrible ASCII approximation:

A B C
o x o - Item One
o x o - Item Two
o o x - Item Three

This only works well for a small number of sets, but can be used with a large number of items. Most people will find this easy to understand and fast to scan. It's an example of what Tufte calls a small multiple. It may be tedious if someone needs to move large numbers of items from one set to another. I bet that could be reduced by allowing radio button presses on selections. You'd definitely need an undo feature if you did that though.

A frequently used variant of this uses option menus instead of the radio button groups.

It can be as visually sophisticated as you want--most UI toolkits support custom images for the radio button states. This could be an even better use of the small multiple concept, or it could degenerate into angry fruit salad.

I would hesitate to use a design that moves the items. Drag and drop of selections is tedious, you'll run into trouble with Fitt's law for more than just a few sets, and you'll lose the benefit of organizing the list independently of grouping.

没有心的人 2024-08-23 18:05:05

听起来像是拖拽的工作。降低。

一旦来源,就有多个可能的目的地。也许有一个“添加子集”按钮,可以轻松创建新子集。

通过在单个列表上“突出显示”也可以实现同样的效果。按住 Ctrl 键单击选择,然后单击颜色按钮。

Sounds like a job for drag & drop.

Once source, multiple possible destinations. Perhaps an 'add subset' button to allow for easy creation of new subsets.

The same could also be acheived by 'highlights' on a single list. Ctrl-Click select, click a color button.

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