Ignore:
Timestamp:
2003-05-27T15:57:37+12:00 (21 years ago)
Author:
kjdon
Message:

re-tabbed the code for java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/combobox/GComboBox.java

    r4293 r4366  
    5555 */
    5656public class GComboBox
    57     extends JComboBox {
     57    extends JComboBox {
    5858
    59     private JTextField text;
     59    private JTextField text;
    6060
    61     public GComboBox() {
    62           super();
    63           text = (JTextField) this.getEditor().getEditorComponent();
    64     }
     61    public GComboBox() {
     62    super();
     63    text = (JTextField) this.getEditor().getEditorComponent();
     64    }
    6565
    66     public GComboBox(ComboBoxModel model) {
    67           super(model);
    68           text = (JTextField) this.getEditor().getEditorComponent();
    69     }   
     66    public GComboBox(ComboBoxModel model) {
     67    super(model);
     68    text = (JTextField) this.getEditor().getEditorComponent();
     69    }   
    7070
    71     public void addDocumentListener(DocumentListener listener) {
    72           if(text != null) text.getDocument().addDocumentListener(listener);
    73     }
     71    public void addDocumentListener(DocumentListener listener) {
     72    if(text != null) text.getDocument().addDocumentListener(listener);
     73    }
    7474
    75     public void addKeyListener(KeyListener listener) {
    76           if(text != null) text.addKeyListener(listener);
    77     }
     75    public void addKeyListener(KeyListener listener) {
     76    if(text != null) text.addKeyListener(listener);
     77    }
    7878
    79     public String getText() {
    80           if(text != null) {
    81                 return text.getText();
    82           }
    83           GComboBoxModel model = (GComboBoxModel)this.getModel();
    84           return (String)model.getSelectedItem();
    85     }
     79    public String getText() {
     80    if(text != null) {
     81        return text.getText();
     82    }
     83    GComboBoxModel model = (GComboBoxModel)this.getModel();
     84    return (String)model.getSelectedItem();
     85    }
    8686
    87     public void setText(String value) {
    88           if(text != null) text.setText(value);
    89     }
     87    public void setText(String value) {
     88    if(text != null) text.setText(value);
     89    }
    9090
    91     public void removeDocumentListener(DocumentListener listener) {
    92           if(text != null) text.getDocument().removeDocumentListener(listener);
    93     }
     91    public void removeDocumentListener(DocumentListener listener) {
     92    if(text != null) text.getDocument().removeDocumentListener(listener);
     93    }
    9494
    95     public void removeKeyListener(KeyListener listener) {
    96           if(text != null) text.removeKeyListener(listener);
    97     }
     95    public void removeKeyListener(KeyListener listener) {
     96    if(text != null) text.removeKeyListener(listener);
     97    }
    9898}
Note: See TracChangeset for help on using the changeset viewer.