public class JNameEdList extends UIList implements javax.swing.event.CellEditorListener
限定符和类型 | 字段和说明 |
---|---|
protected ListCellEditor |
cellEditor |
protected int |
editingIndex |
protected java.awt.Component |
editorComp |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
构造器和说明 |
---|
JNameEdList() |
JNameEdList(javax.swing.ListModel dataModel) |
JNameEdList(java.lang.Object[] listData) |
JNameEdList(java.util.Vector<?> listData) |
限定符和类型 | 方法和说明 |
---|---|
void |
addEditingListner(PropertyChangeAdapter l)
编辑时的监听器
|
void |
addModNameActionListener(ModNameActionListener l)
添加名字改变时的listener
|
java.awt.Rectangle |
createRect(java.awt.Rectangle rect,
int iconWidth) |
protected void |
doAfterLostFocus() |
protected void |
doAfterStopEditing() |
void |
editingCanceled(javax.swing.event.ChangeEvent e)
编辑取消
|
void |
editingStopped(javax.swing.event.ChangeEvent e)
编辑结束
|
boolean |
editItemAt(int index)
编辑第index项
|
java.lang.String[] |
getAllNames() |
java.lang.Object[] |
getAllTypes() |
ListCellEditor |
getCellEditor() |
java.lang.String |
getEditingName() |
int |
getIconWidth() |
java.lang.String |
getNameAt(int index) |
java.lang.Object |
getType(int index) |
boolean |
isEditable()
是否可编辑
|
boolean |
isNameShouldNumber()
是否强制ListName是数字 (int型)
|
void |
removeModNameActionListener(ModNameActionListener l)
移除某名字改变时的listener
|
void |
setCellEditor(ListCellEditor editor) |
void |
setEditable(boolean editable) |
void |
setIllegalIndex(int index) |
void |
setNameAt(java.lang.String name,
int index) |
void |
setNameShouldNumber(boolean isNameShouldNumber) |
void |
stopEditing()
停止编辑事件
|
createToolTip, getToolTipLocation, getToolTipText
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectedValuesList, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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
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
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, 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
protected transient ListCellEditor cellEditor
protected transient java.awt.Component editorComp
protected transient int editingIndex
public JNameEdList(javax.swing.ListModel dataModel)
public JNameEdList(java.lang.Object[] listData)
public JNameEdList(java.util.Vector<?> listData)
public JNameEdList()
public void setEditable(boolean editable)
public boolean isEditable()
public void setNameShouldNumber(boolean isNameShouldNumber)
public boolean isNameShouldNumber()
public void addModNameActionListener(ModNameActionListener l)
l
- 监听器public void addEditingListner(PropertyChangeAdapter l)
l
- 监听器public void removeModNameActionListener(ModNameActionListener l)
l
- 监听器public ListCellEditor getCellEditor()
protected void doAfterLostFocus()
public void setCellEditor(ListCellEditor editor)
public java.lang.String getNameAt(int index)
public java.lang.Object getType(int index)
public void setIllegalIndex(int index)
public void setNameAt(java.lang.String name, int index)
public boolean editItemAt(int index)
index
- 序号public int getIconWidth()
public java.awt.Rectangle createRect(java.awt.Rectangle rect, int iconWidth)
public java.lang.String getEditingName()
public void editingCanceled(javax.swing.event.ChangeEvent e)
editingCanceled
在接口中 javax.swing.event.CellEditorListener
e
- 事件public void editingStopped(javax.swing.event.ChangeEvent e)
editingStopped
在接口中 javax.swing.event.CellEditorListener
e
- 事件public void stopEditing()
protected void doAfterStopEditing()
public java.lang.String[] getAllNames()
public java.lang.Object[] getAllTypes()