jdk/src/share/classes/sun/tools/jconsole/inspector/XTextField.java
author xdono
Wed, 02 Jul 2008 12:55:45 -0700
changeset 715 f16baef3a20e
parent 55 5ecee29e98d8
child 5506 202f599c92aa
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 55
diff changeset
     2
 * Copyright 2004-2008 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
55
5ecee29e98d8 6655515: MBeans tab: operation return values of type Component displayed as String
lmalvent
parents: 2
diff changeset
    25
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package sun.tools.jconsole.inspector;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.awt.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.awt.dnd.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.awt.event.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.awt.datatransfer.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.util.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import javax.swing.plaf.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import javax.swing.event.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import javax.swing.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * This list implements the drag and drop functionality.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
@SuppressWarnings("serial")
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
public class XTextField extends JPanel
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    implements DocumentListener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
               ActionListener {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    private static final Color selF = Color.red;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    private static final Color selB = Color.yellow;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    private Color fore=null, back=null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    private HashMap items = null; //used for popup menu selection
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    private XObject selectedObject;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    private XObject currentObject;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    private Class expectedClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    private Object value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    protected JTextField textField;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    private JButton browseObjects;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    private static boolean allowNullSelection = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    protected final static int COMPATIBLE_VALUE = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    protected final static int CURRENT_VALUE = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    protected final static int NULL_VALUE = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    private JButton button;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    private XOperations operation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    //used in XTestFieldEditor
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    public XTextField() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        super(new BorderLayout());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
        add(textField = new JTextField(),BorderLayout.CENTER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        textField.addActionListener(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    public XTextField(Object value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
        this(value,value.toString().length());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    public XTextField(Object value, int colWidth) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        this(value,value.getClass(),colWidth, true, null, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    public XTextField(Object value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                      Class expectedClass,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                      int colWidth,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                      boolean isCallable,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
                      JButton button,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
                      XOperations operation) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        super(new BorderLayout());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        this.expectedClass = expectedClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        this.button = button;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        this.operation = operation;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        add(textField = new JTextField(value.toString(),colWidth),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            BorderLayout.CENTER);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        if(isCallable)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            textField.addActionListener(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        boolean fieldEditable = Utils.isEditableType(expectedClass.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        if (fieldEditable && isCallable) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            textField.setEditable(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            textField.setEditable(false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    public static void setNullSelectionAllowed(boolean allowNullSelection) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        XTextField.allowNullSelection = allowNullSelection;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    public static boolean getNullSelectionAllowed() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        return allowNullSelection;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    protected void init(Object value, Class expectedClass) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        this.expectedClass = expectedClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
        this.value = value;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        boolean fieldEditable =  Utils.isEditableType(expectedClass.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
        clearObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        if (value != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            currentObject = new XObject(value);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            textField.setText(value.toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            currentObject = XObject.NULL_OBJECT;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            //null String value for the moment
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            textField.setText("");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        textField.setToolTipText(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
        if (fieldEditable) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            if (!textField.isEditable()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                textField.setEditable(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            if (textField.isEditable()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                textField.setEditable(false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    private synchronized void setObject(XObject object) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        clearObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        selectedObject = object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        currentObject = object;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        setSelectedColors();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        textField.setText(object.getText());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        textField.getDocument().addDocumentListener(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        paintImmediately(getVisibleRect());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    private synchronized void clearObject() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        textField.getDocument().removeDocumentListener(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        selectedObject = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        currentObject = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        setDefaultColors();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    private synchronized void setSelectedColors() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        // fore = textField.getForeground();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        // back = textField.getBackground();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        //textField.setForeground(Color.red);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        // textField.setBackground(Color.yellow);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    private synchronized void setDefaultColors() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
        //  if (fore != null) textField.setForeground(fore);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        // if (back != null)  textField.setBackground(back);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    public void setHorizontalAlignment(int h) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        textField.setHorizontalAlignment(h);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    //can be overwritten
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    protected JMenuItem buildJMenuItem(XObject xobject, int valueType) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        if (valueType == COMPATIBLE_VALUE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
            return new JMenuItem(xobject.getText());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        else if (valueType == CURRENT_VALUE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
            return new JMenuItem("> "+xobject.getText());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        else if (valueType == NULL_VALUE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            return new JMenuItem("null");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
            return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    private JPopupMenu buildEditPopupMenu() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        JPopupMenu menu = new JPopupMenu();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        return menu;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    // ACTIONLISTENER IMPLEMENTATION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    public void actionPerformed(ActionEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        if (e.getSource() instanceof JTextField) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
            if(operation != null)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                operation.performInvokeRequest(button);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * This method returns either the user inputted String, or an XObject
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * if one was dropped on the input field.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    public Object getValue() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        if (selectedObject!=null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
            if (selectedObject == XObject.NULL_OBJECT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                //null case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
                return null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
            else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                return selectedObject;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
            return  textField.getText();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    public void changedUpdate(DocumentEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        // the user typed something, so remove references
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        // to the obejct that was dropped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        clearObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    public void removeUpdate(DocumentEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
        // the user typed something, so remove references
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
        // to the obejct that was dropped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
        clearObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    public void insertUpdate(DocumentEvent e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
        // the user typed something, so remove references
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
        // to the obejct that was dropped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
        clearObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
}