Title: | Model-View-Controller (MVC) Classes |
---|---|
Description: | Creates classes used in model-view-controller (MVC) design |
Authors: | Elizabeth Whalen |
Maintainer: | Elizabeth Whalen <[email protected]> |
License: | LGPL |
Version: | 1.81.0 |
Built: | 2024-11-29 06:24:25 UTC |
Source: | https://github.com/bioc/MVCClass |
dfModel is a class to represent a data frame model. This class inherits from the virtual class, gModel. An object of dfModel is responsible for storing and updating the data.
Objects can be created by calls of the form new("dfModel", ...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
modelData
:the model data, which is a data frame
virtualData
:data that is needed by views of this model, will be a data frame
linkData
:a list of functions that link this model to its parent and child models (if it has any)
modelName
:the name of this model
modelVar
:a list of variables that refer to the modelData (for instance this may be t-test values that were calculated from the modelData)
Class "gModel"
, directly.
No methods defined with class "dfModel" in the signature. The methods for this class will be created in other packages that use this package like iSNetwork and iSPlot.
Elizabeth Whalen
gAddChildMessage class represents an add child MVC message. This class will create a new MVC object that is a child of the current MVC object. gAddChildMessage inherits from the class, gAddMessage, which inherits from the virtual class, gMessage. The initialize and handleMessage methods will be defined in other packages that use this class (for example, the iSNetwork package).
Objects can be created by calls of the form new("gAddChildMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork package).
dataName
:the name of the new child model (MVC)
mData
:a list of information needed to add the new model
type
:the type of the new model (for now, it may be a data.frame, ExpressionSet, or graph)
Class "gAddMessage"
, directly.
Class "gMessage"
, by class "gAddMessage"
.
No methods defined with class "gAddChildMessage" in the signature.
Elizabeth Whalen
gAddDataMessage-class
,
gAddMessage-class
,
gMessage-class
gAddDataMessage is a class to represent an add data message. Whenever a model needs to be added, a gAddDataMessage object is created and the handleMessage method is called to act on the message. gAddDataMessage inherits from the virtual class, gAddMessage.
Objects can be created by calls of the form new("gAddDataMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
dataName
:the name of the model to be added
mData
:a list of information that contains the data to be added
type
:the type of model to be added (for now, it may be a data.frame, ExpressionSet, or graph)
Class "gAddMessage"
, directly.
Class "gModifyMessage"
, by class "gAddMessage"
.
Class "gMessage"
, by class "gAddMessage"
.
No methods defined with class "gAddDataMessage" in the signature.
Elizabeth Whalen
gAddViewMessage-class
,
gAddMessage-class
,
gMessage-class
gAddMessage is a virtual class to represent an add message. Both gAddDataMessage and gAddViewMessage classes are inherited from gAddMessage.
A virtual Class: No objects may be created from it.
dataName
:the name of the data to be added or the name of the data that the view will visualize
mData
:a list of information needed to perform the addition
type
:the type of addition to perform (ex. which type of model to add or which type of view to add)
Class "gModifyMessage"
, directly.
Class "gMessage"
, by class "gModifyMessage"
.
No methods defined with class "gAddMessage" in the signature.
Elizabeth Whalen
gMessage-class
,
gModifyMessage-class
,
gAddViewMessage-class
,
gAddDataMessage-class
,
gAddChildMessage-class
gAddViewMessage is a class to represent an add view message. Whenever a view needs to be added, a gAddViewMessage object is created and the handleMessage method is called to act on the message. gAddViewMessage inherits from the virtual class, gAddMessage.
Objects can be created by calls of the form new("gAddViewMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
dataName
:the name of the model to be added
mData
:a list of information that contains the data needed to add the view
type
:the type of view to be added (ex. scatterplot, spreadsheet, etc.)
Class "gAddMessage"
, directly.
Class "gModifyMessage"
, by class "gAddMessage"
.
Class "gMessage"
, by class "gAddMessage"
.
No methods defined with class "gAddViewMessage" in the signature.
Elizabeth Whalen
gAddDataMessage-class
,
gAddMessage-class
,
gMessage-class
gAskAncestorMessage is a class to ask for model data from an ancestor model (MVC). For example, if a user wants to create a child model, but needs data from both its parent and its grandparent model. Then when the parent model creates the new child model it would ask its parent (the grandparent of the new child model) for data using this class.
A specific example is if the original model contains microarray expression data and a child model of this model is the GO graph. Then if the user wants to look at the expression data of only genes annotated at a particular node, a child model can be created from the GO graph, but this new child model also needs data from the original model (its grandparent). Thus, when the GO graph creates a child model it needs to ask its parent for the expression data.
Objects can be created by calls of the form
new("gAskAncestorMessage", ...)
.
type
:which model type to look for as an ancestor (this is a character string naming the class)
mData
:the data that is being requested
from
:the MVC that asked the question
Class "gMessage"
, directly.
Sets the from
slot
Returns the from
slot
Sets the mData
slot
Returns the mData
slot
Sets the type
slot
Returns the type
slot
Even though this class is used to ask for information from an ancestor, each model (MVC) has only parent. This is important when considering how data sets are linked.
Elizabeth Whalen
genView is a virtual class that all view classes inherit from. All views will contain the information of what window (slot win) they are stored in, what data (slot dataName) is shown in the view, and the number of the window (slot winNum) that shows the view.
A virtual Class: No objects may be created from it.
dataName
:a character string describing what data are shown in the view
win
:an object of class "GtkWindow"
that holds the
view
winNum
:a number that tells what number view this is (for example, the first view created will have winNum=1)
Sets the dataName
slot
Returns the dataName
slot
Sets the win
slot
Returns the win
slot
Sets the winNum
slot
Returns the winNum
slot
Also, all view objects will have two methods, redrawView and updateView, that will define how a view should be redrawn when the underlying data has changed. The redrawView method will completely redraw the view, while the updateView method will only redraw the parts of the view that have changed. Both of these methods, redrawView and updateView, will be defined in packages that use this package, such as iSPlot and iSNetwork. Also, all views will have an identifyView method that will identify an object (such as a point, a node, a row, etc.) on the view given some location on the view (such as the user coordinates).
Elizabeth Whalen
plotView-class
,
sPlotView-class
,
spreadView-class
The gEventFun class creates an object which contains all the needed information to link a callback function to an event. The gEventFun object will hold all of the callback function information, including the callback function, a short description of what the callback function does, and a list of all preprocessing functions that must be called.
Objects can be created by calls of the form new("gEventFun", ...)
.
callFun
:the callback function
shortName
:a short description of what the callback function does
preprocessFun
:a list of preprocessing functions that must be called before the callback function (this can be NULL)
Sets the callFun
slot
Returns the callFun
slot
Sets the preprocessFun
slot
Returns the preprocessFun
slot
Sets the shortName
slot
Returns the preprocessFun
slot
Elizabeth Whalen
gMessage is a virtual class from which all other message classes will inherit. Message objects will be created whenever there is communication between the model, view, and controller components or between MVC objects.
A virtual Class: No objects may be created from it.
No methods defined with class "gMessage" in the signature. However, all message classes will have a handleMessage method that will read the message and notify the appropriate components so that the information in the message can be acted upon. The handleMessage methods will be defined in packages that use this package, such as iSPlot and iSNetwork.
Elizabeth Whalen
gUpdateMessage-class
,
gUpdateViewMessage-class
,
gUpdateDataMessage-class
,
gAddMessage-class
,
gAddViewMessage-class
,
gAddDataMessage-class
,
gAddChildMessage-class
,
gSendParentMessage-class
,
gSendChildMessage-class
gModel is a virtual class from which all other model classes will inherit. Model objects will be responsible for storing and updating the data sets.
A virtual Class: No objects may be created from it.
modelData
:the actual model data
linkData
:a list of the functions to link this data to its parent and child models (if it has any)
virtualData
:data that pertains to the views of this model
modelName
:the name of the model (will be the same name as the MVC)
modelVar
:a list of variables that refer to the modelData (for instance this may be t-test values that were calculated from the modelData)
Sets the linkData
slot
Returns the linkData
slot
Sets the modelData
slot
Returns the modelData
slot
Sets the modelName
slot
Returns the modelName
slot
Sets the virtualData
slot
Returns the virtualData
slot
Sets the modelVar
slot
Returns the modelVar
slot
Also, all models will have an updateModel method that will be defined in the packages that use this package (for example, iSPlot and iSNetwork). The updateModel method will be called by a gUpdateDataMessage object when the data needs to be updated. Another method that may be defined for certain models is the provideInfo method that will return model information when it is asked for by a gAskAncestorMessage object.
Elizabeth Whalen
gModifyMessage is a virtual class to represent a modify message. Both gAddMessage and gUpdateMessage classes are inherited from gModifyMessage.
A virtual Class: No objects may be created from it.
dataName
:the name of the data to be added or the name of the data that the view will visualize
mData
:a list of information needed to perform the addition
type
:the type of addition to perform (ex. which type of model to add or which type of view to add)
Class "gMessage"
, directly.
Sets the dataName
slot
Returns the dataName
slot
Sets the mData
slot
Returns the mData
slot
Sets the type
slot
Returns the type
slot
Elizabeth Whalen
gMessage-class
,
gAddMessage-class
,
gUpdateMessage-class
gSendChildMessage is a class to represent a send child MVC message. Whenever a model is updated and that model has a child MVC, then an object of this class will be created to notify the child MVC that a parent model was updated. gSendChildMessage inherits from the virtual class, gMessage. The initialize and handleMessage methods will be defined in other packages that use this class (for example, the iSNetwork package).
Objects can be created by calls of the form new("gSendChildMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork package).
parentUpdateDataMessage
:an object of class gUpdateDataMessage that was used to update the parent model (MVC)
childName
:the name of the child model that this message is directed towards (because a parent MVC can have multiple child MVCs)
Class "gMessage"
, directly.
Sets the childName
slot
Returns the childName
slot
Sets the parentUpdateDataMessage
slot
Returns the parentUpdateDataMessage
slot
Elizabeth Whalen
gSendParentMessage-class
,
gMessage-class
gSendParentMessage is a class to represent a send parent MVC message. Whenever a model is updated and that model has a parent MVC, then an object of this class will be created to notify the parent MVC that a child model was updated. gUpdateParentMessage inherits from the virtual class, gMessage. The initialize and handleMessage methods will be defined in other packages that use this class (for example, the iSNetwork package).
Objects can be created by calls of the form new("gSendParentMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork package).
childUpdateDataMessage
:an object of class gUpdateDataMessage that was used to update the child model (MVC)
Class "gMessage"
, directly.
Sets the childUpdateDataMessage
slot
Returns the childUpdateDataMessage
slot
Elizabeth Whalen
gSendChildMessage-class
,
gMessage-class
gUpdateDataMessage is a class to represent an update data message. gUpdateDataMessage is inherited from the virtual class, gUpdateMessage. Whenever a gUpdateDataMessage is created (initialized), the next step is to call the handleMessage method to act upon that message and update the data.
Objects can be created by calls of the form new("gUpdateDataMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
from
:the name of the MVC (model) that this update message came from
type
:the type of update to perform
mData
:a list of the information needed to perform the update
dataName
:the name of the data set to be updated
Class "gUpdateMessage"
, directly.
Class "gModifyMessage"
, by class "gUpdateMessage"
.
Class "gMessage"
, by class "gUpdateMessage"
.
Sets the from
slot
Returns the from
slot
Elizabeth Whalen
gUpdateViewMessage-class
,
gUpdateMessage-class
,
gMessage-class
gUpdateMessage is a virtual class to represent an update message. Both gUpdateViewMessage and gUpdateDataMessage classes are inherited from gUpdateMessage.
A virtual Class: No objects may be created from it.
type
:the type of update to be performed, will be a character string
mData
:a list of information needed to perform the update
dataName
:the name of the data set to be updated
Class "gModifyMessage"
, directly.
Class "gMessage"
, by class "gModifyMessage"
.
No methods defined with class "gUpdateMessage" in the signature.
Elizabeth Whalen
gMessage-class
,
gModifyMessage-class
,
gUpdateViewMessage-class
,
gUpdateDataMessage-class
gUpdateViewMessage is a class to represent an update view message. gUpdateViewMessage is inherited from the virtual class, gUpdateMessage. Whenever a gUpdateViewMessage is created (initialized), the next step is to call the handleMessage method to act upon that message and update the views.
Objects can be created by calls of the form new("gUpdateViewMessage",
...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
type
:the type of update to be performed
mData
:a list of the information needed to perform the update
dataName
:the name of the data set that was updated (views are updated after the data set has been updated)
Class "gUpdateMessage"
, directly.
Class "gModifyMessage"
, by class "gUpdateMessage"
.
Class "gMessage"
, by class "gUpdateMessage"
.
No methods defined with class "gUpdateViewMessage" in the signature.
Elizabeth Whalen
gUpdateDataMessage-class
,
gUpdateMessage-class
,
gMessage-class
linkedModelMVC is a class to represent a model-view-controller object that can be linked to other MVC objects. The linkedModelMVC class will combine these three components (model, view and controller) so that the MVC objects can be reused and it has the slots, parentMVC and childMVCList, to link this MVC object with other MVC objects.
Objects can be created by calls of the form new("linkedModelMVC", ...)
.
model
:the model object (will inherit from the gModel virtual class)
viewList
:a list of the view objects that visualize the model
controller
:the environment that stores information for the MVC object
parentMVC
:the name of the parent model (MVC) if there is a parent model
childMVCList
:a list of the names of the child models (MVCs); it may be an empty list if there are no children
Class "singleModelMVC"
, directly.
Class "MVC"
, by class "singleModelMVC"
.
Sets the childMVCList
slot
Returns the childMVCList
slot
Sets the parentMVC
slot
Returns the parentMVC
slot
Elizabeth Whalen
gModel-class
,
genView-class
,
singleModelMVC-class
,
MVC-class
MVC is a virtual class to represent a model-view-controller object. The MVC class will combine these three components (model, view and controller) so that the MVC objects can be reused and linked.
A virtual Class: No objects may be created from it.
model
:the model object (will inherit from the gModel virtual class)
viewList
:a list of the view objects that visualize the model
controller
:the environment that stores information for the MVC object
Sets the controller
slot
Returns the controller
slot
Sets the model
slot
Returns the model
slot
Sets the viewList
slot
Returns the viewList
slot
Elizabeth Whalen
gModel-class
,
genView-class
,
singleModelMVC-class
,
linkedModelMVC-class
plotView is a virtual class to represent a view that is a plot. Any particular types of plots can inherit from this class. For instance, sPlotView, is a class that inherits from plotView and represents a scatterplot view.
A virtual Class: No objects may be created from it.
plotDevice
:the plot device number
plotPar
:the parameter list for the plot, see par()
drArea
:an object of class "GtkDrawingArea"
dataName
:a character string describing what data are shown in the view
win
:an object of class "GtkWindow"
that holds the
view
winNum
:a number that tells what number view this is (for example, the first view created will have winNum=1)
Class "genView"
, directly.
Sets the drArea
slot
Returns the drArea
slot
Sets the plotDevice
slot
Returns the plotDevice
slot
Sets the plotPar
slot
Returns the plotPar
slot
Also, all classes that inherit from plotView will have clickEvent and motionEvent methods. The clickEvent method will be called whenever a user clicks on the plot and the motionEvent method will be called whenever a user moves the cursor over the plot. These methods will be defined in packages that use this package, such as iSPlot and iSNetwork. Note that the clickEvent method will also be defined for the spreadView class and this will correspond to a user selecting a row on the spreadsheet.
Elizabeth Whalen
genView-class
,
sPlotView-class
qqPlotView is a class to represent a qq-plot. For now, this class will be used to create qq-plot views of gene set enrichment data (stored in the gseModel). qqPlotView inherits from the class, plotView, which inherits from the virtual class, genView.
Objects can be created by calls of the form new("qqPlotView", ...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork package).
xval
:the x values for the points plotted
yval
:the y values for the points plotted
plotDevice
:the plot device number
plotPar
:the parameter list for the plot, see par()
drArea
:an object of class "GtkDrawingArea"
dataName
:a character string describing what data are shown in the view
win
:an object of class "GtkWindow"
that holds the
view
winNum
:a number that tells what number view this is (for example, the first view created will have winNum=1)
Class "plotView"
, directly.
Class "genView"
, by class "plotView"
.
Sets the xval
slot
Returns the xval
slot
Sets the yval
slot
Returns the yval
slot
Elizabeth Whalen
genView-class
,
plotView-class
,
sPlotView-class
singleModelMVC is a class to represent a model-view-controller object that cannot be linked to other MVC objects (i.e. single refers to the MVC object being unlinked). The singleModelMVC class will combine thee three components (model, view and controller) so that the MVC objects can be reused.
Objects can be created by calls of the form new("singleModelMVC", ...)
.
model
:the model object (will inherit from the gModel virtual class)
viewList
:a list of the view objects that visualize the model
controller
:the environment that stores information for the MVC object
Class "MVC"
, directly.
No methods defined with class "singleModelMVC" in the signature.
Elizabeth Whalen
gModel-class
,
genView-class
,
MVC-class
,
linkedModelMVC-class
sPlotView is a class to represent a view that is a scatterplot. sPlotView inherits from the class, plotView, which inherits from the virtual class, genView.
Objects can be created by calls of the form new("sPlotView", ...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
dfRows
:the names of the data frame rows that will be plotted
xvar
:the name of the data frame variable (column) that will be plotted on the x axis
yvar
:the name of the data frame variable (column) that will be plotted on the y axis
plotDevice
:the plot device number
plotPar
:the parameter list for the plot, see par()
drArea
:an object of class "GtkDrawingArea"
dataName
:a character string describing what data are shown in the view
win
:an object of class "GtkWindow"
that holds the
view
winNum
:a number that tells what number view this is (for example, the first view created will have winNum=1)
Class "plotView"
, directly.
Class "genView"
, by class "plotView"
.
Sets the xvar
slot
Returns the xvar
slot
Sets the yvar
slot
Returns the yvar
slot
Sets the dfRows
slot
Returns the dfRows
slot
Elizabeth Whalen
genView-class
,
plotView-class
,
spreadView-class
spreadView is a class to represent a view that is a spreadsheet. spreadView inherits from the virtual class, genView.
Objects can be created by calls of the form new("spreadView", ...)
.
The initialize method for this class will be created in other packages that
use this package (for example, the initialize method will be created in the
iSNetwork and iSPlot packages).
clist
:an object of class "GtkCList"
, i.e. the
spreadsheet
dataName
:a character string describing what data are shown in the view
win
:an object of class "GtkWindow"
that holds the
view
winNum
:a number that tells what number view this is (for example, the first view created will have winNum=1)
Class "genView"
, directly.
Sets the clist
slot
Returns the clist
slot
This class will also have a clickEvent method, which will be called whenever a user selects a row on the spreadsheet. This method will be defined in packages that use this package, such as iSPlot and iSNetwork.
Elizabeth Whalen