Java Doc for JGraphpadDialogs.java in  » Graphic-Library » jgraphpad » com » jgraph » pad » dialog » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » jgraphpad » com.jgraph.pad.dialog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jgraph.pad.dialog.JGraphpadDialogs

JGraphpadDialogs
public class JGraphpadDialogs (Code)
Singleton class that provides a set of standard dialogs.

Inner Class :public static class CancelException extends RuntimeException
Inner Class :public static class FontDialog extends JGraphpadDialog

Field Summary
protected static  FontDialogfontDialog
     Shared simple font dialog.
protected  JFileChoosersaveEditorChooseropenEditorChoosersaveImageChooseropenImageChooser
     Holds the various file choosers to preserve their states between uses.
protected static  JGraphpadDialogssharedInstance
     Shared singleton instance.

Constructor Summary
protected  JGraphpadDialogs()
     Singleton constructor.

Method Summary
public  ColorcolorDialog(Component component, String title, Color color)
     Displays a color dialog using JColorChooser.showDialog(java.awt.Componentjava.lang.Stringjava.awt.Color) .
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  color - The default color to use in the dialog.
public  booleanconfirmDialog(Component component, String message, boolean yesNo, boolean cancel)
     Displays a confirmation dialog using JOptionPane.showConfirmDialog(java.awt.Componentjava.lang.Objectjava.lang.Stringint) and JGraphpad.APPTITLE for the title.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  message - The message to be confirmed.
Parameters:
  yesNo - Whether to display yes/no or ok/cancel options.
Parameters:
  cancel - Whether to display a cancel option for yes/no dialogs.
public  doubledoubleDialog(String title, double initialValue, boolean allowNegative, boolean allowZero)
     Shortcut method to JGraphpadDialogs.valueDialog(String,String) that returns the user input as a double.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The initial value to be displayed.
public  StringeditorFileDialog(Component component, String title, String filename, boolean open, File directory)
     Displays a JFileChooser using JGraphpadDialogs.showFileChooser(Component,JFileChooser,boolean) .
public  voiderrorDialog(Component component, String message)
     Shortcut method to JGraphpadDialogs.messageDialog(Component,String,int) that display a dialog of type JOptionPane.ERROR_MESSAGE .
public  StringfileDialog(Component component, String title, boolean open, String extension, String desc, File directory)
     Displays a JFileChooser using JGraphpadDialogs.showFileChooser(Component,JFileChooser,boolean) for files with the specified extension.
public  floatfloatDialog(String title, float initialValue, boolean allowNegative, boolean allowZero)
     Shortcut method to JGraphpadDialogs.valueDialog(String,String) that returns the user input as a float.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The initial value to be displayed.
Parameters:
  allowNegative - Specifies whether negative values are allowed as input.
Parameters:
  allowZero - Specifies whether zero is a valid input.
public  FontfontDialog(Component component, String title)
     Displays a simple font dialog using FontDialog .
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed.
public static  JGraphpadDialogsgetSharedInstance()
     Returns the singleton instance.
public  StringimageFileDialog(Component component, String title, boolean open, File directory)
     Displays a JFileChooser using JGraphpadDialogs.showFileChooser(Component,JFileChooser,boolean) .
public  voidinformationDialog(Component component, String message)
     Shortcut method to JGraphpadDialogs.messageDialog(Component,String,int) that display a dialog of type JOptionPane.INFORMATION_MESSAGE .
public  intintDialog(String title, int initialValue, boolean allowNegative, boolean allowZero)
     Shortcut method to JGraphpadDialogs.valueDialog(String,String) that returns the user input as an int.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The initial value to be displayed.
Parameters:
  allowNegative - Specifies whether negative values are allowed as input.
Parameters:
  allowZero - Specifies whether zero is a valid input.
public  voidmessageDialog(Component component, String message, int type)
     Displays a message dialog using JOptionPane.showMessageDialog(java.awt.Componentjava.lang.Objectjava.lang.Stringint) and JGraphpad.APPTITLE for the title.
protected  StringshowFileChooser(Component component, JFileChooser chooser, boolean open)
     Helper method to display the specified chooser using JFileChooser.showOpenDialog(java.awt.Component) or JFileChooser.showSaveDialog(java.awt.Component) making sure that the returned file has the extension of the selected filter.
public  StringvalueDialog(String title)
     Shortcut method to JGraphpadDialogs.valueDialog(String,String) with an empty initial value.
Parameters:
  title - The title of the dialog to be displayed.
public  StringvalueDialog(String title, String initialValue)
     Displays a value dialog using JOptionPane.showInputDialog(java.awt.Componentjava.lang.Object) .
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The intitial value to be displayed.

Field Detail
fontDialog
protected static FontDialog fontDialog(Code)
Shared simple font dialog.



saveEditorChooseropenEditorChoosersaveImageChooseropenImageChooser
protected JFileChooser saveEditorChooseropenEditorChoosersaveImageChooseropenImageChooser(Code)
Holds the various file choosers to preserve their states between uses.



sharedInstance
protected static JGraphpadDialogs sharedInstance(Code)
Shared singleton instance.




Constructor Detail
JGraphpadDialogs
protected JGraphpadDialogs()(Code)
Singleton constructor.




Method Detail
colorDialog
public Color colorDialog(Component component, String title, Color color)(Code)
Displays a color dialog using JColorChooser.showDialog(java.awt.Componentjava.lang.Stringjava.awt.Color) .
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  color - The default color to use in the dialog. Returns the selected color.



