This file contains hidden or 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
| build( parent, instruction, text ).inform(); | |
| build( parent, instruction, text ).error(); | |
| build( parent, instruction, text ).ask(); | |
| build().showException(ex); | |
| build(parent, instruction, text).radioChoice(defaultChoice, choices); | |
| build(parent, instruction,text).choice( defaultChoice, choices ); | |
| build(parent, instruction,text).inputColumns(25).input( defaultValue ); |
This file contains hidden or 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
| return TaskDialogs.build(parent, instruction,text).inputColumns(25).input( defaultValue ); |
This file contains hidden or 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
| TaskDialog dlg = new TaskDialog("Application Error" ); | |
| dlg.setInstruction( "CRASH AND BURN!"); | |
| dlg.setIcon( TaskDialog.StandardIcon.ERROR ); | |
| dlg.setText( "The applicaiton has performed an illegal action. This action has been logged and reported." ); | |
| dlg.getDetails().setExpandedComponent( | |
| new JLabel( toHtml(" javax.activity.InvalidActivityException \n " + | |
| "at com.ezware.dialog.task.TaskDialogTestBed.main(TaskDialogTestBed.java:316)"))); | |
| dlg.getFooter().setText( "Your application chrashed because a developer forgot to write a unit test"); | |
| dlg.getFooter().setIcon( TaskDialog.StandardIcon.WARNING ); | |
| dlg.getFooter().setCheckBoxText( "Don't show me this error next time" ); |
This file contains hidden or 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
| TaskDialog dlg = new TaskDialog("Application Error" ); | |
| dlg.setInstruction( "CRASH AND BURN!"); | |
| dlg.setIcon( TaskDialog.StandardIcon.ERROR ); | |
| dlg.setText( "The applicaiton has performed an illegal action. This action has been logged and reported." ); | |
| dlg.getDetails().setExpandedComponent( | |
| new JLabel( toHtml(" javax.activity.InvalidActivityException \n " + | |
| "at com.ezware.dialog.task.TaskDialogTestBed.main(TaskDialogTestBed.java:316)"))); | |
| dlg.show(); |
This file contains hidden or 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
| TaskDialog dlg = new TaskDialog("Application Error" ); | |
| dlg.setInstruction( "CRASH AND BURN!"); | |
| dlg.setIcon( TaskDialog.StandardIcon.ERROR ); | |
| dlg.setText( "The applicaiton has performed an illegal action. This action has been logged and reported." ); | |
| dlg.show(); |
This file contains hidden or 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
| TaskDialog dlg = new TaskDialog("Task Dialog" ); | |
| dlg.setText( "Hello World!" ); | |
| dlg.show(); |
This file contains hidden or 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
| TaskDialogs.inform( "You've won!", "The game is over with the 15:3 score"); | |
| if (TaskDialogs.warn( "Are you sure you want to quit?", "Please do not quit yet!")) { | |
| try { | |
| new BigDecimal("seven"); | |
| } catch( Throwable ex ) { | |
| TaskDialogs.showException(ex); | |
| } | |
| } |
This file contains hidden or 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
| TaskDialog dlg = new TaskDialog("Copying..."); | |
| dlg.setInstruction("Copying file"); | |
| dlg.setText( "Location: From 'Others' to 'Others'\n" + | |
| "File Name: <b>Photo.jpg</b>" ); | |
| dlg.setIcon( TaskDialog.StandardIcon.INFO ); | |
| JProgressBar pb = new JProgressBar(); | |
| pb.setValue(30); | |
| dlg.setFixedComponent( pb ); | |
| dlg.show(); |
This file contains hidden or 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
| TaskDialog dlg = new TaskDialog("Security Warning"); | |
| dlg.setInstruction( "The publisher cannot be verified.\nDo you want to run this software?" ); | |
| dlg.setText( "Name: C:\\Program Files\\eclipse\\eclipse.exe\n" + | |
| "Publisher: <b>Unknown Publisher</b>\n" + | |
| "Type: Application\n"); | |
| dlg.setIcon( TaskDialog.StandardIcon.WARNING ); | |
| dlg.getFooter().setCheckBoxText("Always ask before opening this file"); | |
| dlg.setCommands( StandardCommand.OK.derive("Run"), StandardCommand.CANCEL ); | |
| if ( dlg.show().equals(StandardCommand.OK)) { | |
| //do something |
This file contains hidden or 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
| int choice = TaskDialogs.choice( | |
| "What do you want to do with your game in\nprogress?", | |
| "", | |
| 1, | |
| new CommandLink("Exit and save my game", "Save your game in progress, then exit. " + | |
| "This will\noverwrite any previosely saved games."), | |
| new CommandLink("Exit and don't save", "Exit without saving your game. " + | |
| "This is counted\nas a loss in your statistics." ), | |
| new CommandLink("Don't exit", "Return to your game progress" )); |