Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.ide.dialogs
Class SelectFilesPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by oracle.ide.dialogs.SelectFilesPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, CheckBoxListItemStateListener

public class SelectFilesPanel
extends javax.swing.JPanel
implements CheckBoxListItemStateListener

A Swing-based JPanel subclass for displaying a list of files for selection. Each file entry is rendered with a SelectFileCell, which is a modified JCheckBox.

A static showDialog() method displays an instance of this panel in a JEWTDialog or in a MessageDialog.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int CANCEL_BUTTON
          Return value if CANCEL is chosen.
static int CANNOT_SAVE_ON_CLOSE_PROMPT
           
static int CANNOT_SAVE_ON_EXIT_PROMPT
           
static int CANNOT_SAVE_PROMPT
           
static int CLOSED_BUTTON
          Return value if user closes window without selecting anything, more than likely this should be treated as either a CANCEL_OPTION or NO_OPTION.
static int DLG_MAX_HEIGHT
           
static int DLG_MAX_WIDTH
           
static int DLG_MIN_HEIGHT
           
static int DLG_MIN_WIDTH
           
static int ERASE_PROMPT
           
static int NO_BUTTON
          Return value if NO is chosen.
static int OK_BUTTON
          Return value if OK is chosen.
static int OK_CANCEL_OPTION
           
static int OK_OPTION
           
static int RELOAD_PROMPT
           
static int SAVE_PROMPT
           
static int YES_BUTTON
          Return value if YES is chosen.
static int YES_NO_CANCEL_OPTION
           
static int YES_NO_OPTION
           
 
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
  SelectFilesPanel(CheckBoxListModel listModel, boolean checkedList)
          Constructs a new instance.
protected SelectFilesPanel(CheckBoxListModel listModel, boolean checkedList, java.lang.String prompt)
           
protected SelectFilesPanel(CheckBoxListModel listModel, boolean checkedList, java.lang.String prompt, java.lang.String description)
           
 
Method Summary
static int showDialog(java.awt.Component parent, java.lang.String title, CheckBoxListModel listModel, int option, boolean checkedList, java.lang.Object[] options, java.lang.Object initialValue)
          Deprecated. use: showDialog(parent, title, filePrompt, listPrompt, listModel, checkedList, buttons) This method ignores options and initialValue. The title is used as the prompt text.
static int showDialog(java.awt.Component parent, java.lang.String title, java.lang.String filePrompt, java.lang.String listPrompt, CheckBoxListModel listModel, boolean checkedList, int buttons, java.lang.String helpTopic)
          Displays a confirmation dialog If only one file is affected, a simple MessageDialog.
static int showDialog(SelectFilesConfiguration configuration)
          Displays a confirmation dialog using the given dialog configuration.
static int showDialog(java.lang.String title, CheckBoxListModel listModel)
          Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)
static int showDialog(java.lang.String title, CheckBoxListModel listModel, int option)
          Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)
static int showDialog(java.lang.String title, CheckBoxListModel listModel, int option, boolean checkedList)
          Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)
static int showDialog(java.lang.String title, CheckBoxListModel listModel, int option, boolean checkedList, java.lang.Object[] options, java.lang.Object initialValue)
          Deprecated. use: showDialog(title, filePrompt, listPrompt, listModel, checkedList) or showDialog(title, filePrompt, listPrompt, listModel, checkedList, buttons)
static int showDialog(java.lang.String title, java.lang.String filePrompt, java.lang.String listPrompt, CheckBoxListModel listModel, boolean checkedList)
          Displays a confirmation dialog If only one file is affected, a simple MessageDialog is shown with Yes, No and Cancel options.
static int showDialog(java.lang.String title, java.lang.String filePrompt, java.lang.String listPrompt, CheckBoxListModel listModel, boolean checkedList, int buttons)
          Displays a confirmation dialog If only one file is affected, a simple MessageDialog.
static int showDialog(java.lang.String title, java.lang.String filePrompt, java.lang.String listPrompt, CheckBoxListModel listModel, boolean checkedList, int buttons, java.lang.String helpTopic)
          Displays a confirmation dialog If only one file is affected, a simple MessageDialog.
static int showDialog(java.lang.String title, java.lang.String filePrompt, java.lang.String listPrompt, CheckBoxListModel listModel, boolean checkedList, int buttons, java.lang.String helpTopic, java.lang.String description)
          Displays a confirmation dialog If only one file is affected, a simple MessageDialog.
 void stateChanged(java.lang.Object source)
          Occurs when the checked state of a list item changes.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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
 

Field Detail

SAVE_PROMPT

public static final int SAVE_PROMPT
See Also:
Constant Field Values

ERASE_PROMPT

public static final int ERASE_PROMPT
See Also:
Constant Field Values

RELOAD_PROMPT

public static final int RELOAD_PROMPT
See Also:
Constant Field Values

CANNOT_SAVE_PROMPT

public static final int CANNOT_SAVE_PROMPT
See Also:
Constant Field Values

CANNOT_SAVE_ON_CLOSE_PROMPT

public static final int CANNOT_SAVE_ON_CLOSE_PROMPT
See Also:
Constant Field Values

