Sets the program to be used by this material to shade the models.

@param program The program to use
482260
public void setProgram(Program program) {
        if (program == null) {
            throw new IllegalStateException("Program cannot be null");
        }
        program.checkCreated();
        this.program = program;
    }
735290
public void setBarGraphColor(final ColorDef BARGRAPH_COLOR) {
        getModel().setValueColor(BARGRAPH_COLOR);
        init(getInnerBounds().width, getInnerBounds().width);
        repaint(getInnerBounds());
    }
842707
public void setMalware(java.util.Collection<Malware> malware) {
        if (malware == null) {
            this.malware = null;
            return;
        }

        this.malware = new java.util.ArrayList<Malware>(malware);
    }
140656
@Override
  public void setProject(final Project project) {
    super.setProject(project);
    this.compilerDef.setProject(project);
    this.linkerDef.setProject(project);
  }
365341
protected void applyStyle(final ModelConfig<?, ?> mc) {
        if (!ModelConfig.UNDETERMINED.equals(mc.id())) {
            node().setId(mc.id());
        }
        if (!ModelConfig.UNDETERMINED.equals(mc.style())) {
            node().setStyle(mc.style());
        }
        if (!ModelConfig.UNDETERMINED.equals(mc.styleClass())) {
            node().getStyleClass().addAll(mc.styleClass().split(" "));
        }
    }
864815
private void init(Context context, AttributeSet attrs, int defStyle) {
		// Initialize paint objects
		paint = new Paint();
		paint.setAntiAlias(true);
		paintBorder = new Paint();
		paintBorder.setAntiAlias(true);
		paintBorder.setStyle(Paint.Style.STROKE);
		paintSelectorBorder = new Paint();
		paintSelectorBorder.setAntiAlias(true);

		// Enable software rendering on HoneyComb and up. (needed for shadow)
		if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
			setLayerType(LAYER_TYPE_SOFTWARE, null);

		// Load the styled attributes and set their properties
		TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.CircularImageView, defStyle, 0);

		// Check for extra features being enabled
		hasBorder = attributes.getBoolean(R.styleable.CircularImageView_civ_border, false);
		hasSelector = attributes.getBoolean(R.styleable.CircularImageView_civ_selector, false);
		shadowEnabled = attributes.getBoolean(R.styleable.CircularImageView_civ_shadow, SHADOW_ENABLED);

		// Set border properties, if enabled
		if(hasBorder) {
			int defaultBorderSize = (int) (2 * context.getResources().getDisplayMetrics().density + 0.5f);
			setBorderWidth(attributes.getDimensionPixelOffset(R.styleable.CircularImageView_civ_borderWidth, defaultBorderSize));
			setBorderColor(attributes.getColor(R.styleable.CircularImageView_civ_borderColor, Color.WHITE));
		}

		// Set selector properties, if enabled
		if(hasSelector) {
			int defaultSelectorSize = (int) (2 * context.getResources().getDisplayMetrics().density + 0.5f);
			setSelectorColor(attributes.getColor(R.styleable.CircularImageView_civ_selectorColor, Color.TRANSPARENT));
			setSelectorStrokeWidth(attributes.getDimensionPixelOffset(R.styleable.CircularImageView_civ_selectorStrokeWidth, defaultSelectorSize));
			setSelectorStrokeColor(attributes.getColor(R.styleable.CircularImageView_civ_selectorStrokeColor, Color.BLUE));
		}

		// Set shadow properties, if enabled
		if(shadowEnabled) {
			shadowRadius = attributes.getFloat(R.styleable.CircularImageView_civ_shadowRadius, SHADOW_RADIUS);
			shadowDx = attributes.getFloat(R.styleable.CircularImageView_civ_shadowDx, SHADOW_DX);
			shadowDy = attributes.getFloat(R.styleable.CircularImageView_civ_shadowDy, SHADOW_DY);
			shadowColor = attributes.getColor(R.styleable.CircularImageView_civ_shadowColor, SHADOW_COLOR);
			setShadowEnabled(true);
		}

		// We no longer need our attributes TypedArray, give it back to cache
		attributes.recycle();
	}
