Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.persistence.gui
Class PersistenceObjectChooser

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--oracle.dss.persistence.gui.PersistenceUI
                          |
                          +--oracle.dss.persistence.gui.PersistenceObjectChooser
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, HelpContext, java.awt.image.ImageObserver, javax.swing.event.ListSelectionListener, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public class PersistenceObjectChooser
extends PersistenceUI
implements javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener, HelpContext, javax.accessibility.Accessible

The user interface for saving and loading objcts that are stored in the BI Beans Catalog.

Users interact with this class to perform any of the following actions, provided that they have the privilege to do so:

Users can also display properties of objects and folders. Users who have full control privilege can also modify the access rights of a folder or object.

Like the JFileChooser, this PersistenceObjectChooser does not actually save or load objects into the underlying catalog. Instead, this class provides information to the application about the action that a user performed. It is up to the application to respond to the user action to save or load an object. For example, this class provides information about the file name under which to save an object, the location in which to save it, and so on.

Application developers can customize this object chooser by specifying:

See Also:
Privilege, Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent

 

Field Summary
static java.lang.String ALL_TYPES
          The name of the default PersistenceObjectFilter.
static int CANCEL_OPTION
          User clicked Cancel to dismiss the dialog.
static int OK_OPTION
          User clicked OK to dismiss the dialog.
static int OPEN_DIALOG
          Dialog type: Open dialog.
static int SAVE_DIALOG
          Dialog type: Save dialog.

 

Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
PersistenceObjectChooser()
          Constructor.
PersistenceObjectChooser(javax.naming.directory.DirContext con)
          Constructor that specifies a root folder.
PersistenceObjectChooser(javax.naming.directory.DirContext con, java.lang.String pathName)
          Constructor that specifies a root folder and a preferred folder.

 

Method Summary
 void addPersistenceObjectFilter(PersistenceObjectFilter filter)
          Adds an object filter to this PersistenceObjectChooser.
 javax.accessibility.AccessibleContext getAccessibleContext()
          Retrieves an AccessibleContext.
 javax.naming.directory.DirContext getCurrentDirectory()
          Retrieves the current folder.
 java.lang.String getCurrentDirectoryPathName()
          Retrieves the full path name of the current folder.
 int getDialogType()
          Retrieves the type of dialog that this PersistenceObjectChooser displays.
 java.lang.String getHelpContextID()
          Retrieves the Help context ID for this panel.
 PersistenceObjectFilter[] getPersistenceObjectFilter()
          Retrieves all of the object filters that this PersistenceObjectChooser currently uses.
 java.lang.String getSelectedObjectName()
          Retrieves the name of the object that the user has selected.
 java.lang.String getSelectedObjectPathName()
          Retrieves the full path name of the object that the user has selected.
 void removePersistenceObjectFilter(PersistenceObjectFilter filter)
          Removes an object filter from this PersistenceObjectChooser.
 void removePersistenceObjectFilter(java.lang.String filterName)
          Removes an object filter with the specified name from this PersistenceObjectChooser.
 void resetPersistenceObjectFilter()
          Resets the object filter list to contain only "all types" as the filter.
 void setAttributesToDisplay(java.lang.String[] attrsID, java.lang.String[] attrsName, int[] width)
          Specifies the attributes that are displayed in a detailed list of objects.
 void setCurrentDirectoryPath(java.lang.String pathName)
          Specifies the path of the starting directory to display.
 void setDefaultPersistenceObjectFilter(java.lang.String filterDisplayName)
          Specifies the default filter to use in the PersistenceObjectChooser.
 void setInitialDirectory(javax.naming.directory.DirContext context)
          Specifies the root folder to use in this PersistenceObjectChooser.
 void setSelectedObjectName(java.lang.String name)
          Specifies the name that appears in the object name text field, by default.
 int showOpenDialog(java.awt.Frame parent)
          Displays a modal Open dialog box.
 int showSaveDialog(java.awt.Frame parent)
          Displays a modal Save dialog.
 int showSaveDialog(java.awt.Frame parent, boolean showWarning)
          Displays a modal Save dialog.

 

Methods inherited from class oracle.dss.persistence.gui.PersistenceUI
getHelpProvider, getLocale, setHelpContextID, setHelpProvider, setLocale, setRootName

 

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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI

 

Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate

 

Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface javax.swing.event.ListSelectionListener
valueChanged

 

Methods inherited from interface java.beans.PropertyChangeListener
propertyChange

 

