Adding a Frame to my plugin for Cytoscape

11 views
Skip to first unread message

Franktwis

unread,
Nov 26, 2009, 6:06:52 AM11/26/09
to cytoscape-discuss
hi all,
I would to start my plugin in Cytoscape with a GUI that gives
possibilities to initialize a Net that I build after in the code. How
can I do it? Have I simply use swing or awt in Java or there is a
cytoscape class to extend?
Is there an example for doing it?
thanks

piet molenaar

unread,
Nov 26, 2009, 6:40:35 AM11/26/09
to cytoscap...@googlegroups.com
Hi,
In the plugin developers tutorials there is one that shows how to create a panel in the control tabbedpane to the left; you can add your GUI components there, exactly like the vizmapper and network selection tabs.
Hope this helps,
Piet


--

You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To post to this group, send email to cytoscap...@googlegroups.com.
To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cytoscape-discuss?hl=en.





--
Piet Molenaar
p.mol...@amc.uva.nl
Department of Human Genetics, M1-131
Academic Medical Center
University of Amsterdam
Meibergdreef 9
1105 AZ Amsterdam
the Netherlands

tel (+31) 20-5666592
fax (+31) 20-6918626

Franktwis

unread,
Nov 26, 2009, 6:50:59 AM11/26/09
to cytoscape-discuss
Thanks Piet but I don't need this.
A tabbed pane will be a panel included in the Cytoscape GUI. I wanna
that when I launch my plugin a frame appear to give the user
possibilities to initialize the Net. Than clicking on a start button
the net will be created.
thanks the same

On 26 Nov, 12:40, piet molenaar <p.molen...@amc.uva.nl> wrote:
> Hi,
> In the plugin developers
> tutorials<http://cytoscape.wodaklab.org/wiki/plugin_developer_tutorial>there
> is
> one<http://cytoscape.wodaklab.org/wiki/plugin_developer_tutorial#How_to_a...>that
> shows how to create a panel in the control tabbedpane to the left; you
> can add your GUI components there, exactly like the vizmapper and network
> selection tabs.
> Hope this helps,
> Piet
>
> On Thu, Nov 26, 2009 at 12:06 PM, Franktwis <francescomusacc...@gmail.com>wrote:
>
>
>
>
>
> > hi all,
> > I would to start my plugin in Cytoscape with a GUI that gives
> > possibilities to initialize a Net that I build after in the code. How
> > can I do it? Have I simply use swing or awt in Java or there is a
> > cytoscape class to extend?
> > Is there an example for doing it?
> > thanks
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "cytoscape-discuss" group.
> > To post to this group, send email to cytoscap...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cytoscape-disc...@googlegroups.com<cytoscape-discuss%2Bunsubscr i...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/cytoscape-discuss?hl=en.
>
> --
> Piet Molenaar
> p.molen...@amc.uva.nl

piet molenaar

unread,
Nov 26, 2009, 7:09:11 AM11/26/09
to cytoscap...@googlegroups.com
Hi,
I think you can accomplish this simply by adding the required initialization fields in such a panel and add a start-button to that. Alternatively you can add a menuitem and in the actionPerformed method you create a dialog including the initialization fields...
Hope this helps,
Piet

To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/cytoscape-discuss?hl=en.





--
Piet Molenaar
p.mol...@amc.uva.nl

Franktwis

unread,
Nov 26, 2009, 7:32:14 AM11/26/09
to cytoscape-discuss
Ok.. I'll try adding only the frame with java and see what happen!
thanks

On 26 Nov, 13:09, piet molenaar <p.molen...@amc.uva.nl> wrote:
> Hi,
> I think you can accomplish this simply by adding the required initialization
> fields in such a panel and add a start-button to that. Alternatively you can
> add a menuitem<http://cytoscape.wodaklab.org/wiki/plugin_developer_tutorial#How_to_a...>and
> in the actionPerformed method you create a dialog including the
> initialization fields...
> Hope this helps,
> Piet
>
> > > > cytoscape-disc...@googlegroups.com<cytoscape-discuss%2Bunsubscr i...@googlegroups.com><cytoscape-discuss%2Bunsubscr

piet molenaar

unread,
Nov 26, 2009, 7:42:19 AM11/26/09
to cytoscap...@googlegroups.com
Yep, see below for some code I used...


public class AlgorithmAction extends CytoscapeAction
{
 
    public AlgorithmAction()
    {
        super("Open initialization dialog");
    }

    public void actionPerformed(ActionEvent evt)
    {
        AlgorithmDialog dialog = new AlgorithmDialog();
        dialog.setVisible(true);
    }

}

public class AlgorithmDialog extends JDialog implements ActionListener, ListSelectionListener, ItemListener {


// all kinds of GUI elements and actionPerformed methods go here one of which is a startbutton

      public void actionPerformed(ActionEvent evt) {
        if (evt.getSource().equals(myBuildNetworkBt)) {
          Cytoscape.createNetwork("new Network");
     
}

}


To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/cytoscape-discuss?hl=en.





--
Piet Molenaar
p.mol...@amc.uva.nl
Reply all
Reply to author
Forward
0 new messages