|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--guk.editIM.MapTable | +--guk.editIM.GlyphTable
A class to represent a table of all unicode glyphs,
where the user can control which lines are visible.
Only for glyphs where a key sequence exists,
an AssignObject
is stored.
The lines for
un-assigned glyphs are not stored but calculated.
Field Summary | |
(package private) javax.swing.JTable |
myTable
For some geometry manipulations, we can make use of an object that holds our host JTable (or null). |
(package private) GTRenderer |
renderman
The renderman object provides us with a TableCellRenderer implementation and some scrollTo(row) method, which can be controlled by the processCommand() inside. |
(package private) java.util.Hashtable |
usedSlots
the glyph value is simply (char) for any internal row i, but externally, not every row is visible all the time... |
(package private) GTVisibility |
visor
The visor objects keeps track of which internal rows are externally visible and how row numbers are mapped. |
Fields inherited from class guk.editIM.MapTable |
assignments, changedFlag, tcRenderer, transferFormat |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
GlyphTable()
The constructor is quite simple now, as the GTVisibility and
GTRenderer classes are doing the
more specialized tasks. |
Method Summary | |
boolean |
addEntry(AssignObject ao)
Overridden because we use a Hashtable, no Vector. |
boolean |
flushTable()
Overridden because we use a Hashtable, no Vector. |
java.lang.String |
getColumnName(int col)
Overridden for dynamic title depending on the visor hideUnmapped status. |
int |
getRowCount()
Overridden as it differs from normal MapTable. |
java.awt.Component |
getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
The renderer: Use superclass method and improve. |
java.lang.Object |
getValueAt(int row,
int col)
Finds and returns an appropriate keys / glyphs assignment, or to be more exact, the requested field of it. |
boolean |
isCellEditable(int row,
int col)
Overridden to disallow editing of the glyph column. |
void |
processCommand(java.lang.String command,
int modifiers,
boolean checked)
Process command strings. |
java.util.Collection |
readTable()
Overridden because we use a Hashtable, no Vector. |
boolean |
removeEntry(AssignObject ao)
Overridden because we use a Hashtable, no Vector. |
void |
setScroller(javax.swing.JViewport vp,
javax.swing.JTable tab,
MenuHelpers menu)
Know which table we belong to and which viewport, so that we can remote control them. |
void |
setValueAt(java.lang.Object val,
int row,
int col)
Update the stored Hashtable of AssignObjects. |
Methods inherited from class guk.editIM.MapTable |
addRow, clearChanged, getColumnClass, getColumnCount, isChanged |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.util.Hashtable usedSlots
javax.swing.JTable myTable
GTVisibility visor
GTRenderer renderman
Constructor Detail |
public GlyphTable()
GTVisibility
and
GTRenderer
classes are doing the
more specialized tasks. Those also cause some number
crunching when their objects are instantiated.Method Detail |
public void setScroller(javax.swing.JViewport vp, javax.swing.JTable tab, MenuHelpers menu)
GTRenderer
public boolean flushTable()
flushTable
in class MapTable
public java.util.Collection readTable()
readTable
in class MapTable
public boolean addEntry(AssignObject ao)
addEntry
in class MapTable
public boolean removeEntry(AssignObject ao)
removeEntry
in class MapTable
public int getRowCount()
getRowCount
in class MapTable
guk.editIM.MapTable
public java.lang.Object getValueAt(int row, int col)
getValueAt
in class MapTable
public java.lang.String getColumnName(int col)
getColumnName
in class MapTable
guk.editIM.MapTable
col
- The column for which you want to know the name.public boolean isCellEditable(int row, int col)
isCellEditable
in class MapTable
guk.editIM.MapTable
row
- The affected row (not likely to matter)col
- The affected column: implementing classes
may return false for columns where they do not want Java
to allow the user to activate the editor component.public void setValueAt(java.lang.Object val, int row, int col)
setValueAt
in class MapTable
guk.editIM.MapTable
val
- Usually a string with the new value for that cell.row
- The row where the value is to be stored.col
- The column where the value is to be stored.public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface javax.swing.table.TableCellRenderer
getTableCellRendererComponent
in class MapTable
GTRenderer
public void processCommand(java.lang.String command, int modifiers, boolean checked)
process a command sent by e.g. the GUI menu system: showpart 12-34 (show that glyph range, using PART bitmap). showall 12-34 (show that glyph range, using ALL bitmap). jumpto 1234 (scrolls to that glyph). jumpfield CHAR (scrolls to that glyph - char may be escaped). hideunmapped glyphs (hide all unmapped glyphs from the table). (hideunmapped, showall and showpart also use the checked argument)
processCommand
in class MapTable
modifiers
- Modifiers use the normal ActionEvent bit masks.checked
- Some commands use this as additional boolean input.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |