internalframeinternalframetitlepaneinternalframetitlepaneiconifybuttonpainter.java
来自「Mobile 应用程序使用 Java Micro Edition (Java M」· Java 代码 · 共 590 行 · 第 1/2 页
JAVA
590 行
roundRect = decodeRoundRect1(); g.setPaint(color1); g.fill(roundRect); roundRect = decodeRoundRect2(); g.setPaint(decodeGradient5(roundRect)); g.fill(roundRect); roundRect = decodeRoundRect3(); g.setPaint(decodeGradient6(roundRect)); g.fill(roundRect); rect = decodeRect1(); g.setPaint(color23); g.fill(rect); rect = decodeRect2(); g.setPaint(color8); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); } private void paintBackgroundPressedAndWindowNotFocused(Graphics2D g) { roundRect = decodeRoundRect1(); g.setPaint(color1); g.fill(roundRect); roundRect = decodeRoundRect2(); g.setPaint(decodeGradient7(roundRect)); g.fill(roundRect); roundRect = decodeRoundRect3(); g.setPaint(decodeGradient8(roundRect)); g.fill(roundRect); rect = decodeRect4(); g.setPaint(color30); g.fill(rect); rect = decodeRect2(); g.setPaint(color8); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); rect = decodeRect3(); g.setPaint(color16); g.fill(rect); }
private RoundRectangle2D decodeRoundRect1() { roundRect.setRoundRect(decodeX(1.0f), //x decodeY(1.6111112f), //y decodeX(2.0f) - decodeX(1.0f), //width decodeY(2.0f) - decodeY(1.6111112f), //height 6.0f, 6.0f); //rounding return roundRect; } 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 Rectangle2D decodeRect1() { rect.setRect(decodeX(1.25f), //x decodeY(1.6628788f), //y decodeX(1.75f) - decodeX(1.25f), //width decodeY(1.7487373f) - decodeY(1.6628788f)); //height return rect; } private Rectangle2D decodeRect2() { rect.setRect(decodeX(1.2870814f), //x decodeY(1.6123737f), //y decodeX(1.7165072f) - decodeX(1.2870814f), //width decodeY(1.7222222f) - decodeY(1.6123737f)); //height return rect; } private Rectangle2D decodeRect3() { rect.setRect(decodeX(1.0f), //x decodeY(1.0f), //y decodeX(1.0f) - decodeX(1.0f), //width decodeY(1.0f) - decodeY(1.0f)); //height return rect; } private Rectangle2D decodeRect4() { rect.setRect(decodeX(1.25f), //x decodeY(1.6527778f), //y decodeX(1.7511961f) - decodeX(1.25f), //width decodeY(1.7828283f) - decodeY(1.6527778f)); //height return rect; }
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,color3,0.5f), color3, decodeColor(color3,color5,0.5f), color5, decodeColor(color5,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.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[] { color9, decodeColor(color9,color10,0.5f), color10}); } 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.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[] { color11, decodeColor(color11,color12,0.5f), color12, decodeColor(color12,color13,0.5f), color13, decodeColor(color13,color10,0.5f), color10}); } 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[] { color17, decodeColor(color17,color18,0.5f), color18}); } 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[] { color19, decodeColor(color19,color20,0.5f), color20, decodeColor(color20,color21,0.5f), color21, decodeColor(color21,color22,0.5f), color22}); } 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.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 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.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,color28,0.5f), color28, decodeColor(color28,color29,0.5f), color29}); } 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.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[] { color31, decodeColor(color31,color32,0.5f), color32}); } 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.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.78336793f,0.9161677f }, new Color[] { color33, decodeColor(color33,color34,0.5f), color34, decodeColor(color34,color35,0.5f), color35, decodeColor(color35,color36,0.5f), color36}); }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?