Extension SDK 10.1.2

oracle.ide.dialogs
Class SelectFilesPanel

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

public class SelectFilesPanel
extends javax.swing.JPanel
implements oracle.ide.controls.checkboxlist.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 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
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(oracle.ide.controls.checkboxlist.CheckBoxListModel listModel, boolean checkedList)
          Constructs a new instance.
 
Method Summary
static int showDialog(java.awt.Component parent, java.lang.String title, oracle.ide.controls.checkboxlist.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, oracle.ide.controls.checkboxlist.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, oracle.ide.controls.checkboxlist.CheckBoxListModel listModel)
          Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)
static int showDialog(java.lang.String title, oracle.ide.controls.checkboxlist.CheckBoxListModel listModel, int option)
          Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)
static int showDialog(java.lang.String title, oracle.ide.controls.checkboxlist.CheckBoxListModel listModel, int option, boolean checkedList)
          Deprecated. use showDialog(title, filePrompt, listPrompt, listModel, checkedList)
static int showDialog(java.lang.String title, oracle.ide.controls.checkboxlist.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, oracle.ide.controls.checkboxlist.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, oracle.ide.controls.checkboxlist.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, oracle.ide.controls.checkboxlist.CheckBoxListModel listModel, boolean checkedList, int buttons, java.lang.String helpTopic)
          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, 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, 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
 

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(oracle.ide.controls.checkboxlist.CheckBoxListModel listModel,
                        boolean checkedList)
Constructs a new instance.

Method Detail

showDialog

public static final int showDialog(java.lang.String title,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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,
                                   oracle.ide.controls.checkboxlist.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.awt.Component parent,
                                   java.lang.String title,
                                   java.lang.String filePrompt,
                                   java.lang.String listPrompt,
                                   oracle.ide.controls.checkboxlist.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.

stateChanged

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

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

Extension SDK

 

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