Methods inherited from interface oracle.dss.util.help.HelpContext
setHelpContextID

 

Field Detail

SAVE_DIALOG

public static final int SAVE_DIALOG
Dialog type: Save dialog.

OPEN_DIALOG

public static final int OPEN_DIALOG
Dialog type: Open dialog.

CANCEL_OPTION

public static final int CANCEL_OPTION
User clicked Cancel to dismiss the dialog.
See Also:
showOpenDialog(java.awt.Frame), showSaveDialog(java.awt.Frame)

OK_OPTION

public static final int OK_OPTION
User clicked OK to dismiss the dialog.
See Also:
showOpenDialog(java.awt.Frame), showSaveDialog(java.awt.Frame)

ALL_TYPES

public static final java.lang.String ALL_TYPES
The name of the default PersistenceObjectFilter. This filter displays all objects in the folder (no filtering).
See Also:
removePersistenceObjectFilter(oracle.dss.persistence.gui.PersistenceObjectFilter)
Constructor Detail

PersistenceObjectChooser

public PersistenceObjectChooser()
Constructor. This constructor currently does nothing.
See Also:
PersistenceObjectChooser(DirContext)

PersistenceObjectChooser

public PersistenceObjectChooser(javax.naming.directory.DirContext con)
Constructor that specifies a root folder.
Parameters:
con - The root folder for this PersistenceObjectChooser. Do not pass null.

PersistenceObjectChooser

public PersistenceObjectChooser(javax.naming.directory.DirContext con,
                                java.lang.String pathName)
Constructor that specifies a root folder and a preferred folder. For example, if a user navigated to a folder in opening an object, you could save or cache that path name, and then use the path name in this constructor to have the dialog present the path initially.
Parameters:
con - The root folder for this PersistenceObjectChooser. Do not pass null.
pathName - The location to present initially.
Method Detail

getAccessibleContext

public javax.accessibility.AccessibleContext getAccessibleContext()
Retrieves an AccessibleContext. Accessibility devices, such as screen readers, call this method. Application developers should not need to call it.
Specified by:
getAccessibleContext in interface javax.accessibility.Accessible
Overrides:
getAccessibleContext in class javax.swing.JComponent
Returns:
An AccessibleContext for this PersistenceObjectChooser.

showOpenDialog

public int showOpenDialog(java.awt.Frame parent)
Displays a modal Open dialog box.
Parameters:
parent - The container of the dialog box. Can be null.
Returns:
A constant that indicates whether the user clicked OK or Cancel.
See Also:
OK_OPTION, CANCEL_OPTION

showSaveDialog

public int showSaveDialog(java.awt.Frame parent)
Displays a modal Save dialog.
Parameters:
parent - The container of the dialog box. Can be null.
Returns:
A constant that indicates whether the user clicked OK or Cancel.
See Also:
OK_OPTION, CANCEL_OPTION

showSaveDialog

public int showSaveDialog(java.awt.Frame parent,
                          boolean showWarning)
Displays a modal Save dialog.
Parameters:
parent - The container of the dialog box. Can be null.
showWarning - true if a warning dialog should be show when the user tries to overwrite an existing object. false if no warning dialog should be show. The default value is true.
Returns:
A constant that indicates whether the user clicked OK or Cancel.
See Also:
OK_OPTION, CANCEL_OPTION

setInitialDirectory

public void setInitialDirectory(javax.naming.directory.DirContext context)
Specifies the root folder to use in this PersistenceObjectChooser. Call this method before you display the dialog box.
Parameters:
context - The root folder to use in this PersistenceObjectChooser. Do not pass null.

setCurrentDirectoryPath

public void setCurrentDirectoryPath(java.lang.String pathName)
Specifies the path of the starting directory to display. The path of the starting directory is relative to the root folder that was specified by the user. Call this method before you display the dialog box.
Parameters:
pathName - The name of the path of the directory to be display when the dialog box is display.

getCurrentDirectory

public javax.naming.directory.DirContext getCurrentDirectory()
Retrieves the current folder. Call this method to retrieve the context from which to load an object or the context into which to save an object.
Overrides:
getCurrentDirectory in class PersistenceUI
Returns:
The folder to which the user has navigated.

getCurrentDirectoryPathName

public java.lang.String getCurrentDirectoryPathName()
Retrieves the full path name of the current folder. The current folder is the folder to which the user has navigated.
Returns:
The name of the full path of the folder that the user has selected, relative to the root folder.

