@Override public void draw(java.awt.Graphics g) { ((java.awt.Graphics2D) g) .setRenderingHint( java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON); super.draw(g); if (converter != null) { java.awt.Color oldColor = g.getColor(); if (!converter.isComplete()) { g.setColor(java.awt.Color.RED); } String name = converter.getName(); if (name.length() == 0) { name = "?"; } Utils.drawStringInBox( g, name, displayBox().x + 14, displayBox().y + 1 + displayBox().height / 2); g.setColor(oldColor); } }
@Override protected java.awt.Rectangle invalidateRectangle(java.awt.Rectangle r) { java.awt.Rectangle box = super.invalidateRectangle(r); box.grow(converter.getName().length() * 10, converter.getName().length() * 10); return box; }
public String expressionWrapper() { return converter.getExpression(); }
public void expressionWrapper(String expression) { dirty = dirty || !converter.getExpression().equals(expression); converter.setExpression(expression); }
public String nameWrapper() { return converter.getName(); }
public void nameWrapper(String name) { dirty = dirty || !converter.getName().equals(name); converter.setName(name); }