CANNOT_SAVE_ON_EXIT_PROMPT

public static final int CANNOT_SAVE_ON_EXIT_PROMPT
See Also:
Constant Field Values

YES_BUTTON

public static final int YES_BUTTON
Return value if YES is chosen.

See Also:
Constant Field Values

OK_BUTTON

public static final int OK_BUTTON
Return value if OK is chosen.

See Also:
Constant Field Values

NO_BUTTON

public static final int NO_BUTTON
Return value if NO is chosen.

See Also:
Constant Field Values

CANCEL_BUTTON

public static final int CANCEL_BUTTON
Return value if CANCEL is chosen.

See Also:
Constant Field Values

CLOSED_BUTTON

public static final int CLOSED_BUTTON
Return value if user closes window without selecting anything, more than likely this should be treated as either a CANCEL_OPTION or NO_OPTION.

See Also:
Constant Field Values

YES_NO_OPTION

public static final int YES_NO_OPTION
See Also:
Constant Field Values

YES_NO_CANCEL_OPTION

public static final int YES_NO_CANCEL_OPTION
See Also:
Constant Field Values

OK_CANCEL_OPTION

public static final int OK_CANCEL_OPTION
See Also:
Constant Field Values

OK_OPTION

public static final int OK_OPTION
See Also:
Constant Field Values

DLG_MAX_WIDTH

public static final int DLG_MAX_WIDTH
See Also:
Constant Field Values

DLG_MAX_HEIGHT

public static final int DLG_MAX_HEIGHT
See Also:
Constant Field Values

DLG_MIN_WIDTH

public static final int DLG_MIN_WIDTH
See Also:
Constant Field Values

DLG_MIN_HEIGHT

public static final int DLG_MIN_HEIGHT
See Also:
Constant Field Values
Constructor Detail

SelectFilesPanel

public SelectFilesPanel(CheckBoxListModel listModel,
                        boolean checkedList)
Constructs a new instance.


SelectFilesPanel

protected SelectFilesPanel(CheckBoxListModel listModel,
                           boolean checkedList,
                           java.lang.String prompt)

SelectFilesPanel

protected SelectFilesPanel(CheckBoxListModel listModel,
                           boolean checkedList,
                           java.lang.String prompt,
                           java.lang.String description)
Method Detail

showDialog

public static final int showDialog(java.lang.String title,
                                   CheckBoxListModel listModel)
Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)

Fire up the dialog, passing in a SelectFilesPanel to display the list of files from which to select.


showDialog

public static final int showDialog(java.lang.String title,
                                   CheckBoxListModel listModel,
                                   int option)
Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)

Fire up the dialog, passing in a SelectFilesPanel to display the list of files from which to select and the JOptionaPane option.


showDialog

public static final int showDialog(java.lang.String title,
                                   CheckBoxListModel listModel,
                                   int option,
                                   boolean checkedList)
Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)

Fire up the dialog, passing in a SelectFilesPanel to display the list of files from which to select, the JOptionaPane option, and whether to show just a list or a check-boxed list.


showDialog

public static final int showDialog(java.lang.String title,
                                   CheckBoxListModel listModel,
                                   int option,
                                   boolean checkedList,
                                   java.lang.Object[] options,
                                   java.lang.Object initialValue)
Deprecated. use: showDialog(title, filePrompt, listPrompt, listModel, checkedList) or showDialog(title, filePrompt, listPrompt, listModel, checkedList, buttons)

Fire up the dialog, passing in a SelectFilesPanel to display the list of files from which to select, the JOptionaPane option, and whether to show just a list or a check-boxed list. Also specify the button text and the default button.


showDialog

public static final int showDialog(java.awt.Component parent,
                                   java.lang.String title,
                                   CheckBoxListModel listModel,
                                   int option,
                                   boolean checkedList,
                                   java.lang.Object[] options,
                                   java.lang.Object initialValue)
Deprecated. use: showDialog(parent, title, filePrompt, listPrompt, listModel, checkedList, buttons) This method ignores options and initialValue. The title is used as the prompt text.

Fire up the dialog, passing in a SelectFilesPanel to display the list of files. The options parameter is an array of objects indicating the possible choices the user can make; if the objects are components, they are rendered properly; non-String objects are rendered using their toString methods; if this parameter is null, the options are determined by the Look and Feel. The initialValue parameter is the object that represents the default selection for the dialog


showDialog

public static final int showDialog(java.lang.String title,
                                   java.lang.String filePrompt,
                                   java.lang.String listPrompt,
                                   CheckBoxListModel listModel,
                                   boolean checkedList)
Displays a confirmation dialog If only one file is affected, a simple MessageDialog is shown with Yes, No and Cancel options. If more than one file is affected, a dialog containing the list of affected files is shown. Items in the list can be toggled on and off. The dialog shows OK, Cancel and Help buttons.

Parameters:
title - - The dialog title.
filePrompt - - The label to show above the files list.
listPrompt - - The label for the message prompt.
listModel - - The listModel to display.
checkedList - - A boolean indicating whether or not the list should show checkboxes.

