mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Fixed Toaster - always on top
This commit is contained in:
parent
0453f50143
commit
c636853666
@ -180,7 +180,7 @@ public class TimeCalc {
|
|||||||
s = s.replace(",","");
|
s = s.replace(",","");
|
||||||
|
|
||||||
int percentInt = (int)(percent * 100);
|
int percentInt = (int)(percent * 100);
|
||||||
if(!alreadyShownPercents.contains((int)(percent*100)) || true) {
|
if(!alreadyShownPercents.contains((int)(percent*100))) {
|
||||||
alreadyShownPercents.add((int)(percent*100));
|
alreadyShownPercents.add((int)(percent*100));
|
||||||
Toaster toasterManager = new Toaster();
|
Toaster toasterManager = new Toaster();
|
||||||
Font font = new Font("sans", Font.PLAIN, 32);
|
Font font = new Font("sans", Font.PLAIN, 32);
|
||||||
|
@ -29,6 +29,8 @@ package rvc.timecalc;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.*;
|
import javax.swing.border.*;
|
||||||
@ -213,8 +215,8 @@ public class Toaster
|
|||||||
* Animate vertically the toaster. The toaster could be moved from bottom
|
* Animate vertically the toaster. The toaster could be moved from bottom
|
||||||
* to upper or to upper to bottom
|
* to upper or to upper to bottom
|
||||||
* @param posx
|
* @param posx
|
||||||
* @param fromy
|
* @param fromY
|
||||||
* @param toy
|
* @param toY
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
protected void animateVertically( int posx, int fromY, int toY ) throws InterruptedException
|
protected void animateVertically( int posx, int fromY, int toY ) throws InterruptedException
|
||||||
@ -330,6 +332,9 @@ public class Toaster
|
|||||||
singleToaster.iconLabel.setIcon( icon );
|
singleToaster.iconLabel.setIcon( icon );
|
||||||
}
|
}
|
||||||
singleToaster.message.setText( msg );
|
singleToaster.message.setText( msg );
|
||||||
|
|
||||||
|
singleToaster.toFront( );
|
||||||
|
singleToaster.setAlwaysOnTop(true);
|
||||||
singleToaster.animate();
|
singleToaster.animate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user