code: public void addPoint(float pos, Color col) {
  		ControlPoint point = new ControlPoint(col, pos);
  		for (int i=0;i<list.size()-1;i++) {
  			ControlPoint now = (ControlPoint) list.get(i);
  			ControlPoint next = (ControlPoint) list.get(i+1);
  			if ((now.pos <= 0.5f) && (next.pos >=0.5f)) {
  				list.add(i+1,point);
  				break;
  			}
  		}
  		repaint(0);
  	}
docs: Add a control point to the gradient
  
  @param pos The position in the gradient (0 -> 1)
  @param col The color at the new control point