confirmDialog
public boolean confirmDialog(Component component, String message, boolean yesNo, boolean cancel) throws CancelException(Code)
Displays a confirmation dialog using JOptionPane.showConfirmDialog(java.awt.Componentjava.lang.Objectjava.lang.Stringint) and JGraphpad.APPTITLE for the title.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  message - The message to be confirmed.
Parameters:
  yesNo - Whether to display yes/no or ok/cancel options.
Parameters:
  cancel - Whether to display a cancel option for yes/no dialogs. Returns true if the message is confirmed.
throws:
  CancelException - If the user clicks cancel.



doubleDialog
public double doubleDialog(String title, double initialValue, boolean allowNegative, boolean allowZero)(Code)
Shortcut method to JGraphpadDialogs.valueDialog(String,String) that returns the user input as a double.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The initial value to be displayed. Returns the user input as a double.
throws:
  IllegalArgumentException - If a value <= 0 is entered.
throws:
  CancelException - if the user clicks cancel



editorFileDialog
public String editorFileDialog(Component component, String title, String filename, boolean open, File directory)(Code)
Displays a JFileChooser using JGraphpadDialogs.showFileChooser(Component,JFileChooser,boolean) . This implementation adds two file filters to the chooser, one for .xml files and the other for .xml.gz files.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  open - Whether to display an open or save dialog.
Parameters:
  directory - The default directory to use for the dialog. Returns the selected filename.



errorDialog
public void errorDialog(Component component, String message)(Code)
Shortcut method to JGraphpadDialogs.messageDialog(Component,String,int) that display a dialog of type JOptionPane.ERROR_MESSAGE .
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  message - The message to be displayed.



fileDialog
public String fileDialog(Component component, String title, boolean open, String extension, String desc, File directory)(Code)
Displays a JFileChooser using JGraphpadDialogs.showFileChooser(Component,JFileChooser,boolean) for files with the specified extension. The dialog will show description for file of this type. The full extension including the dot must be specified. If the selected filename does not end with extension then the extension is appended to the filename.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  open - Whether to display an open or save dialog.
Parameters:
  extension - The extension to be used for filtering files.
Parameters:
  desc - The description of the file format.
Parameters:
  directory - The default directory to use for the dialog. Returns the selected filename.



floatDialog
public float floatDialog(String title, float initialValue, boolean allowNegative, boolean allowZero)(Code)
Shortcut method to JGraphpadDialogs.valueDialog(String,String) that returns the user input as a float.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The initial value to be displayed.
Parameters:
  allowNegative - Specifies whether negative values are allowed as input.
Parameters:
  allowZero - Specifies whether zero is a valid input. Returns the user input as a double.
throws:
  IllegalArgumentException - If a value <= 0 is entered.
throws:
  CancelException - if the user clicks cancel



fontDialog
public Font fontDialog(Component component, String title)(Code)
Displays a simple font dialog using FontDialog .
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed. Returns the selected font.



getSharedInstance
public static JGraphpadDialogs getSharedInstance()(Code)
Returns the singleton instance. Returns JGraphpadDialogs.sharedInstance.



imageFileDialog
public String imageFileDialog(Component component, String title, boolean open, File directory)(Code)
Displays a JFileChooser using JGraphpadDialogs.showFileChooser(Component,JFileChooser,boolean) . This implementation adds two file filters to the chooser, one for .jpg files and the other for .png files.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  open - Whether to display an open or save dialog.
Parameters:
  directory - The default directory to use for the dialog. Returns the selected filename.



informationDialog
public void informationDialog(Component component, String message)(Code)
Shortcut method to JGraphpadDialogs.messageDialog(Component,String,int) that display a dialog of type JOptionPane.INFORMATION_MESSAGE .
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  message - The message to be displayed.



intDialog
public int intDialog(String title, int initialValue, boolean allowNegative, boolean allowZero)(Code)
Shortcut method to JGraphpadDialogs.valueDialog(String,String) that returns the user input as an int.
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The initial value to be displayed.
Parameters:
  allowNegative - Specifies whether negative values are allowed as input.
Parameters:
  allowZero - Specifies whether zero is a valid input. Returns the user input as an int.
throws:
  IllegalArgumentException - If a value <= 0 is entered.
throws:
  CancelException - if the user clicks cancel



messageDialog
public void messageDialog(Component component, String message, int type)(Code)
Displays a message dialog using JOptionPane.showMessageDialog(java.awt.Componentjava.lang.Objectjava.lang.Stringint) and JGraphpad.APPTITLE for the title.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  message - The message to be confirmed.
Parameters:
  type - The type of message dialog to be displayed.



showFileChooser
protected String showFileChooser(Component component, JFileChooser chooser, boolean open)(Code)
Helper method to display the specified chooser using JFileChooser.showOpenDialog(java.awt.Component) or JFileChooser.showSaveDialog(java.awt.Component) making sure that the returned file has the extension of the selected filter. This implementation displays a confirmation dialog if a file will be overwritten and returns null if the user chooses not to overwrite it.
Parameters:
  component - The parent component for the dialog to be displayed.
Parameters:
  chooser - The dialog to be displayed. Whether to display an open or savedialog.
Parameters:
  open - Whether to display an open or save dialog. Returns the selected filename.



valueDialog
public String valueDialog(String title)(Code)
Shortcut method to JGraphpadDialogs.valueDialog(String,String) with an empty initial value.
Parameters:
  title - The title of the dialog to be displayed. Returns the user input.



valueDialog
public String valueDialog(String title, String initialValue)(Code)
Displays a value dialog using JOptionPane.showInputDialog(java.awt.Componentjava.lang.Object) .
Parameters:
  title - The title of the dialog to be displayed.
Parameters:
  initialValue - The intitial value to be displayed. Returns the user input.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.