frysk.gui.disassembler
Class DisassemblyWindow

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gtk.GtkObject
              extended by org.gnu.gtk.Widget
                  extended by org.gnu.gtk.Container
                      extended by org.gnu.gtk.Bin
                          extended by org.gnu.gtk.Window
                              extended by frysk.gui.disassembler.DisassemblyWindow
All Implemented Interfaces:
Saveable

public class DisassemblyWindow
extends org.gnu.gtk.Window
implements Saveable


Field Summary
static String gladePath
           
 
Constructor Summary
DisassemblyWindow(org.gnu.glade.LibGlade glade)
          The DisassmblyWindow, given a Task, will disassemble the instructions and parameters for that task in memory and display them, as well as their absolute address in memory and relative distance from the program counter.
 
Method Summary
 void finishDisWin(Proc proc)
          Initializes the Glade file, the DisassemblyWindow itself, adds listeners and Assigns the Proc.
 boolean getClosed()
           
 frysk.gui.disassembler.DisassemblyWindow.LockObserver getLockObserver()
          Returns this DisassemblyWindow's LockObserver.
 Task getMyTask()
          Returns the Task being examined by this Window.
 void handleFromSpin(double val)
          When the 'From' SpinBox is changed, update the displayed information accordingly.
 void handleToSpin(double val)
          When the 'To' SpinBox is changed, update the displayed information accordingly.
 boolean hasTaskSet()
          Check to see if the task to be examined has already been set.
 void load(Preferences prefs)
          Loads the saved preferences of this window.
 void resetTask(Task task)
           
 void rowAppend(long i, int numIns, org.gnu.gtk.TreeIter iter)
          Helper function for calculating memory information and putting it into rows to be displayed.
 void save(Preferences prefs)
          Saves the new preferences of this window.
 void setClosed(boolean closed)
           
 void setIsRunning(boolean running)
          Set the sensitivity of this window and the formatting window.
 void setObservable(Observable o)
           
 void setTask(Task myTask)
          Set the Task for this window to examine.
 void setUpColumns()
          Sets up the columns in the TreeView between the addresses given by the SpinBoxes.
 
Methods inherited from class org.gnu.gtk.Window
addAccelGroup, deiconify, destroy, fullscreen, getAcceptFocus, getDefaultIconList, getFocusOnMap, getFocusWidget, getGravity, getIcon, getIconList, getIconName, getPosition, getScreen, getSize, getSkipPagerHint, getSkipTaskbarHint, getTitle, getTransientParent, getType, getWindow, hasToplevelFocus, iconify, isActive, isDestroyed, listToplevelWindows, maximize, move, present, removeAccelGroup, resize, setAcceptFocus, setAutoStartupNotification, setDecorated, setDefaultIcon, setDefaultIconFromFile, setDefaultIconList, setDefaultIconName, setDefaultSize, setDefaultWidget, setFocusOnMap, setFocusWidget, setGeometryHints, setGravity, setIcon, setIconFromFile, setIconList, setIconName, setKeepAbove, setKeepBelow, setModal, setPosition, setResizable, setScreen, setSkipPagerHint, setSkipTaskbarHint, setTitle, setTransientParent, stick, unfullscreen, unmaximize, unstick
 
Methods inherited from class org.gnu.gtk.Bin
getChild
 
Methods inherited from class org.gnu.gtk.Container
add, addListener, getBooleanChildProperty, getBorderWidth, getChildProperty, getChildren, getEventListenerClass, getEventType, getIntChildProperty, getResizeMode, remove, removeListener, resizeChildren, setBooleanChildProperty, setBorderWidth, setChildProperty, setIntChildProperty, setResizeMode
 
Methods inherited from class org.gnu.gtk.Widget
activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getAllocation, getCanFocus, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setCanFocus, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight
 
Methods inherited from class org.gnu.gtk.GtkObject
sink
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gladePath

public static String gladePath
Constructor Detail

DisassemblyWindow

public DisassemblyWindow(org.gnu.glade.LibGlade glade)
The DisassmblyWindow, given a Task, will disassemble the instructions and parameters for that task in memory and display them, as well as their absolute address in memory and relative distance from the program counter.

Parameters:
glade - The glade file containing the widgets for this window.
Method Detail

finishDisWin

public void finishDisWin(Proc proc)
Initializes the Glade file, the DisassemblyWindow itself, adds listeners and Assigns the Proc.

Parameters:
dw - The DisassemblyWindow to be initialized.
proc - The Proc to be examined by dw.

setObservable

public void setObservable(Observable o)

hasTaskSet

public boolean hasTaskSet()
Check to see if the task to be examined has already been set.

Returns:
False if myTask is null, True otherwise.

setIsRunning

public void setIsRunning(boolean running)
Set the sensitivity of this window and the formatting window.

Parameters:
running - True if the window is running, false otherwise.

setTask

public void setTask(Task myTask)
Set the Task for this window to examine. Initializes the Disassembler used as the backend for this window, and assigns initial values to members of this class. Also refreshes the window itself, displaying information for the first time.

Parameters:
myTask - The task to be examined.

resetTask

public void resetTask(Task task)

setUpColumns

public void setUpColumns()
Sets up the columns in the TreeView between the addresses given by the SpinBoxes.


rowAppend

public void rowAppend(long i,
                      int numIns,
                      org.gnu.gtk.TreeIter iter)
Helper function for calculating memory information and putting it into rows to be displayed. By default append rows to the end.

Parameters:
i - The address to be displayed
numIns - The Instructions that maybe be added
iter - The TreeIter representing the row to be added.

handleFromSpin

public void handleFromSpin(double val)
When the 'From' SpinBox is changed, update the displayed information accordingly.

Parameters:
val - The new value of the SpinBox.

handleToSpin

public void handleToSpin(double val)
When the 'To' SpinBox is changed, update the displayed information accordingly.

Parameters:
val - The new value of the SpinBox.

save

public void save(Preferences prefs)
Saves the new preferences of this window.

Specified by:
save in interface Saveable
Parameters:
prefs - The preference node to be saved.

load

public void load(Preferences prefs)
Loads the saved preferences of this window.

Specified by:
load in interface Saveable
Parameters:
prefs - The preference node used to load preferences.

getMyTask

public Task getMyTask()
Returns the Task being examined by this Window.

Returns:
myTask The Task being examined.

getClosed

public boolean getClosed()

setClosed

public void setClosed(boolean closed)

getLockObserver

public frysk.gui.disassembler.DisassemblyWindow.LockObserver getLockObserver()
Returns this DisassemblyWindow's LockObserver.

Returns:
lock This DisassemblyWindow's LockObserver