com.google.code.validationframework.swing.resulthandler
Class AbstractCellIconFeedback<RHI>

java.lang.Object
  extended by com.google.code.validationframework.swing.resulthandler.AbstractIconFeedback<RHI>
      extended by com.google.code.validationframework.swing.resulthandler.AbstractCellIconFeedback<RHI>
Type Parameters:
RHI - Type of result handler input.
All Implemented Interfaces:
com.google.code.validationframework.api.common.Disposable, com.google.code.validationframework.api.resulthandler.ResultHandler<RHI>
Direct Known Subclasses:
CellIconBooleanFeedback

public abstract class AbstractCellIconFeedback<RHI>
extends AbstractIconFeedback<RHI>

Abstract implementation of a result handler using an IconComponentDecoration to show feedback to the user on a table cell.

Concrete classes only need to implement the ResultHandler.handleResult(Object) method by calling the AbstractIconFeedback.showIcon() and AbstractIconFeedback.hideIcon() methods according to the result.

See Also:
AbstractIconFeedback

Constructor Summary
AbstractCellIconFeedback(JTable table, int modelRowIndex, int modelColumnIndex)
          Constructor specifying the table and the cell to be decorated.
 
Method Summary
 void attach(JComponent decoratedComponent, AnchorLink anchorLinkWithOwner)
           
 void detach()
           
 AnchorLink getAnchorLink()
          Gets the anchor link between the cell and its decoration.
 int getCellColumnIndex()
          Gets the column model index of the decorated cell.
 int getCellRowIndex()
          Gets the row model index of the decorated cell.
 void setAnchorLink(AnchorLink anchorLinkWithTableCell)
          Sets the anchor link between the cell and its decoration.
 void setCellColumnIndex(int cellModelColumnIndex)
          Sets the column model index of the cell to be decorated.
 void setCellRowIndex(int cellModelRowIndex)
          Sets the row model index of the cell to be decorated.
 
Methods inherited from class com.google.code.validationframework.swing.resulthandler.AbstractIconFeedback
attach, dispose, getClippingAncestor, getDecoratedComponent, getIcon, getToolTipText, hideIcon, setClippingAncestor, setIcon, setToolTipText, showIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.code.validationframework.api.resulthandler.ResultHandler
handleResult
 

Constructor Detail

AbstractCellIconFeedback

public AbstractCellIconFeedback(JTable table,
                                int modelRowIndex,
                                int modelColumnIndex)
Constructor specifying the table and the cell to be decorated.

Parameters:
table - Table containing the cell to be decorated.
modelRowIndex - Model row index of the cell to be decorated.
modelColumnIndex - Model column index of the cell to be decorated.
Method Detail

attach

public void attach(JComponent decoratedComponent,
                   AnchorLink anchorLinkWithOwner)
Overrides:
attach in class AbstractIconFeedback<RHI>
See Also:
AbstractIconFeedback.detach()

detach

public void detach()
Overrides:
detach in class AbstractIconFeedback<RHI>
See Also:
AbstractIconFeedback.detach()

getCellRowIndex

public int getCellRowIndex()
Gets the row model index of the decorated cell.

Returns:
Row model index of the decorated cell.

setCellRowIndex

public void setCellRowIndex(int cellModelRowIndex)
Sets the row model index of the cell to be decorated.

Parameters:
cellModelRowIndex - Row model index of the cell to be decorated.

getCellColumnIndex

public int getCellColumnIndex()
Gets the column model index of the decorated cell.

Returns:
Column model index of the decorated cell.

setCellColumnIndex

public void setCellColumnIndex(int cellModelColumnIndex)
Sets the column model index of the cell to be decorated.

Parameters:
cellModelColumnIndex - Column model index of the cell to be decorated.

getAnchorLink

public AnchorLink getAnchorLink()
Gets the anchor link between the cell and its decoration.

Overrides:
getAnchorLink in class AbstractIconFeedback<RHI>
Returns:
Anchor link between the cell and its decoration.
See Also:
AbstractComponentDecoration.getAnchorLink()

setAnchorLink

public void setAnchorLink(AnchorLink anchorLinkWithTableCell)
Sets the anchor link between the cell and its decoration.

Overrides:
setAnchorLink in class AbstractIconFeedback<RHI>
Parameters:
anchorLinkWithTableCell - Anchor link between the cell and its decoration.
See Also:
AbstractComponentDecoration.setAnchorLink(AnchorLink)


Copyright © 2013. All Rights Reserved.