Skip to content

Using swing UI causes command dialogs to show some invisible items #18

Open
@lnyng

Description

@lnyng

When ImageJ is launched with the swing as the default UI:

ImageJ ij = new ImageJ();
ij.ui().setDefaultUI(ij.ui().getUI("swing"));
ij.ui().showUI();
Dataset blobs = ij.scifio().datasetIO().open("http://imagej.net/images/blobs.gif");
ij.ui().show(blobs);

Any following calls to commands that have a ImageDisplay parameter with type = ItemIO.BOTH or type = ItemIO.INPUT will cause the command dialog to show an item "display" with a long string of its ImageDisplay.toString().

For example, ij.command().run(SubtractFromDataValues.class, true); pops up such dialog with unexpected behavior. Using the legacy UI (e.g. removing the "setDefaultUI" line of code above) does not produce such problem, so I suspect that it is the swing UI causes the problem.

Is this a bug, or is there any correct way to programmatically run a command so that the display item will be invisible? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions