Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.table.remote
Class RemoteStyle

java.lang.Object
  extended by com.citra.table.remote.RemoteStyle
All Implemented Interfaces:
Style

public class RemoteStyle
extends Object
implements Style

RemoteStyle paints pending cells with a background color. RemoteStyle will be applied if the value of a cell is an instance of PendingValue.


Field Summary
protected  Color pendingBackgroundColor
          the background color for pending cells.
 
Constructor Summary
RemoteStyle()
          Constructs a RemoteStyle with a yellow background color.
RemoteStyle(Color color)
          Constructs a RemoteStyle.
 
Method Summary
 void apply(Component c, JTable table, int row, int column)
          Applies the style to the component c.
 Color getPendingBackgroundColor()
          Returns the pending background color.
 void setPendingBackgroundColor(Color newPendingBackgroundColor)
          Assigns a new pending background color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pendingBackgroundColor

protected Color pendingBackgroundColor
the background color for pending cells.

Constructor Detail

RemoteStyle

public RemoteStyle()
Constructs a RemoteStyle with a yellow background color.


RemoteStyle

public RemoteStyle(Color color)
Constructs a RemoteStyle.

Method Detail

apply

public void apply(Component c,
                  JTable table,
                  int row,
                  int column)
Applies the style to the component c.

Specified by:
apply in interface Style
Parameters:
c - the component that we wish to apply a style to.
table - the associated table
row - the current row of the table
column - the current column of the table

getPendingBackgroundColor

public Color getPendingBackgroundColor()
Returns the pending background color.

Returns:
the pending background color.

setPendingBackgroundColor

public void setPendingBackgroundColor(Color newPendingBackgroundColor)
Assigns a new pending background color.

Parameters:
newPendingBackgroundColor - the new pending background color to assign.

Copyright © 2011 Citra Technologies. All Rights Reserved.