getSelectedObjectName

public java.lang.String getSelectedObjectName()
Retrieves the name of the object that the user has selected. Call this method to determine which object to load or to save.
Returns:
The name of the object that the user wants to load or to save.

setSelectedObjectName

public void setSelectedObjectName(java.lang.String name)
Specifies the name that appears in the object name text field, by default.
Parameters:
name - The default object name to display in the object name text field. Do not pass null.

getSelectedObjectPathName

public java.lang.String getSelectedObjectPathName()
Retrieves the full path name of the object that the user has selected. The path name is relative to the root folder.
Returns:
The full path name of the object selected by the user. Returns null if no object has been selected. This method returns null, for example, if the user clicks the Cancel button.

getDialogType

public int getDialogType()
Retrieves the type of dialog that this PersistenceObjectChooser displays.
Returns:
A constant that identifies the type of dialog that is displayed. Valid constants are listed in the "See Also" section.
See Also:
OPEN_DIALOG, SAVE_DIALOG

addPersistenceObjectFilter

public void addPersistenceObjectFilter(PersistenceObjectFilter filter)
Adds an object filter to this PersistenceObjectChooser. The PersistenceObjectFilter allows users to determine the types of files to display in this PersistenceObjectChooser.
Parameters:
filter - The PersistenceObjectFilter to add.

removePersistenceObjectFilter

public void removePersistenceObjectFilter(PersistenceObjectFilter filter)
Removes an object filter from this PersistenceObjectChooser.
Parameters:
filter - The PersistenceObjectFilter to remove.
See Also:
removePersistenceObjectFilter(oracle.dss.persistence.gui.PersistenceObjectFilter)

removePersistenceObjectFilter

public void removePersistenceObjectFilter(java.lang.String filterName)
Removes an object filter with the specified name from this PersistenceObjectChooser.
Parameters:
filter - The name of the object filter to remove.
See Also:
removePersistenceObjectFilter(oracle.dss.persistence.gui.PersistenceObjectFilter), PersistenceObjectFilter

resetPersistenceObjectFilter

public void resetPersistenceObjectFilter()
Resets the object filter list to contain only "all types" as the filter. This method removes all object filters that have been added in calls to the addPersistenceObjectFilter method. Objects of all types are displayed in the dialog.
See Also:
addPersistenceObjectFilter(oracle.dss.persistence.gui.PersistenceObjectFilter), removePersistenceObjectFilter(oracle.dss.persistence.gui.PersistenceObjectFilter), PersistenceObjectFilter

getPersistenceObjectFilter

public PersistenceObjectFilter[] getPersistenceObjectFilter()
Retrieves all of the object filters that this PersistenceObjectChooser currently uses.
Returns:
A list of PersistenceObjectFilter objects that this PersistenceObjectChooser uses.
See Also:
addPersistenceObjectFilter(oracle.dss.persistence.gui.PersistenceObjectFilter)

setDefaultPersistenceObjectFilter

public void setDefaultPersistenceObjectFilter(java.lang.String filterDisplayName)
Specifies the default filter to use in the PersistenceObjectChooser. If this is not specified, or if the specified filter name does not match any of the existing filters, then the default filter is set to "All Types", which displays all objects in the folder. If there are two filters with the same display name, the first one on the list is used.
Parameters:
filterDisplayName - The display name of the filter.
See Also:
PersistenceObjectFilter

setAttributesToDisplay

public void setAttributesToDisplay(java.lang.String[] attrsID,
                                   java.lang.String[] attrsName,
                                   int[] width)
Specifies the attributes that are displayed in a detailed list of objects. This method also specifies how these attributes should be displayed.
Parameters:
attrsID - A list of constants that identify the attributes to display in the details view. Valid constants are defined in the PSRConstants and PersistableConstants interfaces.
attrsName - The names to display for each attribute in attrsID. The strings in this array are the column headings for the details. The length of the attrsName array must match the length of the attrsID array.
width - The width, in pixels, of each column for the attribute in the details view. The length of the width array must match the length of the attrsID array.
See Also:
PSRConstants, PersistableConstants

getHelpContextID

public java.lang.String getHelpContextID()
Retrieves the Help context ID for this panel. The Help context ID is the full class path for this panel. This Help context ID is used when listening for the user event to display Help for this panel.
Specified by:
getHelpContextID in interface HelpContext
Returns:
The Help context ID for this panel.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.