Author: kono
Date: 2012-12-06 12:23:04 -0800 (Thu, 06 Dec 2012)
New Revision: 30906
Modified:
core3/impl/trunk/webservice-impl/src/main/java/org/cytoscape/webservice/internal/ui/AboutDialog.java
Log:
Some cosmetic issues had been fixed.
Modified:
core3/impl/trunk/webservice-impl/src/main/java/org/cytoscape/webservice/internal/ui/AboutDialog.java
===================================================================
---
core3/impl/trunk/webservice-impl/src/main/java/org/cytoscape/webservice/internal/ui/AboutDialog.java
2012-12-06 01:45:44 UTC (rev 30905)
+++
core3/impl/trunk/webservice-impl/src/main/java/org/cytoscape/webservice/internal/ui/AboutDialog.java
2012-12-06 20:23:04 UTC (rev 30906)
@@ -1,7 +1,7 @@
package org.cytoscape.webservice.internal.ui;
import java.awt.Dialog;
-import java.awt.Frame;
+import java.awt.Dimension;
import java.awt.Window;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -28,14 +28,21 @@
* About page for web service clients or other plugins. Accepts HTML as the
* argument.
*/
-public class AboutDialog extends JDialog implements HyperlinkListener {
-
+public final class AboutDialog extends JDialog implements HyperlinkListener {
+
private static final long serialVersionUID = 8966870102741519552L;
private static final Logger logger =
LoggerFactory.getLogger(AboutDialog.class);
+ private static final Dimension WINDOW_SIZE = new Dimension(500, 400);
+
private final OpenBrowser openBrowser;
+ private JEditorPane mainEditorPane;
+ private JScrollPane mainScrollPane;
+ private JLabel titleLabel;
+ private JPanel titlePanel;
+ private JPanel mainPanel;
/** Creates new form WSAboutDialog */
public AboutDialog(Window parent, Dialog.ModalityType modal, final
OpenBrowser openBrowser) {
@@ -46,16 +53,20 @@
mainEditorPane.addHyperlinkListener(this);
setLocationRelativeTo(parent);
setAlwaysOnTop(true);
+ this.setPreferredSize(WINDOW_SIZE);
+ this.setSize(WINDOW_SIZE);
}
- public AboutDialog(Window parent, Dialog.ModalityType modal, String
title, Icon icon, URL contentURL, final OpenBrowser openBrowser) {
+ public AboutDialog(Window parent, Dialog.ModalityType modal, String
title, Icon icon, URL contentURL,
+ final OpenBrowser openBrowser) {
super(parent, modal);
this.openBrowser = openBrowser;
initComponents();
mainEditorPane.setContentType("text/html");
+ this.setPreferredSize(WINDOW_SIZE);
+ this.setSize(WINDOW_SIZE);
}
-
-
+
public void showDialog(String title, Icon icon, String description) {
titleLabel.setText(title);
titleLabel.setIcon(icon);
@@ -85,7 +96,6 @@
}
}
-
private void initComponents() {
titlePanel = new JPanel();
titleLabel = new JLabel();
@@ -146,19 +156,6 @@
pack();
} // </editor-fold>
- // Variables declaration - do not modify
- private JEditorPane mainEditorPane;
- private JScrollPane mainScrollPane;
- private JLabel titleLabel;
- private JPanel titlePanel;
- private JPanel mainPanel;
-
- /**
- * DOCUMENT ME!
- *
- * @param e
- * DOCUMENT ME!
- */
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() != HyperlinkEvent.EventType.ACTIVATED)
return;
@@ -171,5 +168,4 @@
logger.warn("Unable to open browser for " +
url.toString(), err);
}
}
- // End of variables declaration
-}
+}
\ No newline at end of file
--
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.