showDialog

public static final int showDialog(java.lang.String title,
                                   java.lang.String filePrompt,
                                   java.lang.String listPrompt,
                                   CheckBoxListModel listModel,
                                   boolean checkedList,
                                   int buttons)
Displays a confirmation dialog If only one file is affected, a simple MessageDialog. If more than one file is affected, a dialog containing the list of affected files is shown. Items in the list can be toggled on and off.

Parameters:
title - - The dialog title.
filePrompt - - The label to show above the files list.
listPrompt - - The label for the message prompt.
listModel - - The listModel to display.
checkedList - - A boolean indicating whether or not the list should show checkboxes.
buttons - - The buttons to display in the dialog/prompt: OK_OPTION, OK_CANCEL_OPTION, YES_NO_OPTION or YES_NO_CANCEL_OPTION. Note, the Help button is always shown. Note about buttons: The dialog containing the checking list of files will, by default, show OK, Cancel and Help buttons. The cancel button is not shown when buttons is OK_OPTION or YES_NO_OPTION.

showDialog

public static final int showDialog(java.lang.String title,
                                   java.lang.String filePrompt,
                                   java.lang.String listPrompt,
                                   CheckBoxListModel listModel,
                                   boolean checkedList,
                                   int buttons,
                                   java.lang.String helpTopic)
Displays a confirmation dialog If only one file is affected, a simple MessageDialog. If more than one file is affected, a dialog containing the list of affected files is shown. Items in the list can be toggled on and off.

Parameters:
title - - The dialog title.
filePrompt - - The label to show above the files list.
listPrompt - - The label for the message prompt.
listModel - - The listModel to display.
checkedList - - A boolean indicating whether or not the list should show checkboxes.
buttons - - The buttons to display in the dialog/prompt: OK_OPTION, OK_CANCEL_OPTION, YES_NO_OPTION or YES_NO_CANCEL_OPTION. Note, the Help button is always shown. Note about buttons: The dialog containing the checking list of files will, by default, show OK, Cancel and Help buttons. The cancel button is not shown when buttons is OK_OPTION or YES_NO_OPTION.
helpTopic - - A string indicating the associate help topic.

showDialog

public static final int showDialog(java.lang.String title,
                                   java.lang.String filePrompt,
                                   java.lang.String listPrompt,
                                   CheckBoxListModel listModel,
                                   boolean checkedList,
                                   int buttons,
                                   java.lang.String helpTopic,
                                   java.lang.String description)
Displays a confirmation dialog If only one file is affected, a simple MessageDialog. If more than one file is affected, a dialog containing the list of affected files is shown. Items in the list can be toggled on and off.

Parameters:
title - - The dialog title.
filePrompt - - The label to show above the files list.
listPrompt - - The label for the message prompt.
listModel - - The listModel to display.
checkedList - - A boolean indicating whether or not the list should show checkboxes.
buttons - - The buttons to display in the dialog/prompt: OK_OPTION, OK_CANCEL_OPTION, YES_NO_OPTION or YES_NO_CANCEL_OPTION. Note, the Help button is always shown. Note about buttons: The dialog containing the checking list of files will, by default, show OK, Cancel and Help buttons. The cancel button is not shown when buttons is OK_OPTION or YES_NO_OPTION.
helpTopic - - A string indicating the associate help topic.
description - - A description to show at the top of the dialog.

showDialog

public static final int showDialog(java.awt.Component parent,
                                   java.lang.String title,
                                   java.lang.String filePrompt,
                                   java.lang.String listPrompt,
                                   CheckBoxListModel listModel,
                                   boolean checkedList,
                                   int buttons,
                                   java.lang.String helpTopic)
Displays a confirmation dialog If only one file is affected, a simple MessageDialog. If more than one file is affected, a dialog containing the list of affected files is shown. Items in the list can be toggled on and off.

Parameters:
parent - - The parent Component for the dialog.
title - - The dialog title.
filePrompt - - The label to show above the files list.
listPrompt - - The label for the message prompt.
listModel - - The listModel to display.
checkedList - - A boolean indicating whether or not the list should show checkboxes.
buttons - - The buttons to display in the dialog/prompt: OK_OPTION, OK_CANCEL_OPTION, YES_NO_OPTION or YES_NO_CANCEL_OPTION. Note, the Help button is always shown. Note about buttons: The dialog containing the checking list of files will, by default, show OK, Cancel and Help buttons. The cancel button is not shown when buttons is OK_OPTION or YES_NO_OPTION.
helpTopic - - A string indicating the associate help topic.

showDialog

public static final int showDialog(SelectFilesConfiguration configuration)
Displays a confirmation dialog using the given dialog configuration. If only one file is affected, a simple MessageDialog. If more than one file is affected, a dialog containing the list of affected files is shown. Items in the list can be toggled on and off.

Parameters:
configuration - the configuration property object.
Returns:
the dialog return value.

stateChanged

public void stateChanged(java.lang.Object source)
Occurs when the checked state of a list item changes.

Specified by:
stateChanged in interface CheckBoxListItemStateListener
Parameters:
source - The object whose state has changed.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.