public class DisplayColor
extends java.lang.Object
Display
.Constructor and Description |
---|
DisplayColor(int red,
int blue,
int green)
Constructor for generating display colors using the RGB coloring model.
|
Modifier and Type | Method and Description |
---|---|
int |
getBlueComponent()
Retrieves the blue component of this display color.
|
int |
getGreenComponent()
Retrieves the green component of this display color.
|
int |
getRedComponent()
Retrieves the red component of this display color.
|
public DisplayColor(int red, int blue, int green) throws java.lang.IllegalArgumentException
0
and
255
, otherwise an IllegalArgumentException
is thrown.red
- value for the red component of the display colorblue
- value for the red component of the display colorgreen
- value for the red component of the display colorjava.lang.IllegalArgumentException
- if one of the argument values is not
between 0
and 255
public int getRedComponent()
public int getBlueComponent()
public int getGreenComponent()
Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.