public void setPadding(final PaddingTop paddingTop,
            final PaddingRight paddingRight, final PaddingBottom paddingBottom,
            final PaddingLeft paddingLeft) {

        if (paddingTop != null && paddingRight != null && paddingBottom != null
                && paddingLeft != null) {

            if (PaddingTop.INITIAL.equals(paddingTop.getCssValue())
                    || PaddingTop.INHERIT.equals(paddingTop.getCssValue())
                    || PaddingRight.INITIAL.equals(paddingRight.getCssValue())
                    || PaddingRight.INHERIT.equals(paddingRight.getCssValue())
                    || PaddingBottom.INITIAL.equals(paddingBottom.getCssValue())
                    || PaddingBottom.INHERIT.equals(paddingBottom.getCssValue())
                    || PaddingLeft.INITIAL.equals(paddingLeft.getCssValue())
                    || PaddingLeft.INHERIT.equals(paddingLeft.getCssValue())) {
                throw new InvalidValueException(
                        "Any or all of the given arguments have initial/inherit constant value as its cssValue");
            }

            try {
                final PaddingTop paddingTopTemp;
                final PaddingRight paddingRightTemp;
                final PaddingBottom paddingBottomTemp;
                final PaddingLeft paddingLeftTemp;

                if (this.paddingTop != null) {
                    this.paddingTop.setAlreadyInUse(false);
                    this.paddingRight.setAlreadyInUse(false);
                    this.paddingBottom.setAlreadyInUse(false);
                    this.paddingLeft.setAlreadyInUse(false);
                }

                if (paddingTop.isAlreadyInUse()
                        && this.paddingTop != paddingTop) {
                    if (this.paddingTop != null) {
                        paddingTopTemp = this.paddingTop
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingTop is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingTopTemp = paddingTop.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingTop is already used by another object so its clone is assigned");
                        }
                    }
                } else {
                    paddingTopTemp = paddingTop;
                }

                if (paddingRight.isAlreadyInUse()
                        && this.paddingRight != paddingRight) {
                    if (this.paddingRight != null) {
                        paddingRightTemp = this.paddingRight
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingRight is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingRightTemp = paddingRight.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingRight is already used by another object so its clone is assigned");
                        }
                    }

                } else {
                    paddingRightTemp = paddingRight;
                }

                if (paddingBottom.isAlreadyInUse()
                        && this.paddingBottom != paddingBottom) {
                    if (this.paddingBottom != null) {
                        paddingBottomTemp = this.paddingBottom
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingBottom is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingBottomTemp = paddingBottom.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingBottom is already used by another object so its clone is assigned");
                        }
                    }

                } else {
                    paddingBottomTemp = paddingBottom;
                }

                if (paddingLeft.isAlreadyInUse()
                        && this.paddingLeft != paddingLeft) {
                    if (this.paddingLeft != null) {
                        paddingLeftTemp = this.paddingLeft
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingLeft is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingLeftTemp = paddingLeft.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingLeft is already used by another object so its clone is assigned");
                        }
                    }

                } else {
                    paddingLeftTemp = paddingLeft;
                }

                paddingTopTemp.setAlreadyInUse(true);
                paddingTopTemp.setStateChangeInformer(this);

                paddingRightTemp.setAlreadyInUse(true);
                paddingRightTemp.setStateChangeInformer(this);

                paddingBottomTemp.setAlreadyInUse(true);
                paddingBottomTemp.setStateChangeInformer(this);

                paddingLeftTemp.setAlreadyInUse(true);
                paddingLeftTemp.setStateChangeInformer(this);

                assignProducedCssValue(paddingTop, paddingRight, paddingBottom,
                        paddingLeft);

                this.paddingTop = paddingTopTemp;
                this.paddingRight = paddingRightTemp;
                this.paddingBottom = paddingBottomTemp;
                this.paddingLeft = paddingLeftTemp;

            } catch (final CloneNotSupportedException e) {
                throw new InvalidValueException(e);
            } catch (final Exception e) {
                throw new InvalidValueException(e);
            }

        } else {
            throw new NullValueException("cannot accept null arguments");
        }

    }
