Author: laylaoesper
Date: 2010-10-04 18:45:33 -0700 (Mon, 04 Oct 2010)
New Revision: 22144
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/jars/WordCloud.jar
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/AboutPanel.java
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CloudDisplayPanel.java
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CreateCloudAction.java
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SaveCloudAction.java
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SemanticSummaryInputPanel.java
Log:
Changes to save whole image and placement of the save button.
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/jars/WordCloud.jar
===================================================================
(Binary files differ)
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/AboutPanel.java
===================================================================
---
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/AboutPanel.java
2010-10-04 23:58:43 UTC (rev 22143)
+++
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/AboutPanel.java
2010-10-05 01:45:33 UTC (rev 22144)
@@ -63,7 +63,7 @@
//"\" ></div></td>"+
"</tr></table>" +
"<p align=center>WordCloud is a Cytoscape plugin that
generates a word tag cloud<BR>"+
- "from a user-define node selection, summarizing an attribute
of choice.<BR>" +
+ "from a user-define node selection, summarizing attributes of
choice.<BR>" +
"<BR>" +
"by Layla Oesper, Daniele Merico, Ruth Isserlin and Gary
Bader<BR>" +
"(<a href='http://www.baderlab.org/'>Bader Lab</a>, University
of Toronto)<BR>" +
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CloudDisplayPanel.java
===================================================================
---
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CloudDisplayPanel.java
2010-10-04 23:58:43 UTC (rev 22143)
+++
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CloudDisplayPanel.java
2010-10-05 01:45:33 UTC (rev 22144)
@@ -58,7 +58,7 @@
JScrollPane cloudScroll;
CloudParameters curCloud;
JPanel saveCloudPanel;
- JButton saveCloudButton;
+ //JButton saveCloudButton;
//CONSTRUCTORS
@@ -72,7 +72,7 @@
cloudScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
add(cloudScroll, BorderLayout.CENTER);
-
+ /*
saveCloudButton = new JButton("Export Cloud to File");
saveCloudButton.setEnabled(false);
saveCloudButton.setToolTipText("Saves the current cloud as an
image file");
@@ -81,6 +81,7 @@
saveCloudPanel = new JPanel(new BorderLayout());
saveCloudPanel.add(saveCloudButton,BorderLayout.EAST);
add(saveCloudPanel, BorderLayout.SOUTH);
+ */
}
//METHODS
@@ -229,9 +230,11 @@
curCloud = params;
}
+ /*
public JButton getSaveCloudButton()
{
return saveCloudButton;
}
+ */
}
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CreateCloudAction.java
===================================================================
---
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CreateCloudAction.java
2010-10-04 23:58:43 UTC (rev 22143)
+++
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/CreateCloudAction.java
2010-10-05 01:45:33 UTC (rev 22144)
@@ -162,7 +162,7 @@
inputPanel.getSaveCloudButton().setEnabled(true);
CloudDisplayPanel displayPanel =
SemanticSummaryManager.getInstance().getCloudWindow();
- displayPanel.getSaveCloudButton().setEnabled(true);
+ //displayPanel.getSaveCloudButton().setEnabled(true);
//Update the list of filter words and checkbox
inputPanel.refreshNetworkSettings();
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SaveCloudAction.java
===================================================================
---
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SaveCloudAction.java
2010-10-04 23:58:43 UTC (rev 22143)
+++
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SaveCloudAction.java
2010-10-05 01:45:33 UTC (rev 22144)
@@ -107,7 +107,7 @@
CytoPanel cytoPanel =
Cytoscape.getDesktop().getCytoPanel(SwingConstants.SOUTH);
Dimension curSize = cytoPanel.getSelectedComponent().getSize();
-
+ /*
//Can I make it work with just the flow panel
//Gives exact copy of what is visible (includes scroll bars) -
KEEPER
JScrollPane scroll = panel.cloudScroll;
@@ -118,7 +118,34 @@
frame.pack();
frame.setLocation(-100, -100);
frame.setVisible(true);
+ */
+
+ //Can I make it work with just the flow panel
+ //Gives exact copy of what is visible (includes scroll bars) -
KEEPER
+ JScrollPane scroll = panel.cloudScroll;
+ JFrame frame = new JFrame(cloudName);
+
+ int scrollHeight = scroll.getSize().height;
+ JPanel flowPanel = panel.getTagCloudFlowPanel();
+ int flowHeight = flowPanel.getSize().height;
+ flowHeight = flowHeight + 5; // need a little extra so scroll
bars don't show
+
+ //System.out.println("Scroll: " + scrollHeight);
+ //System.out.println("Flow: " + flowHeight);
+
+ int width = curSize.width;
+
+ Dimension fullSize = new Dimension(width, flowHeight);
+
+
+ scroll.setPreferredSize(fullSize);
+ frame.getContentPane().add(scroll);
+ scroll.revalidate();
+ frame.pack();
+ frame.setLocation(-100, -100);
+ frame.setVisible(true);
+
/*
//Gives exact copy of what is visible (includes scroll bars) -
KEEPER
JFrame frame = new JFrame(cloudName);
Modified:
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SemanticSummaryInputPanel.java
===================================================================
---
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SemanticSummaryInputPanel.java
2010-10-04 23:58:43 UTC (rev 22143)
+++
csplugins/trunk/soc/layla/WordCloudPlugin/trunk/WordCloud/src/cytoscape/csplugins/wordcloud/SemanticSummaryInputPanel.java
2010-10-05 01:45:33 UTC (rev 22144)
@@ -812,6 +812,7 @@
cloudLayoutPanel.add(createNetworkButton, gridBagConstraints);
//Save file to .jpg stuff
+ /*
JLabel saveCloudLabel = new JLabel("Save Cloud Image:");
saveCloudButton = new JButton("Export Cloud to File");
@@ -834,6 +835,7 @@
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(5, 10, 0, 0);
cloudLayoutPanel.add(saveCloudButton, gridBagConstraints);
+ */
collapsiblePanel.getContentPane().add(panel,BorderLayout.NORTH);
return collapsiblePanel;
@@ -854,16 +856,22 @@
JButton deleteButton = new JButton("Delete");
JButton updateButton = new JButton("Update");
JButton createButton = new JButton("Create");
+
+ saveCloudButton = new JButton("Save Image");
+ saveCloudButton.setEnabled(false);
+ saveCloudButton.setToolTipText("Saves the current cloud as an
image file");
//Add actions to buttons
createButton.addActionListener(new CreateCloudAction());
deleteButton.addActionListener(new DeleteCloudAction());
updateButton.addActionListener(new UpdateCloudAction());
+ saveCloudButton.addActionListener(new SaveCloudAction());
//Add buttons to panel
panel.add(deleteButton);
panel.add(updateButton);
panel.add(createButton);
+ panel.add(saveCloudButton);
return panel;
}
@@ -944,13 +952,13 @@
{
createNetworkButton.setEnabled(false);
saveCloudButton.setEnabled(false);
- displayPanel.getSaveCloudButton().setEnabled(false);
+ //displayPanel.getSaveCloudButton().setEnabled(false);
}
else
{
createNetworkButton.setEnabled(true);
saveCloudButton.setEnabled(true);
- displayPanel.getSaveCloudButton().setEnabled(true);
+ //displayPanel.getSaveCloudButton().setEnabled(true);
}
SemanticSummaryManager.getInstance().setCurCloud(params);
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.