org.apache.pivot.wtk.content
Class TableViewRowEditor

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Container
          extended by org.apache.pivot.wtk.Window
              extended by org.apache.pivot.wtk.content.TableViewRowEditor
All Implemented Interfaces:
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.EDT_Checker
 
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
TableViewRowEditor()
           
 
Method Summary
 void beginEdit(TableView tableViewArgument, int rowIndexArgument, int columnIndexArgument)
          Called to begin editing a table row.
 void close()
          Closes the window and all of its owned windows.
 void endEdit(boolean result)
          Terminates an edit operation.
 Dictionary<String,Component> getCellEditors()
          Gets this row editor's cell editor dictionary.
 CardPaneSkin.SelectionChangeEffect getEditEffect()
          Returns the effect that is applied when the editor opens or closes.
 int getEditEffectDuration()
          Returns the edit effect duration.
 int getEditEffectRate()
          Returns the edit effect rate.
 int getRowIndex()
           
 TableView getTableView()
           
 boolean isEditing()
          Tests whether an edit is currently in progress.
 boolean keyPressed(int keyCode, Keyboard.KeyLocation keyLocation)
           
 void open(Display display, Window owner)
          Opens the window.
 void setEditEffect(CardPaneSkin.SelectionChangeEffect editEffect)
          Sets the effect that is applied when the editor opens or closes.
 void setEditEffectDuration(int effectDuration)
          Sets the edit effect duration.
 void setEditEffectRate(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
clearFocus, contains, 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, getSize, getSkin, getStyles, 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, reenterMouse, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableViewRowEditor

public TableViewRowEditor()
Method Detail

getTableView

public TableView getTableView()

getRowIndex

public int getRowIndex()

getCellEditors

public Dictionary<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 a TextInput implicitly 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.RowEditor
Called to begin editing a table row.

Specified by:
beginEdit in interface TableView.RowEditor

endEdit

public void endEdit(boolean result)
Description copied from interface: TableView.RowEditor
Terminates an edit operation.

Specified by:
endEdit in interface TableView.RowEditor
Parameters:
result - true to perform the edit; false to cancel it.

isEditing

public boolean isEditing()
Description copied from interface: TableView.RowEditor
Tests whether an edit is currently in progress.

Specified by:
isEditing in interface TableView.RowEditor

getEditEffect

public CardPaneSkin.SelectionChangeEffect getEditEffect()
Returns the effect that is applied when the editor opens or closes.

Returns:
The edit effect, or null for 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, or null for 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: Window
Opens the window.

Note that this method is not a synchronous call, it schedules an event to open the window.

Overrides:
open in class Window
Parameters:
display - The display on which the window will be opened.
owner - The window's owner, or null if the window has no owner.

close

public void close()
Description copied from class: Window
Closes the window and all of its owned windows. If any owned window fails to close, this window will also fail to close.

Overrides:
close in class Window

keyPressed

public boolean keyPressed(int keyCode,
                          Keyboard.KeyLocation keyLocation)
Overrides:
keyPressed in class Window