How can I maximize a newly created window of network view?

52 views
Skip to first unread message

Knacky

unread,
Feb 2, 2012, 4:23:48 AM2/2/12
to cytoscape-discuss
Hello Everyone,

I am creating a plugin of Cytoscape 2.8 and want to create a new
network view, whose window is maximized immediately after created.
I run my plugin on Mac and it works fine--maximized every time a new
view is created.
However, when I run it on Windows, sometimes it is maximized, but
sometimes it doesn't.
Does anyone have a clue about which part of the code I should take
care for this difference?
BTW, I use an expression
CytoscapeInit.getProperties().setProperty("maximizeViewOnCreate",
"true");
every time BEFORE creating a new network view.

Do I have to use other expressions to specify the maximization?

Thank you very much in advance.
Knack

penwa...@gmail.com

unread,
Feb 13, 2012, 7:56:40 PM2/13/12
to cytoscape-discuss
I think this is a bug. I could reproduce the problem on my Windows 7.
If I set the Cytoscape property "maximizeViewOnCreate" to true, not
always work.

The work-around is to get the JInternalFrame and maximize it,

javax.swing.JInternalFrame f =
Cytoscape.getDesktop().getNetworkViewManager().getInternalFrame(view);
try {
f.setMaximum(true);
}
catch (Exception ex)
{}


Peng

Knacky

unread,
Feb 16, 2012, 12:44:45 AM2/16/12
to cytoscape-discuss
I will try it. Thank you very much for your help!

Knack

On Feb 14, 9:56 am, "penwang2...@gmail.com" <penwang2...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages