be.ugent.caagt.swirl.tables
Interface TableColumnDecoration

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
TableColumnButton, TableColumnIcon

public interface TableColumnDecoration
extends java.lang.Cloneable

Interface type for table column decorations that can be used with tables of type EnhancedTable.


Method Summary
 TableColumnDecoration copy()
          Makes a copy of this object.
 int getDecorationHeight()
          Return the height of this decoration.
 int getDecorationWidth()
          Return the width of this decoration.
 void mouseEntered()
          Signals that the mouse pointer entered the bounds of this decoration.
 void mouseExited()
          Signals that the mouse pointer exited the bounds of this decoration.
 void mousePressed()
          Signals that the mouse button was pressed inside the bounds of this decoration.
 void mouseReleased()
          Signals that the mouse button was released after being pressed inside the bounds of this decoration.
 void paintDecoration(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Paint this decoration.
 void setColumnIndex(int columnIndex)
          Called to indicate that this decoration has been associated with the given table column.
 

Method Detail

getDecorationHeight

int getDecorationHeight()
Return the height of this decoration. The dimensions of a decoration determine its position on the column header and the bounds in which mouse events are fired.


getDecorationWidth

int getDecorationWidth()
Return the width of this decoration. The dimensions of a decoration determine its position on the column header and the bounds in which mouse events are fired.


paintDecoration

void paintDecoration(java.awt.Component c,
                     java.awt.Graphics g,
                     int x,
                     int y)
Paint this decoration.


mouseEntered

void mouseEntered()
Signals that the mouse pointer entered the bounds of this decoration.


mouseExited

void mouseExited()
Signals that the mouse pointer exited the bounds of this decoration.


mousePressed

void mousePressed()
Signals that the mouse button was pressed inside the bounds of this decoration.


mouseReleased

void mouseReleased()
Signals that the mouse button was released after being pressed inside the bounds of this decoration.


copy

TableColumnDecoration copy()
Makes a copy of this object. This is typically implemented as (MyDecoration)super.clone() where MyDecoration is a class that implements this interface, surrounded by a try-catch clause which caches the CloneNotSupportedException.


setColumnIndex

void setColumnIndex(int columnIndex)
Called to indicate that this decoration has been associated with the given table column.

Parameters:
columnIndex - Column index in the data model.