Package org.apache.pivot.wtk.content
Class TableViewRowEditor
- java.lang.Object
-
- org.apache.pivot.wtk.Component
-
- org.apache.pivot.wtk.Container
-
- org.apache.pivot.wtk.Window
-
- org.apache.pivot.wtk.content.TableViewRowEditor
-
- All Implemented Interfaces:
java.lang.Iterable<Component>,Sequence<Component>,ConstrainedVisual,TableView.RowEditor,Visual
public class TableViewRowEditor extends Window implements TableView.RowEditor
Default table view row editor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Window
Window.ActionMapping, Window.ActionMappingSequence, Window.IconImageSequence, Window.Skin
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Container
Container.EDTChecker
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
-
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
-
-
Constructor Summary
Constructors Constructor Description TableViewRowEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginEdit(TableView tableViewArgument, int rowIndexArgument, int columnIndexArgument)Called to begin editing a table row.voidclose()Closes the window and all of its owned windows.voidendEdit(boolean result)Terminates an edit operation.Dictionary<java.lang.String,Component>getCellEditors()Gets this row editor's cell editor dictionary.CardPaneSkin.SelectionChangeEffectgetEditEffect()Returns the effect that is applied when the editor opens or closes.intgetEditEffectDuration()Returns the edit effect duration.intgetEditEffectRate()Returns the edit effect rate.intgetRowIndex()TableViewgetTableView()booleanisEditing()booleankeyPressed(int keyCode, Keyboard.KeyLocation keyLocation)voidopen(Display display, Window owner)Opens the window.voidsetEditEffect(CardPaneSkin.SelectionChangeEffect editEffect)Sets the effect that is applied when the editor opens or closes.voidsetEditEffectDuration(int effectDuration)Sets the edit effect duration.voidsetEditEffectRate(int effectRate)Sets the edit effect rate.-
Methods inherited from class org.apache.pivot.wtk.Window
align, align, clearActive, clearFocusDescendant, descendantGainedFocus, descendantRemoved, getActionMappings, getActiveWindow, getClientArea, getContent, getFocusDescendant, getIcons, getOwnedWindow, getOwnedWindowCount, getOwner, getRootOwner, getTitle, getWindowActionMappingListeners, getWindowClassListeners, getWindowListeners, getWindowStateListeners, isActive, isBottomMost, isClosed, isClosing, isMaximized, isOpen, isOpening, isOwner, isTopMost, moveToBack, moveToFront, open, open, remove, requestActive, setActive, setContent, setEnabled, setIcon, setIcon, setMaximized, setParent, setTitle, setVisible
-
Methods inherited from class org.apache.pivot.wtk.Container
add, assertEventDispatchThread, assertEventDispatchThread, clear, containsFocus, descendantAdded, descendantLostFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getGraphics, getLength, getNamedComponent, indexOf, insert, invalidate, isAncestor, isDoubleBuffered, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, repaint, requestFocus, setDoubleBuffered, setEventDispatchThreadChecker, setFocusTraversalPolicy, store, transferFocus, update
-
Methods inherited from class org.apache.pivot.wtk.Component
checkSkin, clearFocus, contains, copyStyle, copyStyle, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyReleased, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, offsetToScreen, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setAutomationID, setCursor, setDragSource, setDropTarget, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
-
-
-
-
Method Detail
-
getTableView
public TableView getTableView()
-
getRowIndex
public int getRowIndex()
-
getCellEditors
public Dictionary<java.lang.String,Component> getCellEditors()
Gets this row editor's cell editor dictionary. The caller may specify explicit editor components and place them in this dictionary by their table view column names. Any column that does not have an entry in this dictionary will have aTextInputimplicitly associated with it during editing.This row editor uses data binding to populate the cell editor components and to get the data back out of those components, so it is the caller's responsibility to set up the data binding keys in each component they specify in this dictionary. The data binding key should equal the column name that the cell editor serves.
- Returns:
- The cell editor dictionary.
-
beginEdit
public void beginEdit(TableView tableViewArgument, int rowIndexArgument, int columnIndexArgument)
Description copied from interface:TableView.RowEditorCalled to begin editing a table row.- Specified by:
beginEditin interfaceTableView.RowEditor- Parameters:
tableViewArgument- The table view being edited.rowIndexArgument- Index of the row to edit.columnIndexArgument- Index of the column to edit.
-
endEdit
public void endEdit(boolean result)
Description copied from interface:TableView.RowEditorTerminates an edit operation.- Specified by:
endEditin interfaceTableView.RowEditor- Parameters:
result-trueto perform the edit;falseto cancel it.
-
isEditing
public boolean isEditing()
- Specified by:
isEditingin interfaceTableView.RowEditor- Returns:
- Whether an edit is currently in progress.
-
getEditEffect
public CardPaneSkin.SelectionChangeEffect getEditEffect()
Returns the effect that is applied when the editor opens or closes.- Returns:
- The edit effect, or
nullfor no effect.
-
setEditEffect
public void setEditEffect(CardPaneSkin.SelectionChangeEffect editEffect)
Sets the effect that is applied when the editor opens or closes.- Parameters:
editEffect- The edit effect, ornullfor no effect.
-
getEditEffectDuration
public int getEditEffectDuration()
Returns the edit effect duration.- Returns:
- The effect duration in milliseconds.
-
setEditEffectDuration
public void setEditEffectDuration(int effectDuration)
Sets the edit effect duration.- Parameters:
effectDuration- The effect duration in milliseconds.
-
getEditEffectRate
public int getEditEffectRate()
Returns the edit effect rate.- Returns:
- The effect rate.
-
setEditEffectRate
public void setEditEffectRate(int effectRate)
Sets the edit effect rate.- Parameters:
effectRate- The effect rate.
-
open
public void open(Display display, Window owner)
Description copied from class:WindowOpens the window.Note that this method is not a synchronous call, it schedules an event to open the window.
-
close
public void close()
Description copied from class:WindowCloses the window and all of its owned windows. If any owned window fails to close, this window will also fail to close.
-
keyPressed
public boolean keyPressed(int keyCode, Keyboard.KeyLocation keyLocation)- Overrides:
keyPressedin classWindow
-
-