Class JTableHpr<T extends javax.swing.JTable>
- java.lang.Object
- 
- com.inductiveautomation.snap.ui.UIHelper<T>
- 
- com.inductiveautomation.snap.swing.SwingHelper<T>
- 
- com.inductiveautomation.snap.swing.helpers.JComponentHpr<T>
- 
- com.inductiveautomation.snap.swing.helpers.JTableHpr<T>
 
 
 
 
- 
 public class JTableHpr<T extends javax.swing.JTable> extends JComponentHpr<T> A Helper subclass for JTable.
- 
- 
Constructor SummaryConstructors Constructor Description JTableHpr()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.table.TableColumnaddColumn(javax.swing.JTable aTable, java.lang.String aHeader, java.lang.String aBindKey, int anIndex, int aWidth)Adds a column for header, bind key, width.voidaddColumns(javax.swing.JTable aTable, java.util.List<java.lang.String> theKeys)Adds columns for a list of keys.intgetChildCount(T anObj)Override to suppress children.java.util.ListgetItems(T aTable)Returns the items for an object.java.lang.StringgetPropertyNameMapped(T anObj, java.lang.String aName)Returns a mapped property name.protected java.util.List<java.lang.String>getPropertyNamesImpl(T anObj)Returns the property names for given object.intgetSelectedIndex(T aTable)Returns the selected index property of given object.java.lang.ObjectgetSelectedItem(T aTable)Returns the selected object property of given object.voidinitUI(T aTable, UIOwner anOwner)Initializes newly created object.booleanisValueAdjusting(T aTable)Returns whether table value is adjusting.voidremoveColumns(javax.swing.JTable aTable)Removes columns.static voidscrollCellToVisible(javax.swing.JTable aTable, int aRow, int aColumn)Scrolls a table so that given row and column are visible.static voidsetColumnWidths(javax.swing.JTable aTable)Sets table column widths to preferred size.voidsetItems(T aTable, java.util.List theItems)Sets the items for an object.voidsetSelectedIndex(T aTable, int anIndex)Sets the selected index property of given object to given value.voidsetSelectedItem(T aTable, java.lang.Object aValue)Sets the selected object property of given object to given value.voidsetValue(T aTable, java.lang.String aPropertyName, java.lang.Object aValue)Sets the selected row index.- 
Methods inherited from class com.inductiveautomation.snap.swing.helpers.JComponentHpraddBinding, createEventAdapter, getAutosizing, getBinding, getBindingCount, getBindings, getChangeListener, getChild, getConstraints, getEventAdapter, getName, getOwner, getParent, getSendActionOnFocusLost, getSendActionOnFocusLostDefault, isEnabled, removeBinding, setConstraints, setEnabled, setOwner, setSendActionOnFocusLost
 - 
Methods inherited from class com.inductiveautomation.snap.swing.SwingHelpergetHelper, getSwingHelper, getSwingHelper
 - 
Methods inherited from class com.inductiveautomation.snap.ui.UIHelperenableEvents, getAction, getBinding, getChild, getItemDisplayKey, getKeyValue, getPropertyNames, getSelectedIndexes, getSelectedIndexs, getText, getValue, initUIDeep, isEnabled, isPropertyName, removeBinding, setAction, setEnabled, setItemDisplayKey, setItems, setKeyValue, setSelectedIndexes, setText
 
- 
 
- 
- 
- 
Method Detail- 
getChildCountpublic int getChildCount(T anObj) Override to suppress children.- Overrides:
- getChildCountin class- JComponentHpr<T extends javax.swing.JTable>
 
 - 
initUIpublic void initUI(T aTable, UIOwner anOwner) Initializes newly created object.- Overrides:
- initUIin class- JComponentHpr<T extends javax.swing.JTable>
 
 - 
addColumnpublic javax.swing.table.TableColumn addColumn(javax.swing.JTable aTable, java.lang.String aHeader, java.lang.String aBindKey, int anIndex, int aWidth)Adds a column for header, bind key, width.
 - 
addColumnspublic void addColumns(javax.swing.JTable aTable, java.util.List<java.lang.String> theKeys)Adds columns for a list of keys.
 - 
removeColumnspublic void removeColumns(javax.swing.JTable aTable) Removes columns.
 - 
scrollCellToVisiblepublic static void scrollCellToVisible(javax.swing.JTable aTable, int aRow, int aColumn)Scrolls a table so that given row and column are visible.
 - 
setColumnWidthspublic static void setColumnWidths(javax.swing.JTable aTable) Sets table column widths to preferred size.
 - 
getPropertyNamesImplprotected java.util.List<java.lang.String> getPropertyNamesImpl(T anObj) Returns the property names for given object.- Overrides:
- getPropertyNamesImplin class- JComponentHpr<T extends javax.swing.JTable>
 
 - 
getPropertyNameMappedpublic java.lang.String getPropertyNameMapped(T anObj, java.lang.String aName) Returns a mapped property name.- Overrides:
- getPropertyNameMappedin class- UIHelper<T extends javax.swing.JTable>
 
 - 
setValuepublic void setValue(T aTable, java.lang.String aPropertyName, java.lang.Object aValue) Sets the selected row index.
 - 
getItemspublic java.util.List getItems(T aTable) Returns the items for an object.
 - 
setItemspublic void setItems(T aTable, java.util.List theItems) Sets the items for an object.
 - 
getSelectedIndexpublic int getSelectedIndex(T aTable) Returns the selected index property of given object.- Overrides:
- getSelectedIndexin class- UIHelper<T extends javax.swing.JTable>
 
 - 
setSelectedIndexpublic void setSelectedIndex(T aTable, int anIndex) Sets the selected index property of given object to given value.- Overrides:
- setSelectedIndexin class- UIHelper<T extends javax.swing.JTable>
 
 - 
getSelectedItempublic java.lang.Object getSelectedItem(T aTable) Returns the selected object property of given object.- Overrides:
- getSelectedItemin class- UIHelper<T extends javax.swing.JTable>
 
 - 
setSelectedItempublic void setSelectedItem(T aTable, java.lang.Object aValue) Sets the selected object property of given object to given value.- Overrides:
- setSelectedItemin class- UIHelper<T extends javax.swing.JTable>
 
 - 
isValueAdjustingpublic boolean isValueAdjusting(T aTable) Returns whether table value is adjusting.- Overrides:
- isValueAdjustingin class- UIHelper<T extends javax.swing.JTable>
 
 
- 
 
-