Java Doc for WizardNewFileCreationPage.java in  » IDE-Eclipse » ui-ide » org » eclipse » ui » dialogs » 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 » IDE Eclipse » ui ide » org.eclipse.ui.dialogs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.dialogs.WizardNewFileCreationPage

WizardNewFileCreationPage
public class WizardNewFileCreationPage extends WizardPage implements Listener(Code)
Standard main page for a wizard that creates a file resource.

This page may be used by clients as-is; it may be also be subclassed to suit.

Subclasses may override

  • getInitialContents
  • getNewFileLabel

Subclasses may extend

  • handleEvent




Constructor Summary
public  WizardNewFileCreationPage(String pageName, IStructuredSelection selection)
     Creates a new file creation wizard page.

Method Summary
protected  voidcreateAdvancedControls(Composite parent)
     Creates the widget for advanced options.
public  voidcreateControl(Composite parent)
     (non-Javadoc) Method declared on IDialogPage.
protected  voidcreateFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor)
     Creates a file resource given the file handle and contents.
protected  IFilecreateFileHandle(IPath filePath)
     Creates a file resource handle for the file with the given workspace path.
protected  voidcreateLinkTarget()
     Creates the link target path if a link target has been specified.
public  IFilecreateNewFile()
     Creates a new file resource in the selected container and with the selected name.
protected  ISchedulingRulecreateRule(IResource resource)
     Returns the scheduling rule to use when creating the resource at the given container path.
public  IPathgetContainerFullPath()
     Returns the current full path of the containing resource as entered or selected by the user, or its anticipated initial value.
public  StringgetFileExtension()
     Returns the file extension to use when creating the new file.
public  StringgetFileName()
     Returns the current file name as entered by the user, or its anticipated initial value.
protected  InputStreamgetInitialContents()
     Returns a stream containing the initial contents to be given to new file resource instances.
protected  StringgetNewFileLabel()
     Returns the label to display in the file name specification visual component group.
protected  voidhandleAdvancedButtonSelect()
     Shows/hides the advanced option widgets.
public  voidhandleEvent(Event event)
     The WizardNewFileCreationPage implementation of this Listener method handles all events and enablements for controls on this page.
protected  voidinitialPopulateContainerNameField()
     Sets the initial contents of the container name entry field, based upon either a previously-specified initial value or the ability to determine such a value.
public  voidsetContainerFullPath(IPath path)
     Sets the value of this page's container name field, or stores it for future use if this page's controls do not exist yet.
public  voidsetFileExtension(String value)
     Set the only file extension allowed for this page's file name field. If this page's controls do not exist yet, store it for future use.

If a file extension is specified, then it will always be appended with a '.' to the text from the file name field for validation when the following conditions are met:

(1) File extension length is greater than 0
(2) File name field text length is greater than 0
(3) File name field text does not already end with a '.' and the file extension specified (case sensitive)

The file extension will not be reflected in the actual file name field until the file name field loses focus.
Parameters:
  value - The file extension without the '.' prefix (e.g.
public  voidsetFileName(String value)
     Sets the value of this page's file name field, or stores it for future use if this page's controls do not exist yet.
public  voidsetVisible(boolean visible)
    
protected  IStatusvalidateLinkedResource()
     Checks whether the linked resource target is valid.
protected  booleanvalidatePage()
     Returns whether this page's controls currently all contain valid values.


Constructor Detail
WizardNewFileCreationPage
public WizardNewFileCreationPage(String pageName, IStructuredSelection selection)(Code)
Creates a new file creation wizard page. If the initial resource selection contains exactly one container resource then it will be used as the default container resource.
Parameters:
  pageName - the name of the page
Parameters:
  selection - the current resource selection




Method Detail
createAdvancedControls
protected void createAdvancedControls(Composite parent)(Code)
Creates the widget for advanced options.
Parameters:
  parent - the parent composite



createControl
public void createControl(Composite parent)(Code)
(non-Javadoc) Method declared on IDialogPage.



createFile
protected void createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) throws CoreException(Code)
Creates a file resource given the file handle and contents.
Parameters:
  fileHandle - the file handle to create a file resource with
Parameters:
  contents - the initial contents of the new file resource, ornull if none (equivalent to an empty stream)
Parameters:
  monitor - the progress monitor to show visual progress with
exception:
  CoreException - if the operation fails
