Example #1
0
 @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);
   }
 }
Example #2
0
 @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;
 }
Example #3
0
 public String expressionWrapper() {
   return converter.getExpression();
 }
Example #4
0
 public void expressionWrapper(String expression) {
   dirty = dirty || !converter.getExpression().equals(expression);
   converter.setExpression(expression);
 }
Example #5
0
 public String nameWrapper() {
   return converter.getName();
 }
Example #6
0
 public void nameWrapper(String name) {
   dirty = dirty || !converter.getName().equals(name);
   converter.setName(name);
 }