org.rimudb.editor
Class URLDefaultTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.rimudb.editor.swing.ATableModel
          extended by org.rimudb.editor.URLDefaultTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class URLDefaultTableModel
extends ATableModel

Author:
Simon Ritchie
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
URLDefaultTableModel()
           
 
Method Summary
 void addElement(org.rimudb.editor.URLDefaultEntry defaultEntry)
          Add a URLDefaultEntry to the model.
 boolean containsJDBCDriver(java.lang.String jdbcDriver)
          Returns true if the jdbcDriver is in the list of defined drivers.
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 int getColumnWidthPercent(int col)
          Return the width of a given column as a percent of the entire width.
 java.util.Map<java.lang.String,java.lang.String> getDefaultMap()
          Return the map of jdbcDrivers and default URLs.
 java.lang.String getDefaultURL(java.lang.String jdbcDriver)
          Return the default URL for a jdbcDriver.
 org.rimudb.editor.URLDefaultEntry getElement(int rowIndex)
          Return the element at rowIndex.
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 void remove(int row)
          Remove the row from the TableModel.
 void updateElement(int selectedRow, org.rimudb.editor.URLDefaultEntry updatedEntry)
          Update the row with a new URLDefaultEntry
 
Methods inherited from class org.rimudb.editor.swing.ATableModel
getColumnFixedWidth
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLDefaultTableModel

public URLDefaultTableModel()
Method Detail

getColumnWidthPercent

public int getColumnWidthPercent(int col)
Description copied from class: ATableModel
Return the width of a given column as a percent of the entire width.

Specified by:
getColumnWidthPercent in class ATableModel

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

getColumnName

public java.lang.String getColumnName(int column)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

remove

public void remove(int row)
Remove the row from the TableModel.

Parameters:
row - int

getElement

public org.rimudb.editor.URLDefaultEntry getElement(int rowIndex)
Return the element at rowIndex.

Parameters:
rowIndex - int
Returns:
URLDefaultEntry

addElement

public void addElement(org.rimudb.editor.URLDefaultEntry defaultEntry)
Add a URLDefaultEntry to the model.

Parameters:
defaultEntry - URLDefaultEntry

updateElement

public void updateElement(int selectedRow,
                          org.rimudb.editor.URLDefaultEntry updatedEntry)
Update the row with a new URLDefaultEntry

Parameters:
selectedRow - int
updatedEntry - URLDefaultEntry

containsJDBCDriver

public boolean containsJDBCDriver(java.lang.String jdbcDriver)
Returns true if the jdbcDriver is in the list of defined drivers.

Parameters:
jdbcDriver - String
Returns:
boolean True of the jdbcDriver is in the list of defined drivers

getDefaultMap

public java.util.Map<java.lang.String,java.lang.String> getDefaultMap()
Return the map of jdbcDrivers and default URLs.

Returns:
Map

getDefaultURL

public java.lang.String getDefaultURL(java.lang.String jdbcDriver)
Return the default URL for a jdbcDriver.

Parameters:
jdbcDriver - String
Returns:
String


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.