Fixed Toaster - always on top
This commit is contained in:
parent
0453f50143
commit
c636853666
@ -180,7 +180,7 @@ public class TimeCalc {
|
||||
s = s.replace(",","");
|
||||
|
||||
int percentInt = (int)(percent * 100);
|
||||
if(!alreadyShownPercents.contains((int)(percent*100)) || true) {
|
||||
if(!alreadyShownPercents.contains((int)(percent*100))) {
|
||||
alreadyShownPercents.add((int)(percent*100));
|
||||
Toaster toasterManager = new Toaster();
|
||||
Font font = new Font("sans", Font.PLAIN, 32);
|
||||
|
@ -29,6 +29,8 @@ package rvc.timecalc;
|
||||
*/
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
@ -213,8 +215,8 @@ public class Toaster
|
||||
* Animate vertically the toaster. The toaster could be moved from bottom
|
||||
* to upper or to upper to bottom
|
||||
* @param posx
|
||||
* @param fromy
|
||||
* @param toy
|
||||
* @param fromY
|
||||
* @param 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.message.setText( msg );
|
||||
|
||||
singleToaster.toFront( );
|
||||
singleToaster.setAlwaysOnTop(true);
|
||||
singleToaster.animate();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user