Package jjil.core

Examples of jjil.core.Error


     * @param image the input image
     * @throws jjil.core.Error if image is not an RgbImage
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof RgbImage)) {
            throw new Error(
                    Error.PACKAGE.ALGORITHM,
                    ErrorCodes.IMAGE_NOT_RGBIMAGE,
                    image.toString(),
                    null,
                    null);
View Full Code Here


     */
    public Image doJoin(Image imageFirst, Image imageSecond)
        throws jjil.core.Error
    {
        if (!(imageFirst instanceof Gray8Image)) {
                throw new Error(
                        Error.PACKAGE.ALGORITHM,
                        ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                        imageFirst.toString(),
                        null,
                        null);
            }
        if (!(imageSecond instanceof Gray8Image)) {
                throw new Error(
                        Error.PACKAGE.ALGORITHM,
                        ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                        imageSecond.toString(),
                        null,
                        null);
            }
        if (imageFirst.getWidth() != imageSecond.getWidth() ||
            imageSecond.getHeight() != imageSecond.getHeight()) {
            throw new Error(
                    Error.PACKAGE.ALGORITHM,
                    ErrorCodes.IMAGE_SIZES_DIFFER,
                    imageFirst.toString(),
                    imageSecond.toString(),
                    null);
View Full Code Here

     * @param image the input image.
     * @throws jjil.core.Error if the input is not a Gray8Image
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof Gray8Image)) {
            throw new Error(
                    Error.PACKAGE.ALGORITHM,
                    ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                    image.toString(),
                    null,
                    null);
View Full Code Here

     * @throws jjil.core.Error if the input image is not a color
     *   image.
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof RgbImage)) {
            throw new Error(
                  Error.PACKAGE.ALGORITHM,
                  ErrorCodes.IMAGE_NOT_RGBIMAGE,
                  image.toString(),
                  null,
                  null);
View Full Code Here

         * case...
         */
        if (!(color.equals(RgbSelectGray.RED) ||
                color.equals(RgbSelectGray.GREEN) ||
                color.equals(RgbSelectGray.BLUE))) {
            throw new Error(
              Error.PACKAGE.ALGORITHM,
              ErrorCodes.ILLEGAL_COLOR_CHOICE,
              color.toString(),
              null,
              null);
View Full Code Here

     */
    public void push(Image image)
        throws jjil.core.Error
    {
        if (!(image instanceof Gray32Image)) {
            throw new Error(
                Error.PACKAGE.CORE,
                ErrorCodes.IMAGE_NOT_GRAY32IMAGE,
                image.toString(),
                null,
                null);
View Full Code Here

     * @param nDivisor The new divisor.
     * @throws jjil.core.Error if the divisor is 0.
     */
    public void setDivisor(int nDivisor) throws jjil.core.Error {
        if (nDivisor == 0) {
            throw new Error(
                   Error.PACKAGE.CORE,
                   jjil.core.ErrorCodes.MATH_DIVISION_ZERO,
                   null,
                   null,
                   null);
View Full Code Here

     * @throws jjil.core.Error if input is not a Gray8Image, or the input image size is smaller (either
     * horizontally or vertically) than the desired size.
     */
    public void push(Image image) throws jjil.core.Error {
        if (!(image instanceof Gray8Image)) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.IMAGE_NOT_GRAY8IMAGE,
                      image.toString(),
                      null,
                      null);
        }
        if (image.getWidth() < this.cWidth || image.getHeight() < this.cHeight) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.SHRINK_OUTPUT_LARGER_THAN_INPUT,
                      image.toString(),
                      this.toString(),
                      null);
View Full Code Here

     * @param cHeight the new target height.
     * @throws jjil.core.Error if height is not positive
     */
    public void setHeight(int cHeight) throws jjil.core.Error {
        if (cHeight <= 0) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.OUTPUT_IMAGE_SIZE_NEGATIVE,
                      new Integer(cHeight).toString(),
                      this.toString(),
                      null);
View Full Code Here

     * @param cWidth the new target width.
     * @throws jjil.core.Error if height is not positive
     */
    public void setWidth(int cWidth) throws jjil.core.Error {
        if (cWidth <= 0) {
            throw new Error(
                      Error.PACKAGE.ALGORITHM,
                      ErrorCodes.OUTPUT_IMAGE_SIZE_NEGATIVE,
                      new Integer(cWidth).toString(),
                      this.toString(),
                      null);
View Full Code Here

TOP

Related Classes of jjil.core.Error

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.