Class LocaleTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.gvsig.i18n.extension.preferences.table.LocaleTableModel
- All Implemented Interfaces:
Serializable,TableModel
TableModel to show the list of available Locales in gvSIG.
- Author:
- David Cervera
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionLocaleTableModel(I18nManager manager) Creates a LocaleTableModel with a I18nManager to handle locales. -
Method Summary
Modifier and TypeMethodDescriptiongetColumnClass(int columnIndex) intgetColumnName(int columnIndex) getLocale(int rowIndex) Returns theLocaleshown in a table row.intReturns the current selected locale.getValueAt(int rowIndex, int columnIndex) booleanisCellEditable(int rowIndex, int columnIndex) booleanvoidReloads the list of installed locales.voidremoveLocale(Locale locale) Removes and uninstalls a locale.voidvoidvoidvoidvoidsetSelectedLocale(Locale locale) Sets the current selected locale.voidsetValueAt(Object value, int rowIndex, int columnIndex) Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
COLUMN_LOCALE
public static final int COLUMN_LOCALE- See Also:
-
COLUMN_LANGUAGE
public static final int COLUMN_LANGUAGE- See Also:
-
COLUMN_COUNTRY
public static final int COLUMN_COUNTRY- See Also:
-
COLUMN_VARIANT
public static final int COLUMN_VARIANT- See Also:
-
COLUMN_ACTIVE
public static final int COLUMN_ACTIVE- See Also:
-
-
Constructor Details
-
LocaleTableModel
Creates a LocaleTableModel with a I18nManager to handle locales.
-
-
Method Details
-
getColumnCount
public int getColumnCount() -
getRowCount
public int getRowCount() -
getValueAt
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getLocale
Returns theLocaleshown in a table row.- Parameters:
rowIndex- the table row index- Returns:
- the
Locale
-
removeLocale
Removes and uninstalls a locale.- Parameters:
locale- to remove- Throws:
I18nException- if there is an error removing a Locale
-
reloadLocales
public void reloadLocales()Reloads the list of installed locales. -
saveSelectedLocale
public void saveSelectedLocale() -
selectPreviousLocale
public void selectPreviousLocale() -
selectDefaultLocale
public void selectDefaultLocale() -
isValueChanged
public boolean isValueChanged() -
setChangesApplied
public void setChangesApplied() -
setSelectedLocale
Sets the current selected locale. -
getSelectedLocale
Returns the current selected locale.
-