public void paint(Graphics g)
{
Dimension d = getSize();
- if (col.isColourByLabel())
+ if (col != null)
{
- g.setColor(Color.white);
- g.fillRect(d.width / 2, 0, d.width / 2, d.height);
- /*
- * g.setColor(Color.black); Font f=g.getFont().deriveFont(9);
- * g.setFont(f);
- *
- * // g.setFont(g.getFont().deriveFont( //
- * AffineTransform.getScaleInstance( //
- * width/g.getFontMetrics().stringWidth("Label"), //
- * height/g.getFontMetrics().getHeight()))); g.drawString("Label",
- * width/2, 0);
- */
-
- }
- else if (col.isGraduatedColour())
- {
- Color maxCol = ColorUtils.getColor(col.getMaxColour());
- g.setColor(maxCol);
- g.fillRect(d.width / 2, 0, d.width / 2, d.height);
-
+ if (col.isColourByLabel())
+ {
+ g.setColor(Color.white);
+ g.fillRect(d.width / 2, 0, d.width / 2, d.height);
+ /*
+ * g.setColor(Color.black); Font f=g.getFont().deriveFont(9);
+ * g.setFont(f);
+ *
+ * // g.setFont(g.getFont().deriveFont( //
+ * AffineTransform.getScaleInstance( //
+ * width/g.getFontMetrics().stringWidth("Label"), //
+ * height/g.getFontMetrics().getHeight()))); g.drawString("Label",
+ * width/2, 0);
+ */
+ }
+ else if (col.isGraduatedColour())
+ {
+ Color maxCol = ColorUtils.getColor(col.getMaxColour());
+ g.setColor(maxCol);
+ g.fillRect(d.width / 2, 0, d.width / 2, d.height);
+ }
}
if (hasLink)
}
}
- @Override
- public void mousePressed(MouseEvent e)
- {
- }
-
/**
* Hide columns containing (or not containing) a given feature type
*
}
}
+ @Override
+ public void mousePressed(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
}