ewe.ui
Class HexTableModel

java.lang.Object
  extended byewe.ui.TableModel
      extended byewe.ui.HexTableModel
All Implemented Interfaces:
CellConstants, ControlConstants, EventListener, UIConstants

public class HexTableModel
extends TableModel


Nested Class Summary
 
Nested classes inherited from class ewe.ui.TableModel
TableModel.CellControl, TableModel.ControlProxy
 
Field Summary
 RandomAccessStream stream
           
 
Fields inherited from class ewe.ui.TableModel
activeCellControl, allColumnsSameSize, allRowsSameSize, canHScroll, canVScroll, cellInsets, charHeight, charWidth, clipData, controlProxy, cursorSize, fillToEqualHeights, fillToEqualWidths, gap, hasColumnHeaders, hasPreferredSize, hasRowHeaders, hasSpanningColumns, hasSpanningRows, horizontalScrollUnit, insets, numCols, numRows, preferredCols, preferredRows, rect, selectRowWhenEditing, shadeAlternateRows, table, tca, verticalScrollUnit
 
Fields inherited from interface ewe.ui.UIConstants
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN
 
Fields inherited from interface ewe.ui.CellConstants
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
 
Fields inherited from interface ewe.ui.ControlConstants
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown
 
Constructor Summary
HexTableModel()
           
 
Method Summary
protected  int calculateTextCharsInColumn(int col)
          This is called by calculateColWidth().
protected  int calculateTextLinesInRow(int row)
          This is called by calculateColWidth().
 void closeStream()
           
 Object getCellText(int row, int col)
          This may return a String or an array of Strings (for multiline text) or it may return null.
 Form getTableForm(Form destination)
           
static Form getViewOf(File f, int maxSizeForFullRead, Form destination)
           
 void gotoAddress(long address)
           
static void main(String[] args)
           
 void onEvent(Event ev)
           
 boolean onKeyEvent(KeyEvent ev)
          This is called by the TableControl before it processes the event.
 void promptGoTo()
           
protected  boolean readIn16(int location, byte[] dest)
           
 void setStream(ByteArray data)
           
 void setStream(RandomAccessStream stream)
           
 String toAscii(byte[] got, int num)
           
 String toHex(int value, int digits)
           
 
Methods inherited from class ewe.ui.TableModel
calculateColWidth, calculateRowHeight, canScreenScroll, canSelect, checkControlFor, clearCellAdjustments, closeActiveControl, deferPaintTableCell, doHotKey, findCellsInArea, fixBorder, getCellAttributes, getCellControlFor, getCellData, getCellInsets, getCellPreferredSize, getCellRect, getColWidth, getControlFor, getLinesFor, getMaxColWidth, getMaxRowHeight, getMenuFor, getMenuOutsideCells, getMinColWidth, getMinRowHeight, getPreferredSize, getRowHeight, getToolTip, hasActiveControls, inset, isActiveCellControl, made, notifyDataChange, paintTableCell, paintTableCell, paintTableCellData, paintTableCellText, penPressed, popupMenuEvent, remapColumns, resized, scrollTo, select, show, startedEditing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

stream

public RandomAccessStream stream
Constructor Detail

HexTableModel

public HexTableModel()
Method Detail

calculateTextCharsInColumn

protected int calculateTextCharsInColumn(int col)
Description copied from class: TableModel
This is called by calculateColWidth(). It should give the number of characters that should fit in a column.

Overrides:
calculateTextCharsInColumn in class TableModel

calculateTextLinesInRow

protected int calculateTextLinesInRow(int row)
Description copied from class: TableModel
This is called by calculateColWidth(). It should give the number of text lines that should fit in a row.

Overrides:
calculateTextLinesInRow in class TableModel

readIn16

protected boolean readIn16(int location,
                           byte[] dest)

closeStream

public void closeStream()
                 throws IOException
Throws:
IOException

setStream

public void setStream(RandomAccessStream stream)
               throws IOException
Throws:
IOException

setStream

public void setStream(ByteArray data)
               throws IOException
Throws:
IOException

toAscii

public String toAscii(byte[] got,
                      int num)

toHex

public String toHex(int value,
                    int digits)

getCellText

public Object getCellText(int row,
                          int col)
Description copied from class: TableModel
This may return a String or an array of Strings (for multiline text) or it may return null. If it returns null then the value returned by getCellData(r,c) will be used to paint the cell contents.

Overrides:
getCellText in class TableModel

gotoAddress

public void gotoAddress(long address)

promptGoTo

public void promptGoTo()

onKeyEvent

public boolean onKeyEvent(KeyEvent ev)
Description copied from class: TableModel
This is called by the TableControl before it processes the event. If this method returns true, then the TableControl will not process the key.

Overrides:
onKeyEvent in class TableModel

onEvent

public void onEvent(Event ev)
Specified by:
onEvent in interface EventListener
Overrides:
onEvent in class TableModel

getTableForm

public Form getTableForm(Form destination)

getViewOf

public static Form getViewOf(File f,
                             int maxSizeForFullRead,
                             Form destination)
                      throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException