Class JTableHpr<T extends 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>
A Helper subclass for JTable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a column for header, bind key, width.voidaddColumns(JTable aTable, List<String> theKeys) Adds columns for a list of keys.intgetChildCount(T anObj) Override to suppress children.Returns the items for an object.getPropertyNameMapped(T anObj, String aName) Returns a mapped property name.getPropertyNamesImpl(T anObj) Returns the property names for given object.intgetSelectedIndex(T aTable) Returns the selected index property of given object.getSelectedItem(T aTable) Returns the selected object property of given object.voidInitializes newly created object.booleanisValueAdjusting(T aTable) Returns whether table value is adjusting.voidremoveColumns(JTable aTable) Removes columns.static voidscrollCellToVisible(JTable aTable, int aRow, int aColumn) Scrolls a table so that given row and column are visible.static voidsetColumnWidths(JTable aTable) Sets table column widths to preferred size.voidSets the items for an object.voidsetSelectedIndex(T aTable, int anIndex) Sets the selected index property of given object to given value.voidsetSelectedItem(T aTable, Object aValue) Sets the selected object property of given object to given value.voidSets the selected row index.Methods inherited from class com.inductiveautomation.snap.swing.helpers.JComponentHpr
addBinding, createEventAdapter, getAutosizing, getBinding, getBindingCount, getBindings, getChangeListener, getChild, getConstraints, getEventAdapter, getName, getOwner, getParent, getSendActionOnFocusLost, getSendActionOnFocusLostDefault, isEnabled, removeBinding, setConstraints, setEnabled, setOwner, setSendActionOnFocusLostMethods inherited from class com.inductiveautomation.snap.swing.SwingHelper
getHelper, getSwingHelper, getSwingHelperMethods inherited from class com.inductiveautomation.snap.ui.UIHelper
enableEvents, getAction, getBinding, getChild, getItemDisplayKey, getKeyValue, getPropertyNames, getSelectedIndexes, getSelectedIndexs, getText, getValue, initUIDeep, isEnabled, isPropertyName, removeBinding, setAction, setEnabled, setItemDisplayKey, setItems, setKeyValue, setSelectedIndexes, setText
-
Constructor Details
-
JTableHpr
public JTableHpr()
-
-
Method Details
-
getChildCount
Override to suppress children.- Overrides:
getChildCountin classJComponentHpr<T extends JTable>
-
initUI
Initializes newly created object.- Overrides:
initUIin classJComponentHpr<T extends JTable>
-
addColumn
public TableColumn addColumn(JTable aTable, String aHeader, String aBindKey, int anIndex, int aWidth) Adds a column for header, bind key, width. -
addColumns
Adds columns for a list of keys. -
removeColumns
Removes columns. -
scrollCellToVisible
Scrolls a table so that given row and column are visible. -
setColumnWidths
Sets table column widths to preferred size. -
getPropertyNamesImpl
Returns the property names for given object.- Overrides:
getPropertyNamesImplin classJComponentHpr<T extends JTable>
-
getPropertyNameMapped
Returns a mapped property name.- Overrides:
getPropertyNameMappedin classUIHelper<T extends JTable>
-
setValue
Sets the selected row index. -
getItems
Returns the items for an object. -
setItems
Sets the items for an object. -
getSelectedIndex
Returns the selected index property of given object.- Overrides:
getSelectedIndexin classUIHelper<T extends JTable>
-
setSelectedIndex
Sets the selected index property of given object to given value.- Overrides:
setSelectedIndexin classUIHelper<T extends JTable>
-
getSelectedItem
Returns the selected object property of given object.- Overrides:
getSelectedItemin classUIHelper<T extends JTable>
-
setSelectedItem
Sets the selected object property of given object to given value.- Overrides:
setSelectedItemin classUIHelper<T extends JTable>
-
isValueAdjusting
Returns whether table value is adjusting.- Overrides:
isValueAdjustingin classUIHelper<T extends JTable>
-