Sets the gradation mode and colors.

@param mode The mode of gradation.
@param color1 The color for gradation.
@param color2 The color for gradation.

@see casmi.GradationMode2D
502092
public void setGradationColor(GradationMode3D mode, Color color1, Color color2) {
        setGradation(true);
        if (startColor == null || endColor == null) {
            startColor = new RGBColor(0.0, 0.0, 0.0);
            endColor = new RGBColor(0.0, 0.0, 0.0);
        }
        startColor = color1;
        endColor = color2;
        this.mode = mode;

        setGradationCorner();
    }
172525
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
    }
146464
@SuppressWarnings("unused")
    public void setOkColor(@ColorInt int color) {
        mOkColor = Color.argb(255, Color.red(color), Color.green(color), Color.blue(color));
    }
919488
public void setTextColor(@ColorInt int color) {
    jsonObject.addProperty(SymbolOptions.PROPERTY_TEXT_COLOR, ColorUtils.colorToRgbaString(color));
  }
1289303
public void setColor(String red, String green, String blue, String alpha) {
		setColor(red, green, blue);
		setAlpha(alpha);
	}
575567
public void setPaginationMode(final PaginationMode paginationMode) {
		getOrCreateComponentModel().paginationMode = paginationMode == null ? PaginationMode.NONE : paginationMode;
	}
860755
public void setTextColor(final Color COLOR) {
        if (null == textColor) {
            _textColor = COLOR;
            redraw();
        } else {
            textColor.set(COLOR);
        }
    }
422319
@CheckReturnValue
    public RoleManager setColor(Color color)
    {
        this.color = color == null ? Role.DEFAULT_COLOR_RAW : color.getRGB();
        set |= COLOR;
        return this;
    }
672382
public final void setDialogHeaderIconTintMode(@NonNull final PorterDuff.Mode mode) {
        Condition.INSTANCE.ensureNotNull(mode, "The dialog icon tint mode may not be null");
        this.dialogHeaderIconTintMode = mode;
    }
126558
public void setGradationColor(GradationMode2D mode, ColorSet colorSet1, ColorSet colorSet2) {
        setGradationColor(mode, new RGBColor(colorSet1), new RGBColor(colorSet2));
    }
37840
private void setLineColor(@ColorInt final int color) {
        view.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
    }
1110916
def mode=(mode)
      modes = [_rgb, _hsb, _name, _hex]
      @mode = modes.detect { |m| m.class.to_s.match /#{mode}/i } || begin
                raise ArgumentError, "Invalid mode given"
              end
    end
325952
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
        fireMarkerEvent(COLOR_CHANGED_EVENT);
    }
531558
public void setColorSelectMode(int mode) {

        if (!isAttached()) {
            return;
        }
        m_colorA.setResource(m_cpImageBundle.bar_white());
        m_colorB.setResource(m_cpImageBundle.bar_white());
        m_colorC.setResource(m_cpImageBundle.bar_white());
        switch (mode) {
            case SATURATIN:
                m_colorD.setResource(m_cpImageBundle.bar_saturation());
                break;

            case BRIGHTNESS:
                m_colorD.setResource(m_cpImageBundle.bar_brightness());
                break;

            case HUE:
                m_colorD.setResource(m_cpImageBundle.bar_hue());
                break;

            case RED:
                m_colorA.setResource(m_cpImageBundle.bar_red_tl());
                m_colorB.setResource(m_cpImageBundle.bar_red_tr());
                m_colorC.setResource(m_cpImageBundle.bar_red_br());
                m_colorD.setResource(m_cpImageBundle.bar_red_bl());
                break;

            case GREEN:
                m_colorA.setResource(m_cpImageBundle.bar_green_tl());
                m_colorB.setResource(m_cpImageBundle.bar_green_tr());
                m_colorC.setResource(m_cpImageBundle.bar_green_br());
                m_colorD.setResource(m_cpImageBundle.bar_green_bl());
                break;

            case BLUE:
                m_colorA.setResource(m_cpImageBundle.bar_blue_tl());
                m_colorB.setResource(m_cpImageBundle.bar_blue_tr());
                m_colorC.setResource(m_cpImageBundle.bar_blue_br());
                m_colorD.setResource(m_cpImageBundle.bar_blue_bl());
                break;
            default:
                break;
        }
    }
480595
public void setColorRange(int firstIndex, int lastIndex, int color1, int color2) {
		for (int i = firstIndex; i <= lastIndex; i++)
			map[i] = ImageMath.mixColors((float)(i-firstIndex)/(lastIndex-firstIndex), color1, color2);
	}
230521
public void setCornerColor(int index, Color color) {
        if (!isGradation()) {
            for (int i = 0; i < 4; i++) {
                cornerColor[i] = new RGBColor(0.0, 0.0, 0.0);
                cornerColor[i] = this.fillColor;
            }
            setGradation(true);
        }
        cornerColor[index] = color;
    }
1068907
public void setDialogMode(int mode) {
        if (!(mode == OK_CANCEL_DIALOG || mode == CLOSE_DIALOG)) {
            throw new IllegalArgumentException("invalid dialog mode");
        }

        if (okButton != null) {
            buttonPane.remove(okButton);
            okButton = null;
        }
        if (cancelOrCloseButton != null) {
            buttonPane.remove(cancelOrCloseButton);
            cancelOrCloseButton = null;
        }

        switch (mode) {
            case OK_CANCEL_DIALOG:
                okButton
                        = new JButton(ResourceManager.all(BaseDialog.class).getString("ok"));
                okButton.addActionListener(okAction);
                buttonPane.add(okButton);
                cancelOrCloseButton
                        = new JButton(
                                ResourceManager.all(BaseDialog.class).getString("cancel"));
                cancelOrCloseButton.addActionListener(cancelOrCloseAction);
                buttonPane.add(cancelOrCloseButton);
                getRootPane().setDefaultButton(okButton);
                break;
            case CLOSE_DIALOG:
                cancelOrCloseButton
                        = new JButton(ResourceManager.all(BaseDialog.class).getString("close"));
                cancelOrCloseButton.addActionListener(cancelOrCloseAction);
                buttonPane.add(cancelOrCloseButton);
                break;
        }

        this.mode = mode;
    }