Search this API

y.option
Class ArrowCellRenderer

java.lang.Object
  extended by y.option.ArrowCellRenderer
All Implemented Interfaces:
javax.swing.ListCellRenderer, javax.swing.table.TableCellRenderer

public class ArrowCellRenderer
extends java.lang.Object
implements javax.swing.ListCellRenderer, javax.swing.table.TableCellRenderer

ListCellRenderer and TableCellRenderer implementation that renders objects of type Arrow nicely.

 
Your browser does not support SVG content.

Constructor Summary
ArrowCellRenderer()
          Creates a new ArrowCellRenderer.
 
Method Summary
 java.awt.Component getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean hasFocus)
          Returns a component that has been configured to display the specified value.
 java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
          Returns a component that has been configured to display the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrowCellRenderer

public ArrowCellRenderer()
Creates a new ArrowCellRenderer.

Method Detail

getListCellRendererComponent

public java.awt.Component getListCellRendererComponent(javax.swing.JList list,
                                                       java.lang.Object value,
                                                       int index,
                                                       boolean isSelected,
                                                       boolean hasFocus)
Returns a component that has been configured to display the specified value. If value is not of type Arrow, the component may display nothing at all.

Specified by:
getListCellRendererComponent in interface javax.swing.ListCellRenderer
Parameters:
list - the JList that is asking the renderer to draw
value - the value to be rendered
index - the cells index
isSelected - true if the specified cell was selected
hasFocus - true if the specified cell has the focus
Returns:
A component whose paint() method will render values of type Arrow.

getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                        java.lang.Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Returns a component that has been configured to display the specified value. If value is not of type Arrow, the component may display nothing at all.

Specified by:
getTableCellRendererComponent in interface javax.swing.table.TableCellRenderer
Parameters:
table - the JTable that is asking the renderer to draw; can be null
value - the value to be rendered
isSelected - true if the specified cell was selected
hasFocus - true if the specified cell has the focus
row - the row index of the cell being drawn
column - the column index of the cell being drawn
Returns:
A component whose paint() method will render values of type Arrow.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.