|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.iplots.Framework
public class Framework
basic framework interface for bulding interactive statistical programs
Field Summary | |
---|---|
int |
graphicsEngine
|
Constructor Summary | |
---|---|
Framework()
initialize framework, create and select a dataset which id called "default". |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addNewPlot(BaseCanvas bc)
|
int |
addVar(SVar v)
add a variable to the current dataset. |
int |
countSets()
|
int |
curSetId()
|
java.lang.String |
d2s(double d)
|
NotifyMsg |
eventWait()
this methods is called from R by ievent.wait and uses waitForNotification() to wait for an event. |
SVarSet |
getCurrentSet()
get current dataset |
int |
getCurVarSetLength()
get the length of the current dataset |
double[] |
getDoubleContent(int vid)
display a new variables frame |
double[] |
getDoubleContent(SVar v)
|
int |
getGraphicsEngine()
|
int |
getLength()
|
java.lang.String |
getNewTmpVar()
|
java.lang.String |
getNewTmpVar(java.lang.String t)
|
boolean |
getNoInteractionFlag()
|
SVarSet |
getSet(int i)
|
int |
getSetIdByName(java.lang.String name)
|
java.lang.String |
getSetName()
|
java.lang.String |
getSetName(int i)
|
java.lang.String[] |
getStringContent(int vid)
|
java.lang.String[] |
getStringContent(SVar v)
|
SVar |
getVar(int i)
get variable object associated with an ID in current dataset |
SVar |
getVar(java.lang.String name)
get first variable object associated with a name in current dataset |
int |
indexOfSet(SVarSet s)
|
boolean |
isSetCurrent(SVarSet s)
verify whether a given dataset is current |
static java.lang.String |
msgDlg(java.lang.String caption,
java.lang.String msg,
java.lang.String[] buttons)
shows a modal dialog and waits until it is dismissed. |
BarCanvas |
newBarchart(int v)
|
BarCanvas |
newBarchart(int v,
int wgt)
|
BarCanvas |
newBarchart(SVarSet vs,
int v,
int wgt)
|
ParallelAxesCanvas |
newBoxplot(int i)
|
ParallelAxesCanvas |
newBoxplot(int[] i)
|
ParallelAxesCanvas |
newBoxplot(int[] i,
int ic)
|
ParallelAxesCanvas |
newBoxplot(int i,
int ic)
|
ParallelAxesCanvas |
newBoxplot(SVarSet vs,
int[] i,
int ic)
|
FrameDevice |
newFrame()
|
FrameDevice |
newFrame(java.lang.String tit)
|
FrameDevice |
newFrame(java.lang.String tit,
boolean useCommonBg,
int wclass)
|
FrameDevice |
newFrame(java.lang.String tit,
int wclass)
|
HamCanvas |
newHammock(int[] v)
|
HamCanvas |
newHammock(SVarSet vs,
int[] v)
|
HistCanvas |
newHistogram(int v)
display a new histogram of a variables from current dataset |
HistCanvas |
newHistogram(SVarSet vs,
int i)
|
LineCanvas |
newLineplot(int[] v)
|
LineCanvas |
newLineplot(int rv,
int v)
|
LineCanvas |
newLineplot(int rv,
int[] v)
|
LineCanvas |
newLineplot(SVarSet vs,
int rv,
int[] v)
|
MapCanvas |
newMap(int v)
|
MapCanvas |
newMap(SVarSet vs,
int v)
|
MosaicCanvas |
newMosaic(int[] v)
|
MosaicCanvas |
newMosaic(SVarSet vs,
int[] v)
|
ParallelAxesCanvas |
newPCP(int[] v)
|
ParallelAxesCanvas |
newPCP(SVarSet vs,
int[] v)
|
ScatterCanvas |
newScatterplot(int v1,
int v2)
display a new scatterplot of two variables from current dataset |
ScatterCanvas |
newScatterplot(SVarSet vs,
int v1,
int v2)
|
int |
newSet(java.lang.String name)
create and select a new dataset with the specified name. please note that it is possible to create multiple datasets of the same name but then only the first of these will be retrieved by name, others have to be selected by ID |
int |
newVar(java.lang.String name,
double[] d)
construct a new numerical variable from supplied array of doubles. |
int |
newVar(java.lang.String name,
double[] x,
double[] y)
construct a new map variable - SVar consisting of MapSegment instances |
int |
newVar(java.lang.String name,
int[] d)
construct a new numerical variable from supplied array of integers. |
int |
newVar(java.lang.String name,
int[] ix,
java.lang.String d)
|
int |
newVar(java.lang.String name,
int[] ix,
java.lang.String[] d)
construct a new factor variable from supplied array of integers (cases) and strings (levels). |
int |
newVar(java.lang.String name,
java.lang.String[] d)
construct a new categorical variable from supplied array of strings. |
void |
Notifying(NotifyMsg msg,
java.lang.Object o,
java.util.Vector path)
is a message arrives we'll simply use triggerNotification(org.rosuda.ibase.NotifyMsg) to inform any sleeping calls to waitForNotification() |
boolean |
removeSet(SVarSet s)
|
boolean |
removeSetById(int i)
|
int |
replaceVar(int vi,
double[] d)
replaces the content of a variable. it is meant for modification ONLY. note that the length of the new content cannot exceed the original size of the variable, no cases are added. |
int |
replaceVar(int vi,
int[] d)
replaces the content of a variable. it is meant for modification ONLY. note that the length of the new content cannot exceed the original size of the variable, no cases are added. |
int |
replaceVar(int vi,
int[] ids,
java.lang.String[] levels)
replaces the content of a variable. it is meant for modification ONLY. note that the length of the new content cannot exceed the original size of the variable, no cases are added. |
SVarSet |
selectSet(int i)
select dataset based on its ID (initial dataset has ID 0)/ |
SVarSet |
selectSet(java.lang.String name)
select dataset by name. the initial dataset created during framework initialization is called "default". |
void |
setDebugLevel(int df)
|
void |
setExtQueryString(int plotID,
java.lang.String str)
|
void |
setGraphicsEngine(int greng)
|
void |
setNoInteractionFlag(boolean flag)
|
void |
setSecMark(int[] ml)
|
void |
setSecMark(int[] ml,
boolean circular)
|
static java.lang.String[] |
toStringArray(java.lang.Object[] o)
|
void |
update()
updates any plots associated with the current dataset by sending NM_VarContentChange message |
void |
updateMarker()
|
void |
updateMarker(SVarSet vs,
int vid)
beware!! |
void |
updateVars()
|
void |
useExtQueryString(int plotID,
boolean b)
|
int |
varIsNum(int vid)
|
int |
varIsNum(SVar v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int graphicsEngine
Constructor Detail |
---|
public Framework()
Method Detail |
---|
public java.lang.String getNewTmpVar(java.lang.String t)
public java.lang.String getNewTmpVar()
public SVarSet getCurrentSet()
public boolean isSetCurrent(SVarSet s)
public SVarSet selectSet(java.lang.String name)
name
- name of the dataset
null
if no such dataset was foundpublic SVarSet selectSet(int i)
i
- the ID
null
if ID out of rangepublic SVarSet getSet(int i)
public int indexOfSet(SVarSet s)
public int getSetIdByName(java.lang.String name)
public int countSets()
public int curSetId()
public java.lang.String getSetName(int i)
public java.lang.String getSetName()
public boolean removeSetById(int i)
public boolean removeSet(SVarSet s)
public void setNoInteractionFlag(boolean flag)
public boolean getNoInteractionFlag()
public int newSet(java.lang.String name)
name
- name of the new dataset
public int getLength()
public int addVar(SVar v)
v
- the variable
SVar
object itself.public static java.lang.String msgDlg(java.lang.String caption, java.lang.String msg, java.lang.String[] buttons)
caption
- window captionmsg
- message stringbuttons
- buttons to show (see MsgDialog
constants for default sets of buttons)
public int getCurVarSetLength()
public int newVar(java.lang.String name, double[] d)
name
- variable named
- array of doubles
public int newVar(java.lang.String name, double[] x, double[] y)
public int newVar(java.lang.String name, int[] d)
name
- variable named
- array of integers
public int newVar(java.lang.String name, java.lang.String[] d)
name
- variable named
- array of strings
public int newVar(java.lang.String name, int[] ix, java.lang.String[] d)
name
- variable nameix
- array of level IDs. IDs out of range (<1 or >length(d)) are treated as missing valuesd
- levels (d[0]=ID 1, d[1]=ID 2, ...)
public int newVar(java.lang.String name, int[] ix, java.lang.String d)
public static java.lang.String[] toStringArray(java.lang.Object[] o)
public int replaceVar(int vi, double[] d)
vi
- ID of the variabled
- new content
public int replaceVar(int vi, int[] d)
vi
- ID of the variabled
- new content
public int replaceVar(int vi, int[] ids, java.lang.String[] levels)
vi
- ID of the variabled
- new content
public void update()
public SVar getVar(int i)
i
- variable ID
null
if ID is invalidpublic SVar getVar(java.lang.String name)
i
- variable name
null
if var of that name doesn't existpublic void updateMarker(SVarSet vs, int vid)
public FrameDevice newFrame()
public FrameDevice newFrame(java.lang.String tit)
public FrameDevice newFrame(java.lang.String tit, int wclass)
public FrameDevice newFrame(java.lang.String tit, boolean useCommonBg, int wclass)
public void setGraphicsEngine(int greng)
public int getGraphicsEngine()
public void addNewPlot(BaseCanvas bc)
public ScatterCanvas newScatterplot(int v1, int v2)
v1
- X-axis variablev2
- Y-axis variable
public ScatterCanvas newScatterplot(SVarSet vs, int v1, int v2)
public MapCanvas newMap(int v)
public MapCanvas newMap(SVarSet vs, int v)
public BarCanvas newBarchart(int v)
public BarCanvas newBarchart(int v, int wgt)
public BarCanvas newBarchart(SVarSet vs, int v, int wgt)
public LineCanvas newLineplot(int[] v)
public LineCanvas newLineplot(int rv, int[] v)
public LineCanvas newLineplot(int rv, int v)
public LineCanvas newLineplot(SVarSet vs, int rv, int[] v)
public HamCanvas newHammock(int[] v)
public HamCanvas newHammock(SVarSet vs, int[] v)
public MosaicCanvas newMosaic(int[] v)
public MosaicCanvas newMosaic(SVarSet vs, int[] v)
public ParallelAxesCanvas newPCP(int[] v)
public ParallelAxesCanvas newPCP(SVarSet vs, int[] v)
public HistCanvas newHistogram(int v)
v
- variable ID
public HistCanvas newHistogram(SVarSet vs, int i)
public ParallelAxesCanvas newBoxplot(int i)
public ParallelAxesCanvas newBoxplot(int i, int ic)
public ParallelAxesCanvas newBoxplot(int[] i)
public ParallelAxesCanvas newBoxplot(int[] i, int ic)
public ParallelAxesCanvas newBoxplot(SVarSet vs, int[] i, int ic)
public double[] getDoubleContent(int vid)
public java.lang.String[] getStringContent(int vid)
public double[] getDoubleContent(SVar v)
public java.lang.String[] getStringContent(SVar v)
public int varIsNum(int vid)
public int varIsNum(SVar v)
public void setSecMark(int[] ml)
public void setSecMark(int[] ml, boolean circular)
public void updateMarker()
public void updateVars()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void setDebugLevel(int df)
public void Notifying(NotifyMsg msg, java.lang.Object o, java.util.Vector path)
triggerNotification(org.rosuda.ibase.NotifyMsg)
to inform any sleeping calls to waitForNotification()
Notifying
in interface Dependent
o
- Object that sent the notification. The actual content is implementation-dependent.path
- This parameter is null for non-cascaded notify - in that case further calls to NotifyAll are not allowed. Otherwise it contains a Vector with all objects notified so far during cascaded notify. To aviod cyclic notifications every instance must either reject cascaded notifications (i.e. no calls to NotifyAll at all) or check for occurence of itself in the chain before calling NotifyAll.
The only valid recursive calls in Notifying are NotifyAll(path) and NotifyAll(..,path), because only these two pass the "path" parameter to avoid cyclic loops.
public NotifyMsg eventWait()
waitForNotification()
to wait for an event.
public java.lang.String d2s(double d)
public void setExtQueryString(int plotID, java.lang.String str)
public void useExtQueryString(int plotID, boolean b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |