|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.keridwen.modelling.mesh.inspector.core.Context
public class Context
Generic context manager to define/know in which software context the application or module is run or instanced. This class should be used as STATIC object as follow: In the starting code (e.g main method or calling class): //default settings (at least we try...) Context.getInstance().setVTK_CONTEXT(true); Context.getInstance().setPlotContext(true); //Real test (i.e the context test really if the tested components are // available. // test the plotting context (JFreeChart) Context.getInstance().testPlotcontext(); // load the VTK context if relevant if (Context.getInstance().isVTK_CONTEXT()) { Context.getInstance().loadVtkContext(); } // example of use if (Context.getInstance().isVTK_CONTEXT()) { controlPanel.exportToVtkFileButton.setActionCommand(EXPORT_VTK_FILE); controlPanel.exportToVtkFileButton.addActionListener(this); controlPanel.exportToVtkFileButton.setEnabled(true); }
Field Summary | |
---|---|
static String |
BATCH
|
boolean |
cassandraContext
|
static String |
GRAPHICAL
|
protected String |
guiContext
|
protected boolean |
keridwenContext
|
protected com.artenum.penelope.mesh.interfaces.Mesh |
kerMesh
|
protected boolean |
plotContext
|
protected String |
StudyPath
|
protected boolean |
vtkContext
|
Constructor Summary | |
---|---|
Context()
|
Method Summary | |
---|---|
String |
getGUI_CONTEXT()
get the context related to the GUI. |
static Context |
getInstance()
Gets the singleton instance of Preferences . |
com.artenum.penelope.mesh.interfaces.Mesh |
getKeridwenMesh()
|
String |
getStudyPath()
|
boolean |
isCASSANDRA_CONTEXT()
|
boolean |
isKERIDWEN_CONTEXT()
|
boolean |
isPlotContext()
|
boolean |
isVTK_CONTEXT()
return the VTK context (i.e if VTK based functions are operational or not). |
void |
loadVtkContext()
Load (i.e test) if the VTK context is available or not. |
void |
setCASSANDRA_CONTEXT(boolean cASSANDRACONTEXT)
Set the Cassandra context, to indicate if a Cassandra viewer (see http://www.artenum.com/cassandra) is linked to the current inspector. |
void |
setContext(String GUI_CONTEXT,
boolean CASSANDRA_CONTEXT,
boolean KERIDWEN_CONTEXT,
boolean VTK_CONTEXT)
|
void |
setGUI_CONTEXT(String guiContext)
set the context related to the GUI, i.e a flag (string) to know if the GUI can be/should be displayed or not. |
void |
setKERIDWEN_CONTEXT(boolean kERIDWENCONTEXT)
Set the Keridwen context, i.e if the application is running as KerModule and/or a KerDataBus is available or not. |
void |
setKeridwenMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
Set the mesh to inspect directly from a mesh object in memory. |
void |
setPlotContext(boolean plotContext)
Set the plot context for the JFreeChart plotting features. |
void |
setStudyPath(String studyPath)
|
void |
setVTK_CONTEXT(boolean vTKCONTEXT)
Set the VTK context (i.e to set if VTK based functions be operational or not). |
void |
testPlotcontext()
test the presence of the JFreeMesh library in the classpath (see third part components) or not and set the plotting context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BATCH
public static final String GRAPHICAL
protected String guiContext
public boolean cassandraContext
protected boolean keridwenContext
protected boolean vtkContext
protected boolean plotContext
protected com.artenum.penelope.mesh.interfaces.Mesh kerMesh
protected String StudyPath
Constructor Detail |
---|
public Context()
Method Detail |
---|
public static Context getInstance()
Preferences
.
public void setContext(String GUI_CONTEXT, boolean CASSANDRA_CONTEXT, boolean KERIDWEN_CONTEXT, boolean VTK_CONTEXT)
public String getGUI_CONTEXT()
public void setGUI_CONTEXT(String guiContext)
guiContext
- public boolean isCASSANDRA_CONTEXT()
public void setCASSANDRA_CONTEXT(boolean cASSANDRACONTEXT)
cASSANDRACONTEXT
- public boolean isKERIDWEN_CONTEXT()
public void setKERIDWEN_CONTEXT(boolean kERIDWENCONTEXT)
kERIDWENCONTEXT
- public void setKeridwenMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
mesh
- public com.artenum.penelope.mesh.interfaces.Mesh getKeridwenMesh()
public boolean isVTK_CONTEXT()
public void setVTK_CONTEXT(boolean vTKCONTEXT)
vTKCONTEXT
- public void testPlotcontext()
public void loadVtkContext()
public boolean isPlotContext()
public void setPlotContext(boolean plotContext)
plotContext
- public String getStudyPath()
public void setStudyPath(String studyPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |