-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de3f206
commit 2d990e1
Showing
9 changed files
with
147 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
package global_utils; | ||
|
||
import org.eclipse.swt.SWT; | ||
import org.eclipse.swt.widgets.MessageBox; | ||
import org.eclipse.swt.widgets.Shell; | ||
|
||
import app_config.PropertiesReader; | ||
|
||
public class Message { | ||
|
||
private String title; | ||
private String message; | ||
private int style; | ||
private boolean fatal; | ||
|
||
public Message(String title, String message, int style) { | ||
this(title, message, style, false); | ||
} | ||
|
||
public Message(String title, String message, int style, boolean fatal) { | ||
this.title = title; | ||
this.message = message; | ||
this.style = style; | ||
this.fatal = fatal; | ||
} | ||
|
||
public int open(Shell shell) { | ||
MessageBox mb = new MessageBox(shell, style); | ||
mb.setText(title); | ||
mb.setMessage(message); | ||
|
||
if (fatal) | ||
PropertiesReader.openMailPanel(); | ||
|
||
return mb.open(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters