Revision 8707 trunk/extensions/extArcims/src/es/prodevelop/cit/gvsig/arcims/gui/panels/LayerScaleDrawPanel.java
LayerScaleDrawPanel.java | ||
---|---|---|
38 | 38 |
// ---------------------------------------------------------------------------- |
39 | 39 |
private double minScale = 500.0; |
40 | 40 |
private double maxScale = 10000000.0; |
41 |
private int minScaleX = 88; // +- 8 for less than and more than |
|
41 |
private int minScaleX = 93; //88; // +- 8 for less than and more than
|
|
42 | 42 |
private int maxScaleX = 762; |
43 | 43 |
private int margin = 8; |
44 | 44 |
private int rowHeight = 12; |
45 | 45 |
private int rowSep = 15; |
46 | 46 |
private int parentDialogMinLimitForNormalTitle = 485; |
47 | 47 |
private int parentDialogMinLimitForShortTitle = 350; |
48 |
private Color carrilColor = new Color(219, 219, 219); |
|
49 |
private Color scaleLineColor = new Color(199, 106, 191); |
|
48 | 50 |
// ---------------------------------------------------------------------------- |
49 | 51 |
private double logDist = Math.log(maxScale) - Math.log(minScale); |
50 | 52 |
private String title = ""; |
... | ... | |
129 | 131 |
|
130 | 132 |
|
131 | 133 |
private int getLabelsWidth() { |
132 |
return minScaleX - margin; |
|
134 |
return minScaleX - margin - 5;
|
|
133 | 135 |
} |
134 | 136 |
|
135 | 137 |
public void paint(Graphics g) { |
... | ... | |
167 | 169 |
w = scaleDomainToXDomain(info.getMaxSc()) - x_min; |
168 | 170 |
y_min = indexDomainToYDomain(i); |
169 | 171 |
|
170 |
g2d.setColor( new Color(235, 235, 235) );
|
|
172 |
g2d.setColor( carrilColor );
|
|
171 | 173 |
g2d.fillRect((minScaleX - margin), y_min, x_max - (minScaleX - margin), rowHeight); |
172 | 174 |
|
173 | 175 |
g2d.setColor( info.getColor(currentScale) ); |
... | ... | |
266 | 268 |
|
267 | 269 |
Stroke old = g.getStroke(); |
268 | 270 |
g.setStroke(new BasicStroke(1)); |
269 |
g.setColor(Color.ORANGE);
|
|
271 |
g.setColor(scaleLineColor);
|
|
270 | 272 |
g.drawLine(x, y_min, x, y_max); |
271 | 273 |
|
272 | 274 |
// little square |
... | ... | |
276 | 278 |
|
277 | 279 |
if (currentScale > medScale) { // label to the left |
278 | 280 |
g.drawLine(x, y_max, x - footLength, y_max); |
279 |
g.setColor(LayerScaleData.darker(Color.ORANGE));
|
|
281 |
g.setColor(LayerScaleData.darker(scaleLineColor));
|
|
280 | 282 |
g.setFont(new Font(fontName, Font.BOLD, 12)); |
281 | 283 |
g.drawString(PluginServices.getText(this, "current_scale"), x - footLength, y_max - 4); |
282 | 284 |
} else { // label to the right |
283 | 285 |
g.drawLine(x, y_max, x + 10, y_max); |
284 |
g.setColor(LayerScaleData.darker(Color.ORANGE));
|
|
286 |
g.setColor(LayerScaleData.darker(scaleLineColor));
|
|
285 | 287 |
g.setFont(new Font(fontName, Font.BOLD, 12)); |
286 | 288 |
g.drawString(PluginServices.getText(this, "current_scale"), x + 15, y_max + 4); |
287 | 289 |
} |
... | ... | |
329 | 331 |
g.drawString(PluginServices.getText(this, "NO"), auxx, auxy + correction); |
330 | 332 |
|
331 | 333 |
// --------- samples --------------------- |
332 |
g.setColor(LayerScaleData.darker(LayerScaleData.featColor));
|
|
334 |
g.setColor(LayerScaleData.featYesColor);
|
|
333 | 335 |
g.fillRect(smpx, smpy, sampleW, rowHeight); |
334 | 336 |
|
335 |
g.setColor(LayerScaleData.featColor); |
|
337 |
g.setColor(LayerScaleData.featNoColor);
|
|
336 | 338 |
g.fillRect(smpx + sampleW, smpy, sampleW, rowHeight); |
337 | 339 |
|
338 |
g.setColor(LayerScaleData.darker(LayerScaleData.imagColor));
|
|
340 |
g.setColor(LayerScaleData.imagYesColor);
|
|
339 | 341 |
g.fillRect(smpx, smpy + rowSep, sampleW, rowHeight); |
340 | 342 |
|
341 |
g.setColor(LayerScaleData.imagColor); |
|
343 |
g.setColor(LayerScaleData.imagNoColor);
|
|
342 | 344 |
g.fillRect(smpx + sampleW, smpy + rowSep, sampleW, rowHeight); |
343 | 345 |
|
344 | 346 |
g.setColor(Color.BLACK); |
Also available in: Unified diff