Author: kono
Date: 2012-03-23 15:59:24 -0700 (Fri, 23 Mar 2012)
New Revision: 28640
Modified:
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/StringHandler.java
Log:
Cosmetic issues had been fixed for String Tunable Handler.
Modified:
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/StringHandler.java
===================================================================
---
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/StringHandler.java
2012-03-23 22:34:49 UTC (rev 28639)
+++
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/StringHandler.java
2012-03-23 22:59:24 UTC (rev 28640)
@@ -1,6 +1,7 @@
package org.cytoscape.work.internal.tunables;
import java.awt.BorderLayout;
+import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -17,8 +18,11 @@
* @author pasteur
*/
public class StringHandler extends AbstractGUITunableHandler implements
ActionListener {
+
+ private static final Font TEXT_FONT = new Font("SansSerif",
Font.PLAIN,12);
+ private static final Font LABEL_FONT = new Font("SansSerif", Font.BOLD
,13);
+
private JFormattedTextField textField;
- private boolean horizontal = false;
/**
* Constructs the <code>GUIHandler</code> for the <code>String</code>
type
@@ -52,10 +56,13 @@
//set Gui
textField = new JFormattedTextField(s);
panel = new JPanel(new BorderLayout());
- JLabel label = new JLabel(getDescription());
- label.setFont(new Font(null, Font.PLAIN,12));
- textField.setHorizontalAlignment(JTextField.RIGHT);
+ final JLabel label = new JLabel(getDescription());
+ label.setFont(LABEL_FONT);
+ textField.setFont(TEXT_FONT);
+
+ textField.setHorizontalAlignment(JTextField.LEFT);
textField.addActionListener(this);
+ textField.setPreferredSize(new Dimension(200, 15));
if (horizontal) {
panel.add(label, BorderLayout.NORTH);
--
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.