public void setPadding(final PaddingTop paddingTop,
            final PaddingRight paddingRight, final PaddingBottom paddingBottom,
            final PaddingLeft paddingLeft) {

        if (paddingTop != null && paddingRight != null && paddingBottom != null
                && paddingLeft != null) {

            if (PaddingTop.INITIAL.equals(paddingTop.getCssValue())
                    || PaddingTop.INHERIT.equals(paddingTop.getCssValue())
                    || PaddingRight.INITIAL.equals(paddingRight.getCssValue())
                    || PaddingRight.INHERIT.equals(paddingRight.getCssValue())
                    || PaddingBottom.INITIAL.equals(paddingBottom.getCssValue())
                    || PaddingBottom.INHERIT.equals(paddingBottom.getCssValue())
                    || PaddingLeft.INITIAL.equals(paddingLeft.getCssValue())
                    || PaddingLeft.INHERIT.equals(paddingLeft.getCssValue())) {
                throw new InvalidValueException(
                        "Any or all of the given arguments have initial/inherit constant value as its cssValue");
            }

            try {
                final PaddingTop paddingTopTemp;
                final PaddingRight paddingRightTemp;
                final PaddingBottom paddingBottomTemp;
                final PaddingLeft paddingLeftTemp;

                if (this.paddingTop != null) {
                    this.paddingTop.setAlreadyInUse(false);
                    this.paddingRight.setAlreadyInUse(false);
                    this.paddingBottom.setAlreadyInUse(false);
                    this.paddingLeft.setAlreadyInUse(false);
                }

                if (paddingTop.isAlreadyInUse()
                        && this.paddingTop != paddingTop) {
                    if (this.paddingTop != null) {
                        paddingTopTemp = this.paddingTop
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingTop is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingTopTemp = paddingTop.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingTop is already used by another object so its clone is assigned");
                        }
                    }
                } else {
                    paddingTopTemp = paddingTop;
                }

                if (paddingRight.isAlreadyInUse()
                        && this.paddingRight != paddingRight) {
                    if (this.paddingRight != null) {
                        paddingRightTemp = this.paddingRight
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingRight is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingRightTemp = paddingRight.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingRight is already used by another object so its clone is assigned");
                        }
                    }

                } else {
                    paddingRightTemp = paddingRight;
                }

                if (paddingBottom.isAlreadyInUse()
                        && this.paddingBottom != paddingBottom) {
                    if (this.paddingBottom != null) {
                        paddingBottomTemp = this.paddingBottom
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingBottom is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingBottomTemp = paddingBottom.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingBottom is already used by another object so its clone is assigned");
                        }
                    }

                } else {
                    paddingBottomTemp = paddingBottom;
                }

                if (paddingLeft.isAlreadyInUse()
                        && this.paddingLeft != paddingLeft) {
                    if (this.paddingLeft != null) {
                        paddingLeftTemp = this.paddingLeft
                                .setCssValue(paddingTop.getCssValue());
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingLeft is already used by another object so the existing object is used");
                        }
                    } else {
                        paddingLeftTemp = paddingLeft.clone();
                        if (LOGGER.isLoggable(Level.WARNING)) {
                            LOGGER.warning(
                                    "the given paddingLeft is already used by another object so its clone is assigned");
                        }
                    }

                } else {
                    paddingLeftTemp = paddingLeft;
                }

                paddingTopTemp.setAlreadyInUse(true);
                paddingTopTemp.setStateChangeInformer(this);

                paddingRightTemp.setAlreadyInUse(true);
                paddingRightTemp.setStateChangeInformer(this);

                paddingBottomTemp.setAlreadyInUse(true);
                paddingBottomTemp.setStateChangeInformer(this);

                paddingLeftTemp.setAlreadyInUse(true);
                paddingLeftTemp.setStateChangeInformer(this);

                assignProducedCssValue(paddingTop, paddingRight, paddingBottom,
                        paddingLeft);

                this.paddingTop = paddingTopTemp;
                this.paddingRight = paddingRightTemp;
                this.paddingBottom = paddingBottomTemp;
                this.paddingLeft = paddingLeftTemp;

            } catch (final CloneNotSupportedException e) {
                throw new InvalidValueException(e);
            } catch (final Exception e) {
                throw new InvalidValueException(e);
            }

        } else {
            throw new NullValueException("cannot accept null arguments");
        }

    }
