synthpainterimpl.java

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

JAVA
1,571
字号
    /**     * Paints the border of a formatted text field.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintFormattedTextFieldBorder(SynthContext context,                                      Graphics g, int x, int y,                                      int w, int h) {        if (context.getComponent().getComponentOrientation().isLeftToRight()){            paintBorder(context, g, x, y, w, h, null);        } else {            AffineTransform transform = new AffineTransform();            transform.translate(x,y);            transform.scale(-1, 1);            transform.translate(-w,0);            paintBorder(context, g, 0, 0, w, h, transform);        }    }    /**     * Paints the background of an internal frame title pane.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintInternalFrameTitlePaneBackground(SynthContext context,                                          Graphics g, int x, int y,                                          int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of an internal frame title pane.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintInternalFrameTitlePaneBorder(SynthContext context,                                      Graphics g, int x, int y,                                      int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of an internal frame.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintInternalFrameBackground(SynthContext context,                                          Graphics g, int x, int y,                                          int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of an internal frame.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintInternalFrameBorder(SynthContext context,                                      Graphics g, int x, int y,                                      int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of a label.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintLabelBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of a label.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintLabelBorder(SynthContext context,                                 Graphics g, int x, int y,                                 int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of a list.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintListBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of a list.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintListBorder(SynthContext context,                                 Graphics g, int x, int y,                                 int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of a menu bar.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintMenuBarBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of a menu bar.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintMenuBarBorder(SynthContext context,                                 Graphics g, int x, int y,                                 int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of a menu item.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintMenuItemBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of a menu item.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintMenuItemBorder(SynthContext context,                                 Graphics g, int x, int y,                                 int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of a menu.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintMenuBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of a menu.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintMenuBorder(SynthContext context,                                 Graphics g, int x, int y,                                 int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of an option pane.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintOptionPaneBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }    /**     * Paints the border of an option pane.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintOptionPaneBorder(SynthContext context,                                 Graphics g, int x, int y,                                 int w, int h) {        paintBorder(context, g, x, y, w, h, null);    }    /**     * Paints the background of a panel.     *     * @param context SynthContext identifying the <code>JComponent</code> and     *        <code>Region</code> to paint to     * @param g <code>Graphics</code> to paint to     * @param x X coordinate of the area to paint to     * @param y Y coordinate of the area to paint to     * @param w Width of the area to paint to     * @param h Height of the area to paint to     */    public void paintPanelBackground(SynthContext context,                                     Graphics g, int x, int y,                                     int w, int h) {        paintBackground(context, g, x, y, w, h, null);    }

⌨️ 快捷键说明

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