com.jtechlabs.ui.widget.directorychooser
Class DirectoryChooserNameRequestEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.jtechlabs.ui.widget.directorychooser.DirectoryChooserNameRequestEvent
All Implemented Interfaces:
java.io.Serializable

public class DirectoryChooserNameRequestEvent
extends java.util.EventObject

An event, that notifies about request to provide JDirectoryChooser component with a name for the directory. Used for creation of new directories and renaming of existing directories.

Version:
1.0
Author:
Aleksey Prochukhan

Field Summary
static int NEW_DIRECTORY
          Request name for the new directory.
static int RENAME_DIRECTORY
          Request name to rename the directory.
 
Constructor Summary
DirectoryChooserNameRequestEvent(java.lang.Object source, java.io.File path, int type)
          Notifies about request to provide name for the directory.
 
Method Summary
 java.lang.String getName()
          Returns the name of the directory, entered by user.
 java.io.File getPath()
          Returns currently selected directory object.
 int getType()
          Returns the type of this request.
 void setName(java.lang.String name)
          Set new name for the directory.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEW_DIRECTORY

public static final int NEW_DIRECTORY
Request name for the new directory.

See Also:
Constant Field Values

RENAME_DIRECTORY

public static final int RENAME_DIRECTORY
Request name to rename the directory.

See Also:
Constant Field Values
Constructor Detail

DirectoryChooserNameRequestEvent

public DirectoryChooserNameRequestEvent(java.lang.Object source,
                                        java.io.File path,
                                        int type)
Notifies about request to provide name for the directory.

Parameters:
path - the currently selected directory.
Method Detail

getPath

public java.io.File getPath()
Returns currently selected directory object.

Returns:
the currently selected directory.

getType

public int getType()
Returns the type of this request.

It can be either NEW_DIRECTORY or RENAME_DIRECTORY.

Returns:
the type of request.

setName

public void setName(java.lang.String name)
Set new name for the directory.

Parameters:
name - the name, entered by user.

getName

public java.lang.String getName()
Returns the name of the directory, entered by user.

Returns:
the name of the directory or null if operation was canceled.


Copyright © 2005 JTechLabs.com All Rights Reserved.