|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.ugent.caagt.swirl.tables.TableColumnButton
public class TableColumnButton
Table column decoration that behaves like a button. Clients may
register action listeners with a prototype button which will then
fire for every clone made. The action listener can distinguish between
clones by the value returned by getColumnIndex()
.
Constructor Summary | |
---|---|
TableColumnButton(javax.swing.Icon icon,
javax.swing.Icon iconRollover,
javax.swing.Icon iconSelected)
Create a button with given icons. |
Method Summary | |
---|---|
void |
addActionListener(java.awt.event.ActionListener l)
Adds an ActionListener to the button. |
TableColumnButton |
copy()
Makes a copy of this object. |
static TableColumnButton |
createCloseButton()
Return a button with the look and feel of a 'close' button. |
protected void |
fireActionPerformed()
|
java.lang.String |
getActionCommand()
Return the action command for this button. |
int |
getColumnIndex()
Return the column index for this button. |
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 |
removeActionListener(java.awt.event.ActionListener l)
Removes an ActionListener from the button and all its clones. |
void |
setActionCommand(java.lang.String actionCommand)
Set the action command for this button. |
void |
setColumnIndex(int columnIndex)
Called to indicate that this decoration has been associated with the given table column. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableColumnButton(javax.swing.Icon icon, javax.swing.Icon iconRollover, javax.swing.Icon iconSelected)
Method Detail |
---|
public TableColumnButton copy()
TableColumnDecoration
(MyDecoration)super.clone()
where MyDecoration
is a class that implements this interface, surrounded by a try-catch
clause which caches the CloneNotSupportedException
.
copy
in interface TableColumnDecoration
public java.lang.String getActionCommand()
public void setActionCommand(java.lang.String actionCommand)
public static TableColumnButton createCloseButton()
public int getDecorationHeight()
TableColumnDecoration
getDecorationHeight
in interface TableColumnDecoration
public int getDecorationWidth()
TableColumnDecoration
getDecorationWidth
in interface TableColumnDecoration
public void paintDecoration(java.awt.Component c, java.awt.Graphics g, int x, int y)
TableColumnDecoration
paintDecoration
in interface TableColumnDecoration
public void mouseReleased()
TableColumnDecoration
mouseReleased
in interface TableColumnDecoration
public void mousePressed()
TableColumnDecoration
mousePressed
in interface TableColumnDecoration
public void mouseExited()
TableColumnDecoration
mouseExited
in interface TableColumnDecoration
public void mouseEntered()
TableColumnDecoration
mouseEntered
in interface TableColumnDecoration
public void setColumnIndex(int columnIndex)
TableColumnDecoration
setColumnIndex
in interface TableColumnDecoration
columnIndex
- Column index in the data model.public int getColumnIndex()
public java.lang.String toString()
toString
in class java.lang.Object
public void addActionListener(java.awt.event.ActionListener l)
ActionListener
to the button. Action listeners
are shared by all clones.
public void removeActionListener(java.awt.event.ActionListener l)
ActionListener
from the button and all its clones.
protected void fireActionPerformed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |