|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel oracle.ide.component.NewFilePanel
The NewFilePanel
class provides UI for specifying the location
of a new file. Two fields are provided - one for the directory in which to
create the new file, and one for the name of the file. The correct extension
for the file will be ensured. A browse button is placed next to the directory
field so that the user can select the directory using a chooser dialog.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
NewFilePanel()
Creates a new NewFilePanel instance. |
Method Summary | |
javax.swing.JComponent |
getDefaultFocusComponent()
|
javax.swing.JTextField |
getDirectoryField()
|
javax.swing.JTextField |
getFileField()
|
java.net.URL |
getFileURL()
Retrieves the URL of the file being specified in this dialog. |
NewFileValidator |
getNewFileURLValidator()
Retrieves the current NewFileValidator . |
boolean |
isSupportsAutoFill()
|
void |
requestFocus()
|
java.net.URL |
runDialog(java.lang.String title)
Creates and displays a dialog containing this NewFilePanel |
void |
setCanOverwriteOpenNodes(boolean canOverwriteOpenNodes)
Specifies whether this NewFilePanel instance should allow the overwriting of open nodes. |
void |
setDefaultDirectoryName(java.net.URL rootFolderURL)
Resets the directory text field to use the default: the root directory + the project file name. |
void |
setDirectoryPrompt(java.lang.String prompt)
|
void |
setDirectoryURL(java.net.URL dir)
Sets the URL used for the directory field. |
void |
setFileExtension(java.lang.String ext)
Sets the extension that should be used for the new file. |
void |
setFileName(java.lang.String fName)
Sets the file name. |
void |
setFilePrompt(java.lang.String prompt)
|
void |
setFileType(java.lang.String type)
Specifies a string used to describe the type of file. |
void |
setInteractiveMode(boolean isInteractive)
Specifies whether this NewFilePanel is in interactive mode. |
void |
setNewFileURLValidator(NewFileValidator validator)
Specifies the NewFileValidator that will be used, in addition
to the default validation, to make sure that the URL for the new File is
valid. |
void |
setShowExtension(boolean show)
Determins whether or not the file extension is shown in the file name field. |
void |
setSupportsAutoFill(boolean supportsAutoFill)
|
static java.net.URL |
validateURL(java.awt.Component parent,
java.net.URL tmpURL,
java.lang.String type,
boolean canOverwriteOpenNodes)
|
void |
vetoableChange(java.beans.PropertyChangeEvent evt)
|
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NewFilePanel()
Method Detail |
public void setSupportsAutoFill(boolean supportsAutoFill)
public boolean isSupportsAutoFill()
public void setInteractiveMode(boolean isInteractive)
public void setFileExtension(java.lang.String ext)
public void setFileType(java.lang.String type)
public void setNewFileURLValidator(NewFileValidator validator)
NewFileValidator
that will be used, in addition
to the default validation, to make sure that the URL for the new File is
valid. The validator, for example, could be used to ensure that a JSP
filename is valid.
validator
- the NewFileValidator to use, or null
to only
use the default validation.public NewFileValidator getNewFileURLValidator()
NewFileValidator
.
NewFileValidator
.public void setCanOverwriteOpenNodes(boolean canOverwriteOpenNodes)
public java.net.URL runDialog(java.lang.String title)
title
- the title to use for the dialog
null
if the user canceled the dialog.public java.net.URL getFileURL() throws TraversalException
TraversalException
- if an error is encountered in determining the
URL.public static java.net.URL validateURL(java.awt.Component parent, java.net.URL tmpURL, java.lang.String type, boolean canOverwriteOpenNodes) throws TraversalException
TraversalException
public void setDirectoryURL(java.net.URL dir)
public void setFileName(java.lang.String fName)
public void setShowExtension(boolean show)
public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException
vetoableChange
in interface java.beans.VetoableChangeListener
java.beans.PropertyVetoException
public javax.swing.JComponent getDefaultFocusComponent()
public void requestFocus()
public void setDirectoryPrompt(java.lang.String prompt)
public void setFilePrompt(java.lang.String prompt)
public void setDefaultDirectoryName(java.net.URL rootFolderURL)
public javax.swing.JTextField getDirectoryField()
public javax.swing.JTextField getFileField()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.