public void setPadding ( final PaddingTop paddingTop , final PaddingRight paddingRight , final PaddingBottom paddingBottom , final PaddingLeft paddingLeft ) { if ( paddingTop != null && paddingRight != null && paddingBottom != null && paddingLeft != null ) { if ( PaddingTop . INITIAL . equals ( paddingTop . getCssValue ( ) ) || PaddingTop . INHERIT . equals ( paddingTop . getCssValue ( ) ) || PaddingRight . INITIAL . equals ( paddingRight . getCssValue ( ) ) || PaddingRight . INHERIT . equals ( paddingRight . getCssValue ( ) ) || PaddingBottom . INITIAL . equals ( paddingBottom . getCssValue ( ) ) || PaddingBottom . INHERIT . equals ( paddingBottom . getCssValue ( ) ) || PaddingLeft . INITIAL . equals ( paddingLeft . getCssValue ( ) ) || PaddingLeft . INHERIT . equals ( paddingLeft . getCssValue ( ) ) ) { throw new InvalidValueException ( "Any or all of the given arguments have initial/inherit constant value as its cssValue" ) ; } try { final PaddingTop paddingTopTemp ; final PaddingRight paddingRightTemp ; final PaddingBottom paddingBottomTemp ; final PaddingLeft paddingLeftTemp ; if ( this . paddingTop != null ) { this . paddingTop . setAlreadyInUse ( false ) ; this . paddingRight . setAlreadyInUse ( false ) ; this . paddingBottom . setAlreadyInUse ( false ) ; this . paddingLeft . setAlreadyInUse ( false ) ; } if ( paddingTop . isAlreadyInUse ( ) && this . paddingTop != paddingTop ) { if ( this . paddingTop != null ) { paddingTopTemp = this . paddingTop . setCssValue ( paddingTop . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingTop is already used by another object so the existing object is used" ) ; } } else { paddingTopTemp = paddingTop . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingTop is already used by another object so its clone is assigned" ) ; } } } else { paddingTopTemp = paddingTop ; } if ( paddingRight . isAlreadyInUse ( ) && this . paddingRight != paddingRight ) { if ( this . paddingRight != null ) { paddingRightTemp = this . paddingRight . setCssValue ( paddingTop . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingRight is already used by another object so the existing object is used" ) ; } } else { paddingRightTemp = paddingRight . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingRight is already used by another object so its clone is assigned" ) ; } } } else { paddingRightTemp = paddingRight ; } if ( paddingBottom . isAlreadyInUse ( ) && this . paddingBottom != paddingBottom ) { if ( this . paddingBottom != null ) { paddingBottomTemp = this . paddingBottom . setCssValue ( paddingTop . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingBottom is already used by another object so the existing object is used" ) ; } } else { paddingBottomTemp = paddingBottom . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingBottom is already used by another object so its clone is assigned" ) ; } } } else { paddingBottomTemp = paddingBottom ; } if ( paddingLeft . isAlreadyInUse ( ) && this . paddingLeft != paddingLeft ) { if ( this . paddingLeft != null ) { paddingLeftTemp = this . paddingLeft . setCssValue ( paddingTop . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingLeft is already used by another object so the existing object is used" ) ; } } else { paddingLeftTemp = paddingLeft . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given paddingLeft is already used by another object so its clone is assigned" ) ; } } } else { paddingLeftTemp = paddingLeft ; } paddingTopTemp . setAlreadyInUse ( true ) ; paddingTopTemp . setStateChangeInformer ( this ) ; paddingRightTemp . setAlreadyInUse ( true ) ; paddingRightTemp . setStateChangeInformer ( this ) ; paddingBottomTemp . setAlreadyInUse ( true ) ; paddingBottomTemp . setStateChangeInformer ( this ) ; paddingLeftTemp . setAlreadyInUse ( true ) ; paddingLeftTemp . setStateChangeInformer ( this ) ; assignProducedCssValue ( paddingTop , paddingRight , paddingBottom , paddingLeft ) ; this . paddingTop = paddingTopTemp ; this . paddingRight = paddingRightTemp ; this . paddingBottom = paddingBottomTemp ; this . paddingLeft = paddingLeftTemp ; } catch ( final CloneNotSupportedException e ) { throw new InvalidValueException ( e ) ; } catch ( final Exception e ) { throw new InvalidValueException ( e ) ; } } else { throw new NullValueException ( "cannot accept null arguments" ) ; } }
sets the top, right, bottom and left width in {@code Padding}. If the
given argument is already used by another object, then the
existing/cloned object will be used. And throws
{@code NullValueException} if any of the given argument is null.

@param paddingTop
@param paddingRight
@param paddingBottom
@param paddingLeft
@author WFF
@since 1.0.0
sets the top right bottom and left width in { @code Padding } . If the given argument is already used by another object then the existing / cloned object will be used . And throws { @code NullValueException } if any of the given argument is null .