Package org.jmol.awtjs.swing
Class JTable
- java.lang.Object
-
- org.jmol.awtjs.swing.Component
-
- org.jmol.awtjs.swing.Container
-
- org.jmol.awtjs.swing.JComponent
-
- org.jmol.awtjs.swing.JTable
-
- All Implemented Interfaces:
ColumnSelectionModel
,ListSelectionModel
public class JTable extends JComponent implements ListSelectionModel, ColumnSelectionModel
-
-
Field Summary
Fields Modifier and Type Field Description private javajs.util.BS
bsSelectedCells
private javajs.util.BS
bsSelectedRows
(package private) boolean
cellSelectionEnabled
(package private) boolean
rowSelectionAllowed
(package private) java.lang.Object
selectionListener
private AbstractTableModel
tableModel
-
Fields inherited from class org.jmol.awtjs.swing.JComponent
actionCommand, actionListener, autoScrolls
-
Fields inherited from class org.jmol.awtjs.swing.Component
enabled, height, id, minHeight, minWidth, mouseListener, name, parent, renderHeight, renderWidth, text, width
-
-
Constructor Summary
Constructors Constructor Description JTable(AbstractTableModel tableModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListSelectionListener(java.lang.Object listener)
It will be the function of the JavaScript on the page to do with selectionListener what is desired.void
clearSelection()
TableColumn
getColumn(int i)
ColumnSelectionModel
getColumnModel()
ListSelectionModel
getSelectionModel()
void
setCellSelectionEnabled(boolean enabled)
void
setPreferredScrollableViewportSize(Dimension dimension)
void
setRowSelectionAllowed(boolean b)
void
setRowSelectionInterval(int i, int j)
java.lang.String
toHTML()
-
Methods inherited from class org.jmol.awtjs.swing.JComponent
addActionListener, getActionCommand, setActionCommand, setAutoscrolls
-
Methods inherited from class org.jmol.awtjs.swing.Container
add, addComponent, getComponent, getComponentCount, getComponents, getSubcomponentHeight, getSubcomponentWidth, insertComponent, remove, removeAll
-
Methods inherited from class org.jmol.awtjs.swing.Component
addMouseListener, getCSSstyle, getHeight, getName, getParent, getText, getWidth, isEnabled, isVisible, newID, repaint, setBackground, setEnabled, setMinimumSize, setName, setParent, setPreferredSize, setText, setVisible
-
-
-
-
Field Detail
-
tableModel
private AbstractTableModel tableModel
-
bsSelectedCells
private javajs.util.BS bsSelectedCells
-
bsSelectedRows
private javajs.util.BS bsSelectedRows
-
rowSelectionAllowed
boolean rowSelectionAllowed
-
cellSelectionEnabled
boolean cellSelectionEnabled
-
selectionListener
java.lang.Object selectionListener
-
-
Constructor Detail
-
JTable
public JTable(AbstractTableModel tableModel)
-
-
Method Detail
-
getSelectionModel
public ListSelectionModel getSelectionModel()
- Specified by:
getSelectionModel
in interfaceColumnSelectionModel
-
getColumnModel
public ColumnSelectionModel getColumnModel()
-
setPreferredScrollableViewportSize
public void setPreferredScrollableViewportSize(Dimension dimension)
-
clearSelection
public void clearSelection()
-
setRowSelectionAllowed
public void setRowSelectionAllowed(boolean b)
-
setRowSelectionInterval
public void setRowSelectionInterval(int i, int j)
-
setCellSelectionEnabled
public void setCellSelectionEnabled(boolean enabled)
-
addListSelectionListener
public void addListSelectionListener(java.lang.Object listener)
It will be the function of the JavaScript on the page to do with selectionListener what is desired.- Specified by:
addListSelectionListener
in interfaceListSelectionModel
- Parameters:
listener
-
-
getColumn
public TableColumn getColumn(int i)
- Specified by:
getColumn
in interfaceColumnSelectionModel
-
-