com.silvermindsoftware.hitch.binding.components
Class TableBinding

java.lang.Object
  extended by com.silvermindsoftware.hitch.binding.AbstractBindingCreator<JTable>
      extended by com.silvermindsoftware.hitch.binding.components.TableBinding
All Implemented Interfaces:
BindingCreator<JTable>

public class TableBinding
extends AbstractBindingCreator<JTable>

This class creates bindings for tables.

Author:
Stefan Wismer (SWI)
File-location:
TableBinding
Last check-in date:
2009-08-04 15:48:31 +0200 (Di, 04. Aug 2009) by swismer for revision 3884

Field Summary
protected  Class<?>[] m_columnClasses
          The value classes for each column.
protected  boolean[] m_columnEditable
          Is column editable?
protected  String[] m_columnLabels
          The column labels.
protected  String[] m_propertyNames
          Which property to show in the table.
 
Fields inherited from class com.silvermindsoftware.hitch.binding.AbstractBindingCreator
m_updateStrategy
 
Constructor Summary
TableBinding(String[] propertyNames, String[] columnLabels)
           
TableBinding(String[] propertyNames, String[] columnLabels, Class<?>[] columnClasses)
           
TableBinding(String[] propertyNames, String[] columnLabels, Class<?>[] columnClasses, boolean[] columnEditable)
           
 
Method Summary
 void addValidation(JTable formComponent)
          Add validation capability.
 org.jdesktop.beansbinding.AutoBinding createBinding(Object object, JTable formComponent)
          Create the concrete binding.
 
Methods inherited from class com.silvermindsoftware.hitch.binding.AbstractBindingCreator
getUpdateStrategy, setUpdateStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_propertyNames

protected String[] m_propertyNames
Which property to show in the table.


m_columnLabels

protected String[] m_columnLabels
The column labels.


m_columnClasses

protected Class<?>[] m_columnClasses
The value classes for each column.


m_columnEditable

protected boolean[] m_columnEditable
Is column editable?

Constructor Detail

TableBinding

public TableBinding(String[] propertyNames,
                    String[] columnLabels)
Parameters:
propertyNames - which property to show in the table
columnLabels - the column labels

TableBinding

public TableBinding(String[] propertyNames,
                    String[] columnLabels,
                    Class<?>[] columnClasses)
Parameters:
propertyNames - which property to show in the table
columnLabels - the column labels
columnClasses - the value classes for each column

TableBinding

public TableBinding(String[] propertyNames,
                    String[] columnLabels,
                    Class<?>[] columnClasses,
                    boolean[] columnEditable)
Parameters:
propertyNames - which property to show in the table
columnLabels - the column labels
columnClasses - the value classes for each column
columnEditable - which properties are editable
Method Detail

createBinding

public org.jdesktop.beansbinding.AutoBinding createBinding(Object object,
                                                           JTable formComponent)
Create the concrete binding.

Parameters:
object - the object to bind
formComponent - the widget to bound to
Returns:
the corresponding binding

addValidation

public void addValidation(JTable formComponent)
Add validation capability.

Parameters:
formComponent - the widget showing the values


Copyright © 2005-2011 ELCA. All Rights Reserved.