Revision 477 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.serv/org.gvsig.tools.swing.serv.field/src/main/java/org/gvsig/tools/swing/serv/field/component/JNullValueMuttableTextField.java

View differences:

JNullValueMuttableTextField.java
117 117
        }
118 118

  
119 119
        String description = "Empties the field value.";
120
        icon.setDescription(description);
121

  
120 122
        btnEmptyLabel = new JButton();
121 123
        btnEmptyLabel.setActionCommand("BTN_OK");
122 124
        btnEmptyLabel.setOpaque(false);
123 125
        btnEmptyLabel.setBorderPainted(false);
124 126
        btnEmptyLabel.setBorder(BorderFactory.createEmptyBorder());
125
        if (icon!=null){
126
            icon.setDescription(description);
127

  
128
            btnEmptyLabel.setSize(new java.awt.Dimension(icon.getIconWidth(), icon
129
                .getIconHeight()));
130
            btnEmptyLabel.setIcon(icon);            
131
        }else{
132
            btnEmptyLabel.setText("X");            
133
        }
127
        btnEmptyLabel.setSize(new java.awt.Dimension(icon.getIconWidth(), icon
128
            .getIconHeight()));
134 129
        btnEmptyLabel.setHorizontalAlignment(SwingConstants.RIGHT);
135 130
        btnEmptyLabel.setVerticalAlignment(SwingConstants.TOP);
131
        btnEmptyLabel.setIcon(icon);
136 132

  
137 133
        // btnEmptyPanel = new JPanel();
138 134
        // btnEmptyPanel.add(btnEmptyLabel);

Also available in: Unified diff