Package com.sun.star.awt

Examples of com.sun.star.awt.Gradient


     
      /* apply a gradient fill style that goes from top left to bottom
         right and is changing its color from green to yellow */
      xPropSet.setPropertyValue( "FillStyle",
                                       com.sun.star.drawing.FillStyle.GRADIENT );
      Gradient aGradient = new Gradient();
      aGradient.Style = GradientStyle.LINEAR;
      aGradient.StartColor = 0x00ff00;
      aGradient.EndColor = 0xffff00;
      aGradient.Angle = 450;
      aGradient.Border = 0;
View Full Code Here


     
      /* apply a gradient fill style that goes from top left to bottom
         right and is changing its color from green to yellow */
      xPropSet.setPropertyValue( "FillStyle",
                                       com.sun.star.drawing.FillStyle.GRADIENT );
      Gradient aGradient = new Gradient();
      aGradient.Style = GradientStyle.LINEAR;
      aGradient.StartColor = 0x00ff00;
      aGradient.EndColor = 0xffff00;
      aGradient.Angle = 450;
      aGradient.Border = 0;
View Full Code Here

    public void setGradient(XShape xShape, GradientStyle gradientStyle, int startColor, int endColor, short angle, short border, short xOffset, short yOffset, short startIntensity, short endIntensity){
        XPropertySet xProp = null;
        try {
            xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xShape);
            xProp.setPropertyValue("FillStyle", FillStyle.GRADIENT);
            Gradient aGradient = new Gradient();
            aGradient.Style = gradientStyle;
            aGradient.StartColor = startColor;
            aGradient.EndColor = endColor;
            aGradient.Angle = angle;
            aGradient.Border = border;
View Full Code Here

    public void setGradientOfShape(XShape xShape, int startColor, int endColor){
        try{
            XPropertySet xShapeProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xShape);
            xShapeProps.setPropertyValue("FillStyle", FillStyle.GRADIENT);
            Gradient aGradient = new Gradient();
            aGradient.Style = GradientStyle.LINEAR;
            aGradient.StartColor = startColor;
            aGradient.EndColor = endColor;
            aGradient.Angle = 1800;
            aGradient.Border = 0;
View Full Code Here

     
      /* apply a gradient fill style that goes from top left to bottom
         right and is changing its color from green to yellow */
      xPropSet.setPropertyValue( "FillStyle",
                                       com.sun.star.drawing.FillStyle.GRADIENT );
      Gradient aGradient = new Gradient();
      aGradient.Style = GradientStyle.LINEAR;
      aGradient.StartColor = 0x00ff00;
      aGradient.EndColor = 0xffff00;
      aGradient.Angle = 450;
      aGradient.Border = 0;
View Full Code Here

     
      /* apply a gradient fill style that goes from top left to bottom
         right and is changing its color from green to yellow */
      xPropSet.setPropertyValue( "FillStyle",
                                       com.sun.star.drawing.FillStyle.GRADIENT );
      Gradient aGradient = new Gradient();
      aGradient.Style = GradientStyle.LINEAR;
      aGradient.StartColor = 0x00ff00;
      aGradient.EndColor = 0xffff00;
      aGradient.Angle = 450;
      aGradient.Border = 0;
View Full Code Here

                if(isModifyColorsProp()){
                    setColorSettingsOfShape(xShape, "EllipseShape");
                }else{
                    FillStyle fillStyle = (FillStyle)xProp.getPropertyValue("FillStyle");
                    if(fillStyle == FillStyle.GRADIENT){
                        Gradient gradient = (Gradient)xProp.getPropertyValue("FillGradient");
                        if(m_IsLeftLayout)
                            setGradient(xShape, GradientStyle.RADIAL, gradient.StartColor, gradient.EndColor, (short)0, (short)0, (short)30, (short)50, (short)100, (short)100);
                        else
                            setGradient(xShape, GradientStyle.RADIAL, gradient.StartColor, gradient.EndColor, (short)0, (short)0, (short)50, (short)50, (short)100, (short)100);
                    }
View Full Code Here

    public void initArrowShapeColor(){
        XPropertySet xProps = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, getArrowShape());
        try {
            FillStyle fillStyle = (FillStyle)xProps.getPropertyValue("FillStyle");
            if(fillStyle.getValue() == FillStyle.GRADIENT_value){
                Gradient gradient = (Gradient)xProps.getPropertyValue("FillGradient");
                setArrowShapeColorProp(gradient.EndColor);
            }
            if(fillStyle.getValue() == FillStyle.SOLID_value)
                setArrowShapeColorProp(AnyConverter.toInt(xProps.getPropertyValue("FillColor")));
        } catch (Exception ex) {
View Full Code Here

                xProp.setPropertyValue("CornerRadius", new Integer(600));

                getGui().disableControlDialogImageColor();

                xProp.setPropertyValue("FillStyle", FillStyle.GRADIENT);
                Gradient aGradient = new Gradient();
                aGradient.Style = GradientStyle.LINEAR;
                aGradient.StartColor = _startColor;
                aGradient.EndColor = _endColor;
                aGradient.Angle = 450;
                aGradient.Border = 0;
                aGradient.XOffset = 0;
                aGradient.YOffset = 0;
                aGradient.StartIntensity = 100;
                aGradient.EndIntensity = 100;
                aGradient.StepCount = 10;
                xProp.setPropertyValue("FillGradient", aGradient);
            }else if( m_Style == USER_DEFINE){
                if(!m_IsGradients){
                    xProp.setPropertyValue("FillStyle", FillStyle.SOLID);
                    xProp.setPropertyValue("FillColor", new Integer(m_iColor));
                }else{
                    getGui().disableControlDialogImageColor();
                    xProp.setPropertyValue("FillStyle", FillStyle.GRADIENT);
                    Gradient aGradient = new Gradient();
                    aGradient.Style = GradientStyle.LINEAR;
                    aGradient.StartColor = m_iStartColor;
                    aGradient.EndColor = m_iEndColor;
                    aGradient.Angle = 450;
                    aGradient.Border = 0;
View Full Code Here

    public void setGradient(XShape xShape, GradientStyle gradientStyle, int startColor, int endColor, short angle, short border, short xOffset, short yOffset, short startIntensity, short endIntensity){
        XPropertySet xProp = null;
        try {
            xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xShape);
            xProp.setPropertyValue("FillStyle", FillStyle.GRADIENT);
            Gradient aGradient = new Gradient();
            aGradient.Style = gradientStyle;
            aGradient.StartColor = startColor;
            aGradient.EndColor = endColor;
            aGradient.Angle = angle;
            aGradient.Border = border;
View Full Code Here

TOP

Related Classes of com.sun.star.awt.Gradient

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.