Top Fields Constructors Methods
org.freedesktop.dbus.viewer

pack-priv Class DBusTableModel

extends AbstractTableModel
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.util.ArrayList, .List, javax.swing.table.AbstractTableModel

Field Summary

Modifier and TypeField and Description
private final String[]
private final List<DBusEntry>
private static final String
private static final String
private static final String
private static final String
private static final String
Inherited from javax.swing.table.AbstractTableModel:
listenerList

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(DBusEntry
The dbus entry to add
_entry
)

Add a row to the table model

public Class<?>
getColumnClass(int
the column being queried
_columnIndex
)

Overrides javax.swing.table.AbstractTableModel.getColumnClass.

Implements javax.swing.table.TableModel.getColumnClass.

Returns Object.class regardless of columnIndex.

public int
getColumnCount()

Implements javax.swing.table.TableModel.getColumnCount.

Returns the number of columns in the model.

public String
getColumnName(int
the column being queried
_column
)

Overrides javax.swing.table.AbstractTableModel.getColumnName.

Implements javax.swing.table.TableModel.getColumnName.

Returns a default name for the column using spreadsheet conventions: A, B, C, ...

public DBusEntry

Returns:

The table row
getEntry
(int
The row index
_row
)

Get a row of the table

public int
getRowCount()

Implements javax.swing.table.TableModel.getRowCount.

Returns the number of rows in the model.

public Object
getValueAt(int
the row whose value is to be queried
_rowIndex
,
int
the column whose value is to be queried
_columnIndex
)

Implements javax.swing.table.TableModel.getValueAt.

Returns the value for the cell at columnIndex and rowIndex.

Inherited from javax.swing.table.AbstractTableModel:
addTableModelListenerfindColumnfireTableCellUpdatedfireTableChangedfireTableDataChangedfireTableRowsDeletedfireTableRowsInsertedfireTableRowsUpdatedfireTableStructureChangedgetListenersgetTableModelListenersisCellEditableremoveTableModelListenersetValueAt

Field Detail

columnsback to summary
private final String[] columns
entriesback to summary
private final List<DBusEntry> entries
INTROSPECTABLEback to summary
private static final String INTROSPECTABLE
NAMEback to summary
private static final String NAME
OWNERback to summary
private static final String OWNER
PATHback to summary
private static final String PATH
USERback to summary
private static final String USER

Constructor Detail

DBusTableModelback to summary
pack-priv DBusTableModel()

Method Detail

addback to summary
public void add(DBusEntry _entry)

Add a row to the table model

Parameters
_entry:DBusEntry

The dbus entry to add

getColumnClassback to summary
public Class<?> getColumnClass(int _columnIndex)

Overrides javax.swing.table.AbstractTableModel.getColumnClass.

Implements javax.swing.table.TableModel.getColumnClass.

Doc from javax.swing.table.AbstractTableModel.getColumnClass.

Returns Object.class regardless of columnIndex.

Parameters
_columnIndex:int

the column being queried

Returns:Class<?>

the Object.class

Annotations
@Override
getColumnCountback to summary
public int getColumnCount()

Implements javax.swing.table.TableModel.getColumnCount.

Doc from javax.swing.table.TableModel.getColumnCount.

Returns the number of columns in the model. A JTable uses this method to determine how many columns it should create and display by default.

Returns:int

the number of columns in the model

Annotations
@Override
getColumnNameback to summary
public String getColumnName(int _column)

Overrides javax.swing.table.AbstractTableModel.getColumnName.

Implements javax.swing.table.TableModel.getColumnName.

Doc from javax.swing.table.AbstractTableModel.getColumnName.

Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.

Parameters
_column:int

the column being queried

Returns:String

a string containing the default name of column

Annotations
@Override
getEntryback to summary
public DBusEntry getEntry(int _row)

Get a row of the table

Parameters
_row:int

The row index

Returns:DBusEntry

The table row

getRowCountback to summary
public int getRowCount()

Implements javax.swing.table.TableModel.getRowCount.

Doc from javax.swing.table.TableModel.getRowCount.

Returns the number of rows in the model. A JTable uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.

Returns:int

the number of rows in the model

Annotations
@Override
getValueAtback to summary
public Object getValueAt(int _rowIndex, int _columnIndex)

Implements javax.swing.table.TableModel.getValueAt.

Doc from javax.swing.table.TableModel.getValueAt.

Returns the value for the cell at columnIndex and rowIndex.

Parameters
_rowIndex:int

the row whose value is to be queried

_columnIndex:int

the column whose value is to be queried

Returns:Object

the value Object at the specified cell

Annotations
@Override