frysk.gui.register
Class RegisterWindow

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.register.RegisterWindow
All Implemented Interfaces:
Saveable

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


Field Summary
static String gladePath
           
 
Constructor Summary
RegisterWindow(org.gnu.glade.LibGlade glade)
          The RegisterWindow allows the display and editing of the names and values of system registers.
 
Method Summary
 void finishRegWin(Proc proc)
          Initializes the Glade file, the RegisterWindow itself, adds listeners and Assigns the Proc.
 boolean getClosed()
           
 frysk.gui.register.RegisterWindow.LockObserver getLockObserver()
          Returns this RegisterWindow's LockObserver.
 Task getMyTask()
          Returns the Task being examined by this Window.
 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 save(Preferences prefs)
          Saves the new preferences of this window.
 void setClosed(boolean closed)
           
 void setIsRunning(boolean running)
          Sets whether the task is running or not, and if it is diable the widgets in the window
 void setObservable(Observable o)
           
 void setTask(Task myTask)
          Sets the task to be examined by this RegisterWindow.
 
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

RegisterWindow

public RegisterWindow(org.gnu.glade.LibGlade glade)
The RegisterWindow allows the display and editing of the names and values of system registers. The values of the registers can be displayed in decimal, hexadecimal, octal, or binary. Manipulating the registers is only possible when the task is stopped, otherwise all functionality is disabled. The RegisterWindow is created dynamically from the RegisterWindowFactory.

Parameters:
task - The Task for which to display the registers
glade - The glade file for the register window
Method Detail

finishRegWin

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

Parameters:
proc - The Proc to be examined by rw.

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.

setTask

public void setTask(Task myTask)
Sets the task to be examined by this RegisterWindow. Also initializes the ISA used and does most of the work setting up the initial members used by this class.

Parameters:
myTask - The Task to be examined by this RegisterWindow.

resetTask

public void resetTask(Task task)

setIsRunning

public void setIsRunning(boolean running)
Sets whether the task is running or not, and if it is diable the widgets in the window

Parameters:
running - Whether the task is running TODO: Should we be listening to the Task for some sort of an event in this regard?

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.register.RegisterWindow.LockObserver getLockObserver()
Returns this RegisterWindow's LockObserver.

Returns:
lock This RegisterWindow's LockObserver