⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jbcolor.java

📁 OPIAM stands for Open Identity and Access Management. This Suite will provide modules for user & rig
💻 JAVA
字号:
/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.faare.config.javabeans;

import java.awt.Color;


/** This class conveys a color for orgchart and trombinoscope. */
public class JBColor implements java.io.Serializable
{
    /** red component. */
    private String red;

    /** green component. */
    private String green;

    /** blue component. */
    private String blue;

    /**
     * set the red component.
     * @param value the red value (0..255)
     */
    public void setRed(String value)
    {
        this.red = value;
    }

    /**
     * set the green component.
     * @param value the green value (0..255)
     */
    public void setGreen(String value)
    {
        this.green = value;
    }

    /**
     * set the blue component.
     * @param value the blue value (0..255)
     */
    public void setBlue(String value)
    {
        this.blue = value;
    }

    /**
     * get the color.
     * @return the color generated from components.
     */
    public Color getColor()
    {
        if ((red != null) && (green != null) && (blue != null))
        {
            try
            {
                int ired = Integer.parseInt(red);
                int igreen = Integer.parseInt(green);
                int iblue = Integer.parseInt(blue);

                return new Color(ired, igreen, iblue);
            }
            catch (Exception ex)
            {
                return Color.lightGray;
            }
        }
        else
        {
            return Color.lightGray;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -