Java Code Examples for sun.awt.windows.ThemeReader#isGetThemeTransitionDurationDefined()

The following examples show how to use sun.awt.windows.ThemeReader#isGetThemeTransitionDurationDefined() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XPStyle.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 2
Source File: XPStyle.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 3
Source File: XPStyle.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 4
Source File: XPStyle.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 5
Source File: XPStyle.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 6
Source File: XPStyle.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 7
Source File: XPStyle.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 8
Source File: XPStyle.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 9
Source File: XPStyle.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 10
Source File: XPStyle.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 11
Source File: XPStyle.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 12
Source File: XPStyle.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 13
Source File: XPStyle.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (XPStyle.getXP() == null) {
        return;
    }
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 14
Source File: XPStyle.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}
 
Example 15
Source File: XPStyle.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/** Paint a skin at a defined position and size
 *  This method supports animation.
 *
 * @param g   the graphics context to use for painting
 * @param dx  the destination <i>x</i> coordinate
 * @param dy  the destination <i>y</i> coordinate
 * @param dw  the width of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param dh  the height of the area to fill, may cause
 *                  the image to be stretched or tiled
 * @param state which state to paint
 */
void paintSkin(Graphics g, int dx, int dy, int dw, int dh, State state) {
    if (ThemeReader.isGetThemeTransitionDurationDefined()
          && component instanceof JComponent
          && SwingUtilities.getAncestorOfClass(CellRendererPane.class,
                                               component) == null) {
        AnimationController.paintSkin((JComponent) component, this,
                                      g, dx, dy, dw, dh, state);
    } else {
        paintSkinRaw(g, dx, dy, dw, dh, state);
    }
}