|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--guk.editIM.GTVisibility
Visibility and internal versus user row mapping for the glyph table, including the required command processing.
Field Summary | |
protected static boolean |
AUTOMAPPED
If this is true, mapped glyphs will always be visible when the hideUnmapped state is on. |
(package private) int[] |
glyphToRow
like rowToGlyph but for translating internal (glyph) to visible row number. |
protected boolean |
hideUnmapped
whether to hide rows where no key sequence is assigned. |
(package private) java.util.Map |
rowContents
The contents of the table, so that we can stay up to date about which internal rows are in use, for the hideUnmapped feature. |
(package private) int[] |
rowToGlyph
The current assignment between visible rows and internal rows, some rows might be invisible so the values might differ! used at different places, maintained by processCommand. |
(package private) boolean[] |
showAll
Describes the visibility status of all lines. |
(package private) boolean[] |
showPart
ORed together with showAll to determine visibility. |
(package private) int |
visibleRows
current size of the table, number of visible rows. |
Constructor Summary | |
GTVisibility(java.util.Map contents)
The constructor initializes the arrays. |
Method Summary | |
int |
getVisibleRowCount()
Figure out how many rows are currently to be shown. |
int |
internalToRow(int row)
Translate glyph number / internal row to visible row. |
boolean |
isHideUnmappedOn()
Ask if the hideUnmapped feature is on. |
void |
processCommand(java.lang.String command,
int modifiers,
boolean checked)
Process command strings. |
int |
rowToInternal(int row)
Translate visible row to glyph number / internal row. |
void |
updateVisibility()
Determine which internal rows are visible, based on the internal showAll and showPart arrays and on hideUnmapped. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static final boolean AUTOMAPPED
int[] rowToGlyph
rowToGlyph: know glyph from user row (for table interface) glyphToRow: know user row from glyph (for scrolling)
int[] glyphToRow
boolean[] showAll
showAll: which glyphs are certainly visible? showPart: which glpyhs are specially visible? the idea is that you can toggle showAll without having to update showPart. If either is true, the row is visible.
boolean[] showPart
int visibleRows
protected boolean hideUnmapped
java.util.Map rowContents
Constructor Detail |
public GTVisibility(java.util.Map contents)
contents
- A map where an Integer key retrieves the
contents for the internal row selected by the Integer value.
The map will be queried from time to time.Method Detail |
public int getVisibleRowCount()
public boolean isHideUnmappedOn()
public int rowToInternal(int row)
row
- The number of a visible row (0 is the topmost
visible row).public int internalToRow(int row)
row
- The number of a glyph / internal row.public void updateVisibility()
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), hideunmapped glyphs (hide all unmapped glyphs from the table) (hideunmapped, showall and showpart also use the checked argument)
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 |