8000 Allow for multiple rows of node states, reordering nodes · Issue #26 · emichael/dslabs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Allow for multiple rows of node states, reordering nodes #26
Open
@emichael

Description

@emichael

Right now, all nodes are laid out in a single row. On very wide screens, this is fine. On smaller screens, trying to view more than 4 nodes at once is difficult. Nodes usually don't need the entire vertical height of the screen. There is quite a lot of white space in the node state box, and scrolling through the message inbox/timer queue above a node is preferable to scrolling horizontally when space is tight.

It would be nice to be able to layout SingleNodePanels in multiple rows. I attempted a quick and dirty version where there were either one or two rows, and when there were two rows, they were separated by a JSplitPane. This ran into some bizarre issues. I think the "right" way is to use multiple JXMultiSplitPanes, one in vertical mode to hold the rows, and others in horizontal mode to hold each row, and use this trick to display only one row.

// XXX: Disgusting hack to show only 1 leaf node
if (numShown == 1) {
Leaf l = new Leaf("DUMMY-LEAF-1");
l.setWeight(0.0);
layoutNodes.add(new Divider());
layoutNodes.add(l);
}
split.setChildren(layoutNodes);
splitPane.setModel(split);
for (Address a : addresses) {
if (!nodesActive.get(a).isSelected()) {
continue;
}
splitPane.add(statePanels.get(a), a.toString());
}
if (numShown == 1) {
splitPane.add(new JPanel(), "DUMMY-LEAF-1");
layout.displayNode("DUMMY-LEAF-1", false);
}

The other piece that would be nice is a way for users to reorder nodes. This could be as simple as replacing the "Show/hide nodes" panel in the sidebar with a reorderable list of checkboxes. This tutorial might be helpful: http://www.java2s.com/Tutorial/Java/0240__Swing/Usedraganddroptoreorderalist.htm The best version of that feature would be the ability to drag and drop SingleNodePanels by dragging the node name, but that seems very difficult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:visualizerIssues and PRs relating to the new visualization toolenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      < 2B58 /div>
      0