Package groovy.swing.impl
Class ClosureRenderer
java.lang.Object
groovy.swing.impl.ClosureRenderer
- All Implemented Interfaces:
ListCellRenderer
,TableCellRenderer
,TreeCellRenderer
public class ClosureRenderer extends Object implements ListCellRenderer, TableCellRenderer, TreeCellRenderer
-
Constructor Summary
Constructors Constructor Description ClosureRenderer()
ClosureRenderer(Closure c)
-
Method Summary
Modifier and Type Method Description List
getChildren()
int
getColumn()
JList
getList()
Component
getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
int
getRow()
JTable
getTable()
Component
getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
JTree
getTree()
Component
getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
Closure
getUpdate()
Object
getValue()
boolean
isDefaultRenderer()
boolean
isExpanded()
boolean
isFocused()
boolean
isLeaf()
boolean
isSelected()
boolean
isTableHeader()
void
setTableHeader(boolean tableHeader)
void
setUpdate(Closure update)
-
Constructor Details
-
ClosureRenderer
public ClosureRenderer() -
ClosureRenderer
-
-
Method Details
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)- Specified by:
getListCellRendererComponent
in interfaceListCellRenderer
-
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)- Specified by:
getTableCellRendererComponent
in interfaceTableCellRenderer
-
getTreeCellRendererComponent
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)- Specified by:
getTreeCellRendererComponent
in interfaceTreeCellRenderer
-
getUpdate
-
setUpdate
-
setTableHeader
public void setTableHeader(boolean tableHeader) -
isTableHeader
public boolean isTableHeader() -
getChildren
-
getList
-
getTable
-
getValue
-
isSelected
public boolean isSelected() -
isFocused
public boolean isFocused() -
getRow
public int getRow() -
getColumn
public int getColumn() -
getTree
-
isLeaf
public boolean isLeaf() -
isExpanded
public boolean isExpanded() -
isDefaultRenderer
public boolean isDefaultRenderer()
-