internalframeinternalframetitlepaneinternalframetitlepanemenubuttonpainter.java

来自「Mobile 应用程序使用 Java Micro Edition (Java M」· Java 代码 · 共 501 行 · 第 1/2 页

JAVA
501
字号
    }    private RoundRectangle2D decodeRoundRect2() {        roundRect.setRoundRect(decodeX(1.0f), //x                               decodeY(1.0f), //y                               decodeX(2.0f) - decodeX(1.0f), //width                               decodeY(1.9444444f) - decodeY(1.0f), //height                               8.6f, 8.6f); //rounding        return roundRect;    }    private RoundRectangle2D decodeRoundRect3() {        roundRect.setRoundRect(decodeX(1.0526316f), //x                               decodeY(1.0555556f), //y                               decodeX(1.9473684f) - decodeX(1.0526316f), //width                               decodeY(1.8888888f) - decodeY(1.0555556f), //height                               6.75f, 6.75f); //rounding        return roundRect;    }    private Path2D decodePath1() {        path.reset();        path.moveTo(decodeX(1.3157895f), decodeY(1.4444444f));        path.lineTo(decodeX(1.6842105f), decodeY(1.4444444f));        path.lineTo(decodeX(1.5013158f), decodeY(1.7208333f));        path.lineTo(decodeX(1.3157895f), decodeY(1.4444444f));        path.closePath();        return path;    }    private Path2D decodePath2() {        path.reset();        path.moveTo(decodeX(1.3157895f), decodeY(1.3333334f));        path.lineTo(decodeX(1.6842105f), decodeY(1.3333334f));        path.lineTo(decodeX(1.5f), decodeY(1.6083333f));        path.lineTo(decodeX(1.3157895f), decodeY(1.3333334f));        path.closePath();        return path;    }    private Path2D decodePath3() {        path.reset();        path.moveTo(decodeX(1.3157895f), decodeY(1.3888888f));        path.lineTo(decodeX(1.6842105f), decodeY(1.3888888f));        path.lineTo(decodeX(1.4952153f), decodeY(1.655303f));        path.lineTo(decodeX(1.3157895f), decodeY(1.3888888f));        path.closePath();        return path;    }

    private Paint decodeGradient1(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color2,                            decodeColor(color2,color3,0.5f),                            color3});    }    private Paint decodeGradient2(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y,                new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f },                new Color[] { color4,                            decodeColor(color4,color5,0.5f),                            color5,                            decodeColor(color5,color3,0.5f),                            color3,                            decodeColor(color3,color6,0.5f),                            color6});    }    private Paint decodeGradient3(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.50714284f * w) + x, (0.095f * h) + y, (0.49285713f * w) + x, (0.91f * h) + y,                new float[] { 0.0f,0.24289773f,0.48579547f,0.74289775f,1.0f },                new Color[] { color7,                            decodeColor(color7,color8,0.5f),                            color8,                            decodeColor(color8,color9,0.5f),                            color9});    }    private Paint decodeGradient4(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.31107953f,0.62215906f,0.8110795f,1.0f },                new Color[] { color12,                            decodeColor(color12,color13,0.5f),                            color13,                            decodeColor(color13,color14,0.5f),                            color14});    }    private Paint decodeGradient5(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color16,                            decodeColor(color16,color17,0.5f),                            color17});    }    private Paint decodeGradient6(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y,                new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f },                new Color[] { color18,                            decodeColor(color18,color19,0.5f),                            color19,                            decodeColor(color19,color19,0.5f),                            color19,                            decodeColor(color19,color20,0.5f),                            color20});    }    private Paint decodeGradient7(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.50714284f * w) + x, (0.095f * h) + y, (0.49285713f * w) + x, (0.91f * h) + y,                new float[] { 0.0f,0.24289773f,0.48579547f,0.74289775f,1.0f },                new Color[] { color21,                            decodeColor(color21,color22,0.5f),                            color22,                            decodeColor(color22,color23,0.5f),                            color23});    }    private Paint decodeGradient8(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color24,                            decodeColor(color24,color25,0.5f),                            color25});    }    private Paint decodeGradient9(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y,                new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f },                new Color[] { color26,                            decodeColor(color26,color27,0.5f),                            color27,                            decodeColor(color27,color27,0.5f),                            color27,                            decodeColor(color27,color28,0.5f),                            color28});    }    private Paint decodeGradient10(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.50714284f * w) + x, (0.095f * h) + y, (0.49285713f * w) + x, (0.91f * h) + y,                new float[] { 0.0f,0.24289773f,0.48579547f,0.74289775f,1.0f },                new Color[] { color29,                            decodeColor(color29,color30,0.5f),                            color30,                            decodeColor(color30,color31,0.5f),                            color31});    }    private Paint decodeGradient11(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y,                new float[] { 0.0f,0.5f,1.0f },                new Color[] { color32,                            decodeColor(color32,color33,0.5f),                            color33});    }    private Paint decodeGradient12(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y,                new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f },                new Color[] { color34,                            decodeColor(color34,color35,0.5f),                            color35,                            decodeColor(color35,color36,0.5f),                            color36,                            decodeColor(color36,color15,0.5f),                            color15});    }    private Paint decodeGradient13(Shape s) {        Rectangle2D bounds = s.getBounds2D();        float x = (float)bounds.getX();        float y = (float)bounds.getY();        float w = (float)bounds.getWidth();        float h = (float)bounds.getHeight();        return decodeGradient((0.50714284f * w) + x, (0.095f * h) + y, (0.49285713f * w) + x, (0.91f * h) + y,                new float[] { 0.0f,0.24289773f,0.48579547f,0.74289775f,1.0f },                new Color[] { color37,                            decodeColor(color37,color38,0.5f),                            color38,                            decodeColor(color38,color39,0.5f),                            color39});    }
}

⌨️ 快捷键说明

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