Revision 1853 org.gvsig.legend.heatmap/trunk/org.gvsig.legend.heatmap/org.gvsig.legend.heatmap.swing/org.gvsig.legend.heatmap.swing.impl/src/main/java/org/gvsig/legend/heatmap/swing/impl/DefaultHeatmapLegendEditor.java

View differences:

DefaultHeatmapLegendEditor.java
71 71
        });
72 72
        translateAll();
73 73
    }
74
    
75
    private void translateAll() {    
74

  
75
    private void translateAll() {
76 76
        this.translate(this.lblDistance);
77 77
        this.translate(this.lblPixels);
78 78
        this.translate(this.rdbUseColorRamp);
......
80 80
        this.translate(this.lblHotColor);
81 81
        this.translate(this.lblHotColorAlpha);
82 82
        this.translate(this.lblColdColor);
83
        this.translate(this.lblHotColorAlpha);
83
        this.translate(this.lblColdColorAlpha);
84 84
        this.translate(this.rdbUseColorTable);
85 85
        this.translate(this.lblColorTable);
86 86
        this.translate(this.chkColorTableUseAlpha);
......
88 88
        this.translate(this.lblColdColorTransparency);
89 89
        this.translate(this.chkUseField);
90 90
    }
91
    
91

  
92 92
    private void translate(AbstractButton component) {
93 93
        I18nManager i18n = ToolsLocator.getI18nManager();
94 94
        component.setText(i18n.getTranslation(component.getText()));
95 95
    }
96
    
96

  
97 97
    private void translate(JLabel component) {
98 98
        I18nManager i18n = ToolsLocator.getI18nManager();
99 99
        component.setText(i18n.getTranslation(component.getText()));
100 100
    }
101
    
101

  
102 102
    @Override
103 103
    public void setData(FLayer layer, ILegend legend) {
104 104
        if( layer == this.layer && legend == this.legend ) {
......
118 118
        }
119 119
        if( this.legend.useAlphaInColorTable() ) {
120 120
            this.chkColorTableUseAlpha.setSelected(true);
121
            this.coldColorChooser.set(this.legend.getRampColdColor());
122
            this.hotColorChooser.set(this.legend.getRampHotColor());
123
            this.spnNumberOfColors.setValue(this.legend.getRampNumColors());
124

  
121 125
        } else {
122 126
            this.chkColorTableUseAlpha.setSelected(false);
123 127
        }
124 128
        this.sldColorTableColdAlpha.setValue(this.legend.getColorTableColdColorAlpha());
125 129
        this.sldColorTableHotAlpha.setValue(this.legend.getColorTableHotColorAlpha());
126 130

  
131

  
127 132
        this.chkUseField.setEnabled(false);
128 133
        this.chkUseField.setSelected(false);
129 134
        this.cboFields.setEnabled(false);
......
160 165
            this.chkColorTableUseAlpha.setEnabled(false);
161 166
            this.sldColorTableColdAlpha.setEnabled(false);
162 167
            this.sldColorTableHotAlpha.setEnabled(false);
163
            Color[] table = this.legend.getSourceColorTable();
164
            this.spnNumberOfColors.setValue(table.length);
165
            this.coldColorChooser.set(table[0]);
166
            this.hotColorChooser.set(table[table.length-1]);
168
            this.spnNumberOfColors.setValue(this.legend.getRampNumColors());
169
            this.coldColorChooser.set(this.legend.getRampColdColor());
170
            this.hotColorChooser.set(this.legend.getRampHotColor());
167 171
        } else {
168 172
            this.hotColorChooser.setEnabled(false);
169 173
            this.coldColorChooser.setEnabled(false);

Also available in: Unified diff