org.ceryle.ui
Class AddReferenceDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.ceryle.ui.AddReferenceDialog
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
public class AddReferenceDialog
- extends JDialog
- Since:
- JDK1.4
- Version:
- $Id$
- Author:
- Murray Altheim
- See Also:
- Serialized Form
|
Field Summary |
static int |
DEFAULT_COLUMN_WIDTH
The default column width (in characters) for the display list. |
static int |
DEFAULT_ROW_COUNT
The default number of rows to show in the display list. |
static int |
MIN_HEIGHT
Minimum window height in pixels. |
static int |
MIN_WIDTH
Minimum window width in pixels. |
|
Method Summary |
protected JPanel |
createCenterPanel(String description)
Returns the center panel containing the selection area(s) and optional help text. |
protected JPanel |
createNorthPanel(String message)
Returns the northernmost panel containing the message text. |
protected JPanel |
createSouthPanel(boolean includeHelp)
Returns the southernmost panel containing the submit and cancel buttons. |
int |
getSelectedButton()
Returns the value of the selected button as one of the JOptionPane
options JOptionPane.YES_OPTION, JOptionPane.NO_OPTION,
or JOptionPane.CANCEL_OPTION. |
Object |
getSelectedValue()
Returns the selected Object, null if there is no selection. |
boolean |
isHelpVisible()
|
void |
setActive(boolean active)
Sets the active/inactive state of this dialog box, as indicated
by the south panel colors. |
void |
setCollection(String cid)
Set the contents of the list to the documents found in the
collection identified by cid. |
void |
setContents(List list)
Sets the list to the contents of the provided List. |
void |
setHelpText(String content)
Set the help text to the String content. |
void |
setSelected(Object o)
Set the selection to the provided object, which is added to the list
if it is not already a member. |
protected void |
setSelectedButton(int value)
|
| Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Dialog |
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
MIN_WIDTH
public static int MIN_WIDTH
- Minimum window width in pixels. This defaults to 400.
MIN_HEIGHT
public static int MIN_HEIGHT
- Minimum window height in pixels. This defaults to 200.
DEFAULT_COLUMN_WIDTH
public static int DEFAULT_COLUMN_WIDTH
- The default column width (in characters) for the display list.
DEFAULT_ROW_COUNT
public static int DEFAULT_ROW_COUNT
- The default number of rows to show in the display list.
AddReferenceDialog
public AddReferenceDialog(DocumentView documentview,
String title,
String message,
String description,
String cid,
ListCellRenderer renderer)
- Constructor for a dialog box containing a selection list.
The list should be supplied as an AbstractListModel or Vector
containing a list of values. The result is returned from the
the method getSelection(), and is one or more selected
values, or null if there isn't a selection.
Note that even the provided list is optional. If null, the
dialog will still be displayed, but with no displayed list.
- Parameters:
documentview - the parent viewtitle - the dialog titlemessage - the text to display above the listdescription - an optional text descriptioncid - the ID of the initially-displayed Collectionrenderer - an optional cell renderer
setCollection
public void setCollection(String cid)
- Set the contents of the list to the documents found in the
collection identified by cid.
createNorthPanel
protected JPanel createNorthPanel(String message)
- Returns the northernmost panel containing the message text.
createCenterPanel
protected JPanel createCenterPanel(String description)
- Returns the center panel containing the selection area(s) and optional help text.
setContents
public void setContents(List list)
- Sets the list to the contents of the provided List.
A null value clears any existing contents.
setSelectedButton
protected void setSelectedButton(int value)
getSelectedButton
public int getSelectedButton()
- Returns the value of the selected button as one of the JOptionPane
options JOptionPane.YES_OPTION, JOptionPane.NO_OPTION,
or JOptionPane.CANCEL_OPTION.
setSelected
public void setSelected(Object o)
- Set the selection to the provided object, which is added to the list
if it is not already a member. This method should not be called if
the originating list is not backed by a SetModel.
setActive
public void setActive(boolean active)
- Sets the active/inactive state of this dialog box, as indicated
by the south panel colors. This has no effect on the enabled
state of any components, just their color.
createSouthPanel
protected JPanel createSouthPanel(boolean includeHelp)
- Returns the southernmost panel containing the submit and cancel buttons.
isHelpVisible
public boolean isHelpVisible()
setHelpText
public void setHelpText(String content)
- Set the help text to the String content.
getSelectedValue
public Object getSelectedValue()
- Returns the selected Object, null if there is no selection.
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.