exception:
  OperationCanceledException - if the operation is canceledWizardNewFileCreationPage.createNewFile()WizardNewFileCreationPage.getInitialContents()



createFileHandle
protected IFile createFileHandle(IPath filePath)(Code)
Creates a file resource handle for the file with the given workspace path. This method does not create the file resource; this is the responsibility of createFile.
Parameters:
  filePath - the path of the file resource to create a handle for the new file resource handle
See Also:   WizardNewFileCreationPage.createFile



createLinkTarget
protected void createLinkTarget()(Code)
Creates the link target path if a link target has been specified.



createNewFile
public IFile createNewFile()(Code)
Creates a new file resource in the selected container and with the selected name. Creates any missing resource containers along the path; does nothing if the container resources already exist.

In normal usage, this method is invoked after the user has pressed Finish on the wizard; the enablement of the Finish button implies that all controls on on this page currently contain valid values.

Note that this page caches the new file once it has been successfully created; subsequent invocations of this method will answer the same file resource without attempting to create it again.

This method should be called within a workspace modify operation since it creates resources.

the created file resource, or null if the file wasnot created



createRule
protected ISchedulingRule createRule(IResource resource)(Code)
Returns the scheduling rule to use when creating the resource at the given container path. The rule should be the creation rule for the top-most non-existing parent.
Parameters:
  resource - The resource being created The scheduling rule for creating the given resource
since:
   3.1



getContainerFullPath
public IPath getContainerFullPath()(Code)
Returns the current full path of the containing resource as entered or selected by the user, or its anticipated initial value. the container's full path, anticipated initial value, ornull if no path is known



getFileExtension
public String getFileExtension()(Code)
Returns the file extension to use when creating the new file. the file extension or null.
See Also:   WizardNewFileCreationPage.setFileExtension(String)
since:
   3.3



getFileName
public String getFileName()(Code)
Returns the current file name as entered by the user, or its anticipated initial value.

The current file name will include the file extension if the preconditions are met.
See Also:   WizardNewFileCreationPage.setFileExtension(String) the file name, its anticipated initial value, ornull if no file name is known



getInitialContents
protected InputStream getInitialContents()(Code)
Returns a stream containing the initial contents to be given to new file resource instances. Subclasses may wish to override. This default implementation provides no initial contents. initial contents to be given to new file resource instances



getNewFileLabel
protected String getNewFileLabel()(Code)
Returns the label to display in the file name specification visual component group.

Subclasses may reimplement.

the label to display in the file name specification visualcomponent group



handleAdvancedButtonSelect
protected void handleAdvancedButtonSelect()(Code)
Shows/hides the advanced option widgets.



handleEvent
public void handleEvent(Event event)(Code)
The WizardNewFileCreationPage implementation of this Listener method handles all events and enablements for controls on this page. Subclasses may extend.



initialPopulateContainerNameField
protected void initialPopulateContainerNameField()(Code)
Sets the initial contents of the container name entry field, based upon either a previously-specified initial value or the ability to determine such a value.



setContainerFullPath
public void setContainerFullPath(IPath path)(Code)
Sets the value of this page's container name field, or stores it for future use if this page's controls do not exist yet.
Parameters:
  path - the full path to the container



setFileExtension
public void setFileExtension(String value)(Code)
Set the only file extension allowed for this page's file name field. If this page's controls do not exist yet, store it for future use.

If a file extension is specified, then it will always be appended with a '.' to the text from the file name field for validation when the following conditions are met:

(1) File extension length is greater than 0
(2) File name field text length is greater than 0
(3) File name field text does not already end with a '.' and the file extension specified (case sensitive)

The file extension will not be reflected in the actual file name field until the file name field loses focus.
Parameters:
  value - The file extension without the '.' prefix (e.g. 'java', 'xml')
since:
   3.3



setFileName
public void setFileName(String value)(Code)
Sets the value of this page's file name field, or stores it for future use if this page's controls do not exist yet.
Parameters:
  value - new file name



setVisible
public void setVisible(boolean visible)(Code)



validateLinkedResource
protected IStatus validateLinkedResource()(Code)
Checks whether the linked resource target is valid. Sets the error message accordingly and returns the status. IStatus validation result from the CreateLinkedResourceGroup



validatePage
protected boolean validatePage()(Code)
Returns whether this page's controls currently all contain valid values. true if all controls are valid, andfalse if at least one is invalid



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