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.void
addColumns
(JTable aTable, List<String> theKeys) Adds columns for a list of keys.int
getChildCount
(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.int
getSelectedIndex
(T aTable) Returns the selected index property of given object.getSelectedItem
(T aTable) Returns the selected object property of given object.void
Initializes newly created object.boolean
isValueAdjusting
(T aTable) Returns whether table value is adjusting.void
removeColumns
(JTable aTable) Removes columns.static void
scrollCellToVisible
(JTable aTable, int aRow, int aColumn) Scrolls a table so that given row and column are visible.static void
setColumnWidths
(JTable aTable) Sets table column widths to preferred size.void
Sets the items for an object.void
setSelectedIndex
(T aTable, int anIndex) Sets the selected index property of given object to given value.void
setSelectedItem
(T aTable, Object aValue) Sets the selected object property of given object to given value.void
Sets 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, setSendActionOnFocusLost
Methods inherited from class com.inductiveautomation.snap.swing.SwingHelper
getHelper, getSwingHelper, getSwingHelper
Methods 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:
getChildCount
in classJComponentHpr<T extends JTable>
-
initUI
Initializes newly created object.- Overrides:
initUI
in 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:
getPropertyNamesImpl
in classJComponentHpr<T extends JTable>
-
getPropertyNameMapped
Returns a mapped property name.- Overrides:
getPropertyNameMapped
in 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:
getSelectedIndex
in classUIHelper<T extends JTable>
-
setSelectedIndex
Sets the selected index property of given object to given value.- Overrides:
setSelectedIndex
in classUIHelper<T extends JTable>
-
getSelectedItem
Returns the selected object property of given object.- Overrides:
getSelectedItem
in classUIHelper<T extends JTable>
-
setSelectedItem
Sets the selected object property of given object to given value.- Overrides:
setSelectedItem
in classUIHelper<T extends JTable>
-
isValueAdjusting
Returns whether table value is adjusting.- Overrides:
isValueAdjusting
in classUIHelper<T extends JTable>
-