|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.dialogs.DialogPage org.eclipse.jface.wizard.WizardPage org.eclipse.ui.dialogs.WizardNewFileCreationPage
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
Subclasses may extend
Field Summary |
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
WizardNewFileCreationPage(String pageName,
IStructuredSelection selection)
Creates a new file creation wizard page. |
Method Summary | |
protected void | createAdvancedControls(Composite parent)
Creates the widget for advanced options. |
void | createControl(Composite parent)
(non-Javadoc) Method declared on IDialogPage. |
protected void | createFile(IFile fileHandle,
InputStream contents,
IProgressMonitor monitor)
Creates a file resource given the file handle and contents. |
protected IFile | createFileHandle(IPath filePath)
Creates a file resource handle for the file with the given workspace path. |
protected void | createLinkTarget()
Creates the link target path if a link target has been specified. |
IFile | createNewFile()
Creates a new file resource in the selected container and with the selected name. |
IPath | getContainerFullPath()
Returns the current full path of the containing resource as entered or selected by the user, or its anticipated initial value. |
String | getFileName()
Returns the current file name as entered by the user, or its anticipated initial value. |
protected InputStream | getInitialContents()
Returns a stream containing the initial contents to be given to new file resource instances. |
protected String | getNewFileLabel()
Returns the label to display in the file name specification visual component group. |
protected void | handleAdvancedButtonSelect()
Shows/hides the advanced option widgets. |
void | handleEvent(Event event)
The WizardNewFileCreationPage implementation of this Listener method handles all events and enablements for controls on this page. |
protected void | initialPopulateContainerNameField()
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. |
void | setContainerFullPath(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. |
void | setFileName(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. |
void | setVisible(boolean visible)
Sets the visibility of this dialog page. |
protected IStatus | validateLinkedResource()
Checks whether the linked resource target is valid. |
protected boolean | validatePage()
Returns whether this page's controls currently all contain valid values. |
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp |
Constructor Detail |
public WizardNewFileCreationPage(String pageName, IStructuredSelection selection)
Method Detail |
protected void createAdvancedControls(Composite parent)
public void createControl(Composite parent)
protected void createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) throws CoreException
protected IFile createFileHandle(IPath filePath)
protected void createLinkTarget()
public IFile createNewFile()
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.
public IPath getContainerFullPath()
public String getFileName()
protected InputStream getInitialContents()
protected String getNewFileLabel()
Subclasses may reimplement.
protected void handleAdvancedButtonSelect()
public void handleEvent(Event event)
protected void initialPopulateContainerNameField()
public void setContainerFullPath(IPath path)
public void setFileName(String value)
protected IStatus validateLinkedResource()
protected boolean validatePage()
public void setVisible(boolean visible)
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.