325952
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
        fireMarkerEvent(COLOR_CHANGED_EVENT);
    }
533916
public void setUseColorFromParent(final boolean USE) {
        if (null == useColorFromParent) {
            _useColorFromParent = USE;
            redraw();
        } else {
            useColorFromParent.set(USE);
        }
    }
408791
public void setColor(int color) {
		int x1, y1;
		if(mOrientation) {
			x1 = (mBarLength + mBarPointerHaloRadius);
			y1 = mBarThickness;
		}        else {
			x1 = mBarThickness;
			y1 = (mBarLength + mBarPointerHaloRadius);
		}
		
		Color.colorToHSV(color, mHSVColor);
		shader = new LinearGradient(mBarPointerHaloRadius, 0,
				x1, y1, new int[] {Color.WHITE, color, Color.BLACK}, null,
				Shader.TileMode.CLAMP);
		mBarPaint.setShader(shader);
	    calculateColor(mBarPointerPosition);
		mBarPointerPaint.setColor(mColor);
		if (mPicker != null) {
			mPicker.setNewCenterColor(mColor);
			if(mPicker.hasOpacityBar())
				mPicker.changeOpacityBarColor(mColor);
		}
		invalidate();
	}
271517
public void copy(Program that) {
      operatorSet.copy(that.operatorSet);
      variableSet.copy(that.variableSet);
      constantSet.copy(that.constantSet);
      depth = that.depth;
      length = that.length;

      if(that.root != null) {
         root = that.root.makeCopy(operatorSet, variableSet, constantSet);
      } else {
         root = null;
      }
   }
285746
@Restricted(NoExternalUse.class)
    public void setExecutable(Executable executable) {
        this.executable = executable;
        if (executable instanceof Run) {
            ((Run) executable).setQueueId(context.item.getId());
        }
    }
286691
@Override
    public void setShadowPadding(int left, int top, int right, int bottom) {
        mShadowBounds.set(left, top, right, bottom);
        super.setPadding(left + mContentPadding.left, top + mContentPadding.top,
                right + mContentPadding.right, bottom + mContentPadding.bottom);
    }
288725
public static void setOpaque (JComponent comp, final boolean opaque)
    {
        applyToHierarchy(comp, new ComponentOp() {
            public void apply (Component comp) {
                if (comp instanceof JComponent) {
                    ((JComponent) comp).setOpaque(opaque);
                }
            }
        });
    }
1153394
public void setPreTransProgram( final String program) {
		if ( null == program) {
			format.getHeader().createEntry( PRETRANSPROG, DEFAULTSCRIPTPROG);
		} else if ( 0 == program.length()){
			format.getHeader().createEntry( PRETRANSPROG, DEFAULTSCRIPTPROG);
		} else {
			format.getHeader().createEntry( PRETRANSPROG, program);
		}
	}
1287564
function() {
		var gl = this.gl;

		var program = gl.createProgram();
		gl.attachShader( program, this.vertexShader );
		gl.attachShader( program, this.fragmentShader );
		gl.linkProgram( program );	
		gl.useProgram( program );

		this.program = program;
	}
442680
public void setClazz(Class<? extends ElementBase> clazz) {
        this.clazz = clazz;

        try {
            // Force execution of static initializers
            Class.forName(clazz.getName());
        } catch (ClassNotFoundException e) {
            MiscUtil.toUnchecked(e);
        }
    }
698238
def draw(self, mode, selection):
        
        if not self._linked:
            raise RuntimeError('Cannot draw program if code has not been set')
        # Init
        gl.check_error('Check before draw')
        mode = as_enum(mode)
        # Draw
        if len(selection) == 3:
            # Selection based on indices
            id_, gtype, count = selection
            if count:
                self._pre_draw()
                ibuf = self._parser.get_object(id_)
                ibuf.activate()
                gl.glDrawElements(mode, count, as_enum(gtype), None)
                ibuf.deactivate()
        else:
            # Selection based on start and count
            first, count = selection
            if count:
                self._pre_draw()
                gl.glDrawArrays(mode, first, count)
        # Wrap up
        gl.check_error('Check after draw')
        self._post_draw()