~tudor/flywire/0.2.1

« back to all changes in this revision

Viewing changes to src/org/bentokit/flywire/gui/components/StringComponent.java

  • Committer: tudor
  • Date: 2011-03-12 00:47:02 UTC
  • Revision ID: svn-v4:48700339-fa25-0410-b67c-989cebe9404f:branches/0.2:78
Compiles and runs, but is much broken.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.bentokit.flywire.gui.components;
 
2
 
 
3
import javax.swing.JLabel;
 
4
 
 
5
public class StringComponent extends ValueComponent<String> {
 
6
        /**
 
7
         * 
 
8
         */
 
9
        private static final long serialVersionUID = -5510491870786595601L;
 
10
        
 
11
        JLabel label;
 
12
        
 
13
        public StringComponent(String value) {
 
14
                this.setValue(value);
 
15
        }
 
16
        
 
17
        public StringComponent() {
 
18
                this.label = new JLabel();
 
19
        }
 
20
        
 
21
        @Override
 
22
        public String getValue() {
 
23
                return this.label.getText();
 
24
        }
 
25
 
 
26
        @Override
 
27
        public void setValue(String value) {
 
28
                this.label.setText(value);              
 
29
        }
 
30
        
 
31
}