Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java-Synth中图像之间的淡入淡出_Java_Image_Fade_Look And Feel_Synth - Fatal编程技术网

Java-Synth中图像之间的淡入淡出

Java-Synth中图像之间的淡入淡出,java,image,fade,look-and-feel,synth,Java,Image,Fade,Look And Feel,Synth,对于类分配,我必须用java完美地复制Windows7计算器。目前,我正在研究悬停按钮。我遇到的问题是windows计算器在默认和悬停状态(以及按下状态)之间淡出。我想知道是否有可能使Java在我的两种状态之间消失 我目前拥有以下Synth代码 <synth> <!-- Style that all regions will use --> <style id="backingStyle"> <!-- Make all t

对于类分配,我必须用java完美地复制Windows7计算器。目前,我正在研究悬停按钮。我遇到的问题是windows计算器在默认和悬停状态(以及按下状态)之间淡出。我想知道是否有可能使Java在我的两种状态之间消失

我目前拥有以下Synth代码

<synth>
    <!-- Style that all regions will use -->
    <style id="backingStyle">
        <!-- Make all the regions opaque-->
        <opaque value="TRUE"/>
        <font name="Dialog" size="12"/>
        <state>
            <!-- Provide default colors -->
            <color value="#D8D987" type="BACKGROUND"/>
            <color value="RED" type="FOREGROUND"/>
        </state>
    </style>
    <bind style="backingStyle" type="region" key=".*"/>
    <style id="buttonStyle">
        <!-- Shift the text one pixel when pressed -->
        <insets top="0" left="0" right="0" bottom="0"/>
        <state>
            <imagePainter method="buttonBackground" path="images/button.png" sourceInsets="10 10 10 10"/>
        </state>
        <state value="MOUSE_OVER">
            <imagePainter method="buttonBackground" path="images/button_hover.png" sourceInsets="10 10 10 10"/>
        </state>
        <state value="PRESSED and MOUSE_OVER">
            <imagePainter method="buttonBackground" path="images/button_pressed.png" sourceInsets="10 10 10 10"/>
        </state>
    </style>
    <!-- Bind buttonStyle to all JButtons -->
    <bind style="buttonStyle" type="region" key="Button"/> 
</synth>

我发现了一个只在Java5中工作的示例,它可以在6-8个图像之间快速循环,使其看起来像是褪色的。这样的事情对我来说也很管用

如果你需要我没有发布的任何东西,你都可以得到

提前谢谢