public class DSetEditor<E extends DSet.Entry> extends JPanel implements ActionListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
DSetEditor.Accessor<F extends DSet.Entry>
An interface for a plugin defining how the editor interacts with its underlying data.
|
JComponent.AccessibleJComponentComponent.BaselineResizeBehaviorTOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
DSetEditor(DObject setter,
String setName,
Class<?> entryClass)
Construct a DSet editor to merely display the specified set.
|
DSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields)
Construct a DSetEditor, allowing the specified fields to be edited.
|
DSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp)
Construct a DSetEditor with a custom FieldInterpreter.
|
DSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
String[] displayFields,
Predicate<E> entryFilter)
Construct a DSetEditor that only displays entries that match the given Predicate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent event) |
void |
addNotify() |
Predicate<E> |
getFilter() |
Dimension |
getPreferredSize() |
DSet.Entry |
getSelectedEntry()
Get the currently selected entry.
|
String |
getSetName() |
JTable |
getTable()
Get the table being used to display the set.
|
void |
removeNotify() |
void |
setAccessor(DSetEditor.Accessor<E> accessor)
Sets the logic for how this editor interacts with its underlying data.
|
void |
setData(ComparableArrayList<Comparable<Object>> keys,
Collection<?> data) |
getAccessibleContext, getUI, getUIClassID, setUI, updateUIaddAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, transferFocusUpCyclepublic DSetEditor(DObject setter, String setName, Class<?> entryClass)
setter - The object that contains the set.setName - The name of the set in the object.entryClass - The Class of the DSet.Entry elements contained in the set.public DSetEditor(DObject setter, String setName, Class<?> entryClass, String[] editableFields)
setter - The object that contains the set.setName - The name of the set in the object.entryClass - The Class of the DSet.Entry elements contained in the set.editableFields - the names of the fields in the entryClass that should be editable.public DSetEditor(DObject setter, String setName, Class<?> entryClass, String[] editableFields, ObjectEditorTable.FieldInterpreter interp)
setter - The object that contains the set.setName - The name of the set in the object.entryClass - the Class of the DSet.Entry elements contained in the set.editableFields - The names of the fields in the entryClass that should be editable.interp - The FieldInterpreter to use.public DSetEditor(DObject setter, String setName, Class<?> entryClass, String[] editableFields, ObjectEditorTable.FieldInterpreter interp, String[] displayFields, Predicate<E> entryFilter)
setter - The object that contains the set.setName - The name of the set in the object.entryClass - The Class of the DSet.Entry elements contained in the set.editableFields - The names of the fields in the entryClass that should be editable.interp - The FieldInterpreter to use.displayFields - The fields to display, or null for all.entryFilter - The Predicate to use.public void setAccessor(DSetEditor.Accessor<E> accessor)
public JTable getTable()
public DSet.Entry getSelectedEntry()
public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void addNotify()
addNotify in class JComponentpublic void removeNotify()
removeNotify in class JComponentpublic void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListenerpublic void setData(ComparableArrayList<Comparable<Object>> keys, Collection<?> data)
public String getSetName()
Copyright © 2015. All rights reserved.