Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vladimír Ulman
    @xulman
    I would first had a look into the sources to see if I can manage by learning from it, if I fail, I would love to come to you...
    Matthias Arzt
    @maarzt
    @haesleinhuepf what's the thing you would like me to show?
    Robert Haase
    @haesleinhuepf
    How to build InputWigets for whatever input...
    I was just wondering if this may be part of the learnathon in any case..
    If not, no worry
    Just curious ;-)
    Vladimír Ulman
    @xulman
    so a quick question on @maarzt : is the input table static (meaning that I have to specify its no of columns and rows) or dynamic (empty table pops up and user can resize it)?
    Matthias Arzt
    @maarzt
    It's not planned so far, but actually it would be nice to have it on the learnathon
    Vladimír Ulman
    @xulman
    typo: ... its number of ....
    just curious before I give it a try myself... in the case you would remember by heart... otherwise just ignore this question :)
    Matthias Arzt
    @maarzt
    This InputWidget I wrote is just for selecting a table
    Vladimír Ulman
    @xulman
    aha, ok...
    Matthias Arzt
    @maarzt
    Some plugins produce tables as output, which are then displayed in FIJI, and I wrote a InputWidget, where you select one of the tables that are currently displayed
    Vladimír Ulman
    @xulman
    got it
    still I find it very usefull... in my story: I can ask users to prepare the table aside in the Fiji and then use your InoutWidget to choose it
    Matthias Arzt
    @maarzt
    For what kind of input are you searching?
    I would like to replace such file with a table
    the JobSpec may change based on mergingModel... the example is using one column, but some modes require two columns
    elements in a table should be basically filename patterns
    strings
    Matthias Arzt
    @maarzt
    Do you need multiple colums?
    If you don't need multiple columns an multi line text input might be satisfying.
    Vladimír Ulman
    @xulman
    ha! that's an interesting idea!
    depending on the Merging model I, currently, need one or two columns
    but I could replace the Job file item with the multiline item... and have users to cut and paste there... and easier guide them, e.g., by placing '??' to the place where parsing failed
    using the callback functionality of the plugin dialogs
    Matthias Arzt
    @maarzt
    There's no multi line text input as far as i can see.
    Vladimír Ulman
    @xulman
    hmm... so I have to learn the InputWidget anyway, very good :-)
    thanks both of you for the inputs and advices
    Matthias Arzt
    @maarzt
    There is multi line text input but it's not working on my machine:
    ```
    /*
     * To the extent possible under law, the ImageJ developers have waived
     * all copyright and related or neighboring rights to this tutorial code.
     *
     * See the CC0 1.0 Universal license for details:
     *     http://creativecommons.org/publicdomain/zero/1.0/
     */
    
    import net.imagej.ImageJ;
    import org.scijava.command.Command;
    import org.scijava.plugin.Parameter;
    import org.scijava.plugin.Plugin;
    
    @Plugin(type = Command.class, menuPath = "Tutorials>Text Area Demo")
    public class TextAreaDemo implements Command {
    
        @Parameter(label = "String + Text Area", style = "text area")
        private String string;
    
        @Override
        public void run() {
            System.out.println(string);
        }
    
        public static void main(final String... args) throws Exception {
            final ImageJ ij = new ImageJ();
            ij.ui().showUI();
            ij.command().run(TextAreaDemo.class, true);
        }
    }
    Can you try to execute this class, it should give you a multi line text input
    Vladimír Ulman
    @xulman
    hmm, fails for me too :(
    I've tried to be more clever/explicit by using , style = TextWidget.AREA_STYLE
    but I failed exactly the same way as in the original case
    Matthias Arzt
    @maarzt
    I am currently fixing this bug.
    Vladimír Ulman
    @xulman
    thanks!
    Matthias Arzt
    @maarzt
    If you want to use it before it's merged and released you would need to clone this branch and run mvn install

    Than you would have to add
    ```<artifactId>scijava-ui-swing</artifactId>

    <version>0.9.3-SNAPSHOT</version>

    Type: Than you would have to add scijava-ui-swing snapshot dependency to your project
    <artifactId>scijava-ui-swing</artifactId>
    <version>0.9.3-SNAPSHOT</version>
    Vladimír Ulman
    @xulman
    that last addition I need to add to my project right? to enforce that ui-swing is at the version the bugfix is expecting?
    Matthias Arzt
    @maarzt
    yes
    Vladimír Ulman
    @xulman
    hmm.... but if I base my plugin on this "local" branch, it will keep breaking down for anyone with the official Fiji distribution (until your bugfix is not generally available), right?
    because this bugfixed version of swing is not part of the plugin jar... and even if it would be, would it be used instead of the "default" one that would be around as a part of Fiji collection of jars...
    ?
    Vladimír Ulman
    @xulman
    BTW:
    <groupId>org.scijava</groupId>
    <artifactId>scijava-ui-swing</artifactId>
    <version>0.9.3-SNAPSHOT</version>