|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.sun.javatest.tool.EditableList
public class EditableList
A component that displays an editable list of items.
Nested Class Summary |
---|
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 | |
---|---|
protected javax.swing.DefaultListModel |
listModel
The list model that contains the elements of the list. |
protected UIFactory |
uif
The factory used to create the GUI elements of the component. |
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 | |
---|---|
EditableList()
Create an empty component, using a standard UIFactory for this class, and using resources beginning with "list.". |
|
EditableList(UIFactory uif,
java.lang.String uiKey)
Create an empty component, using a specified UIFactory and resource prefix. |
Method Summary | |
---|---|
void |
addListDataListener(javax.swing.event.ListDataListener l)
Add a listener to be notified of events when the list data changes. |
void |
clear()
Remove all entries from the list. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Get the accessible context for this pane. |
protected java.lang.Object |
getDisplayValue(java.lang.Object item)
Get the display value for an item in the list. |
java.lang.Object[] |
getItems()
Get the items currently in the list. |
java.lang.Object[] |
getItems(java.lang.Class c)
Get the items currently in the list, in an array of a specific type. |
protected java.lang.Object |
getNewItem()
Invoked to get a new item to put in the list, when the user clicks the "Add" button". |
protected java.lang.Object |
getNewItem(java.lang.Object oldItem)
Invoked to get a new item to replace an existing item in the list. |
java.lang.String |
getToolTipText()
Get the tool tip text that appears on the list. |
boolean |
isDuplicatesAllowed()
Check whether or not duplicates should be allowed in the list. |
void |
removeListDataListener(javax.swing.event.ListDataListener l)
Remove a listener that was previously added to be notified of events when the list data changes. |
void |
setDuplicatesAllowed(boolean b)
Specify whether or not duplicates should be allowed in the list. |
void |
setEnabled(boolean b)
Set whether or not the list can be edited by the user. |
void |
setItems(java.lang.Object[] items)
Set the items in the list. |
void |
setToolTipText(java.lang.String tip)
Set the tool tip text that appears on the list. |
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, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
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, 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, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final UIFactory uif
protected javax.swing.DefaultListModel listModel
Constructor Detail |
---|
public EditableList()
public EditableList(UIFactory uif, java.lang.String uiKey)
uif
- The UIFactory used to construct the componentuiKey
- The prefix for any UI resources that may be requiredMethod Detail |
---|
public javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext
in interface javax.accessibility.Accessible
getAccessibleContext
in class javax.swing.JComponent
public void setEnabled(boolean b)
setEnabled
in class javax.swing.JComponent
b
- if true, the component can be edited by the user;
if false, it cannotpublic void setItems(java.lang.Object[] items)
items
- the array of items to be put in the list.getItems()
public void clear()
public java.lang.Object[] getItems()
setItems(java.lang.Object[])
public java.lang.Object[] getItems(java.lang.Class c)
c
- the component type of the array to be returned
setItems(java.lang.Object[])
public java.lang.String getToolTipText()
getToolTipText
in class javax.swing.JComponent
setToolTipText(java.lang.String)
public void setToolTipText(java.lang.String tip)
setToolTipText
in class javax.swing.JComponent
tip
- the tool tip text to appear on the listgetToolTipText()
public void addListDataListener(javax.swing.event.ListDataListener l)
l
- the listener to be notifiedremoveListDataListener(javax.swing.event.ListDataListener)
public void removeListDataListener(javax.swing.event.ListDataListener l)
l
- the listener to be notifiedaddListDataListener(javax.swing.event.ListDataListener)
public void setDuplicatesAllowed(boolean b)
b
- true if duplicates should be allowed, and false otherwiseisDuplicatesAllowed()
public boolean isDuplicatesAllowed()
setDuplicatesAllowed(boolean)
protected java.lang.Object getDisplayValue(java.lang.Object item)
item
- the object for which to get the display value
protected java.lang.Object getNewItem()
protected java.lang.Object getNewItem(java.lang.Object oldItem)
oldItem
- the item to be replaced in the list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |