Java Code Examples for com.sun.java.swing.plaf.windows.TMSchema.Part#TP_BUTTON
The following examples show how to use
com.sun.java.swing.plaf.windows.TMSchema.Part#TP_BUTTON .
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: AnimationController.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { duration = XPStyle.getXP().getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS); } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 2
Source File: AnimationController.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { duration = XPStyle.getXP().getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS); } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 3
Source File: AnimationController.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 4
Source File: AnimationController.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 5
Source File: AnimationController.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 6
Source File: AnimationController.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 7
Source File: AnimationController.java From JDKSourceCode1.8 with MIT License | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 8
Source File: AnimationController.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 9
Source File: AnimationController.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 10
Source File: AnimationController.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 11
Source File: AnimationController.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 12
Source File: AnimationController.java From hottub with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 13
Source File: AnimationController.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 14
Source File: AnimationController.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }
Example 15
Source File: AnimationController.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
private static void triggerAnimation(JComponent c, Part part, State newState) { if (c instanceof javax.swing.JTabbedPane || part == Part.TP_BUTTON) { //idk: we can not handle tabs animation because //the same (component,part) is used to handle all the tabs //and we can not track the states //Vista theme might have transition duration for toolbar buttons //but native application does not seem to animate them return; } AnimationController controller = AnimationController.getAnimationController(); State oldState = controller.getState(c, part); if (oldState != newState) { controller.putState(c, part, newState); if (newState == State.DEFAULTED) { // it seems for DEFAULTED button state Vista does animation from // HOT oldState = State.HOT; } if (oldState != null) { long duration; if (newState == State.DEFAULTED) { //Only button might have DEFAULTED state //idk: do not know how to get the value from Vista //one second seems plausible value duration = 1000; } else { XPStyle xp = XPStyle.getXP(); duration = (xp != null) ? xp.getThemeTransitionDuration( c, part, normalizeState(oldState), normalizeState(newState), Prop.TRANSITIONDURATIONS) : 1000; } controller.startAnimation(c, part, oldState, newState, duration); } } }