Package jadex.gpmn.editor.gui
Class ModelContainer
- java.lang.Object
- 
- jadex.gpmn.editor.gui.ModelContainer
 
- 
 public class ModelContainer extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringACHIEVE_GOAL_MODEAchieve Goal Edit Modestatic java.lang.StringACTIVATION_PLAN_MODEActivation Plan Edit Modestatic java.lang.StringCONTROL_POINT_MODEControl Point Modeprotected DeletionControllerdeletioncontrollerThe deletion controllerprotected booleandirtyThe dirty flag.protected AbstractEditingToolbareditingtoolbarThe edit mode tool bar.protected java.io.FilefileThe mode file.protected FoldControllerfoldcontrollerThe fold controllerprotected com.mxgraph.swing.mxGraphComponentgraphcomponentThe graph component.protected ImageProviderimageproviderThe image provider.static java.lang.StringMAINTAIN_GOAL_MODEMaintain Goal Edit Modeprotected IGpmnModelmodelThe current model.protected IGpmnModelFactorymodelfactoryThe model factory.static java.util.Set<java.lang.String>NODE_CREATION_MODESNode Creation Modesstatic java.lang.StringPERFORM_GOAL_MODEPerform Goal Edit Modeprotected java.io.FileprojectrootThe project root.protected javax.swing.JPanelpropertypanelcontainerThe property panel container.static java.lang.StringQUERY_GOAL_MODEQuery Goal Edit Modestatic java.lang.StringREF_PLAN_MODERef Plan Edit Modestatic java.lang.StringSELECT_MODESelect Edit Modestatic java.lang.StringSUPPRESSION_EDGE_MODESuppression Edge Edit Mode
 - 
Constructor SummaryConstructors Constructor Description ModelContainer(IGpmnModelFactory modelfactory, com.mxgraph.swing.mxGraphComponent graphcomponent, IGpmnModel model)Creates a new container.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckUnsaved(java.awt.Component parent)Handles unsaved model deletions.voiddesynchModels()Disables deletion controller, desynchronizing visual and business model.protected voidfindProjectRoot()Attempts to find the project root.AbstractEditingToolbargetEditingToolbar()Gets the editing tool bar.java.lang.StringgetEditMode()Gets the edit mode.java.io.FilegetFile()Gets the model file.FoldControllergetFoldController()Returns the controller for folding.IGpmnModelgetGpmnModel()Returns the GPMN intermediate model.GpmnGraphgetGraph()Returns the current visual graph.com.mxgraph.swing.mxGraphComponentgetGraphComponent()Returns the current visual graph component.ImageProvidergetImageProvider()Gets the image provider.IGpmnModelFactorygetModelFactory()Gets the model factory.java.lang.String[]getProjectClasses()Returns all available Java classes in the project.java.io.FilegetProjectRoot()Gets the project root.protected javax.swing.JPanelgetPropertyPanelContainer()Gets the property panel container.booleanisDirty()Tests if the state is dirty.java.util.List<java.lang.String>searchForClasses(java.io.File dir)Recursive search for class files.voidsetDirty(boolean dirty)Sets the dirty model state.voidsetEditingToolbar(AbstractEditingToolbar toolbar)Sets the editing tool bar.voidsetEditMode(java.lang.String editmode)Sets the edit mode.voidsetFile(java.io.File file)Sets the model file.voidsetGpmnModel(IGpmnModel model)Sets the GPMN model.voidsetGraph(GpmnGraph graph)Sets the current visual graph.voidsetGraphComponent(com.mxgraph.swing.mxGraphComponent component)Sets the visual graph component.voidsetModelFactory(IGpmnModelFactory modelfactory)Sets the model factory.voidsetProjectRoot(java.io.File root)Sets the project root.voidsetPropertyPanel(javax.swing.JComponent panel)Sets the current property panel.protected voidsetPropertyPanelContainer(javax.swing.JPanel propertypanelcontainer)Sets the property panel container.voidsynchModels()Enables deletion controller, synchronizing visual and business model.
 
- 
- 
- 
Field Detail- 
SELECT_MODEpublic static final java.lang.String SELECT_MODE Select Edit Mode- See Also:
- Constant Field Values
 
 - 
CONTROL_POINT_MODEpublic static final java.lang.String CONTROL_POINT_MODE Control Point Mode- See Also:
- Constant Field Values
 
 - 
ACHIEVE_GOAL_MODEpublic static final java.lang.String ACHIEVE_GOAL_MODE Achieve Goal Edit Mode- See Also:
- Constant Field Values
 
 - 
PERFORM_GOAL_MODEpublic static final java.lang.String PERFORM_GOAL_MODE Perform Goal Edit Mode- See Also:
- Constant Field Values
 
 - 
MAINTAIN_GOAL_MODEpublic static final java.lang.String MAINTAIN_GOAL_MODE Maintain Goal Edit Mode- See Also:
- Constant Field Values
 
 - 
QUERY_GOAL_MODEpublic static final java.lang.String QUERY_GOAL_MODE Query Goal Edit Mode- See Also:
- Constant Field Values
 
 - 
REF_PLAN_MODEpublic static final java.lang.String REF_PLAN_MODE Ref Plan Edit Mode- See Also:
- Constant Field Values
 
 - 
ACTIVATION_PLAN_MODEpublic static final java.lang.String ACTIVATION_PLAN_MODE Activation Plan Edit Mode- See Also:
- Constant Field Values
 
 - 
SUPPRESSION_EDGE_MODEpublic static final java.lang.String SUPPRESSION_EDGE_MODE Suppression Edge Edit Mode- See Also:
- Constant Field Values
 
 - 
NODE_CREATION_MODESpublic static final java.util.Set<java.lang.String> NODE_CREATION_MODES Node Creation Modes
 - 
fileprotected java.io.File file The mode file.
 - 
graphcomponentprotected com.mxgraph.swing.mxGraphComponent graphcomponent The graph component.
 - 
modelprotected IGpmnModel model The current model.
 - 
editingtoolbarprotected AbstractEditingToolbar editingtoolbar The edit mode tool bar.
 - 
dirtyprotected boolean dirty The dirty flag.
 - 
projectrootprotected java.io.File projectroot The project root.
 - 
modelfactoryprotected IGpmnModelFactory modelfactory The model factory.
 - 
imageproviderprotected ImageProvider imageprovider The image provider.
 - 
propertypanelcontainerprotected javax.swing.JPanel propertypanelcontainer The property panel container.
 - 
deletioncontrollerprotected DeletionController deletioncontroller The deletion controller
 - 
foldcontrollerprotected FoldController foldcontroller The fold controller
 
- 
 - 
Constructor Detail- 
ModelContainerpublic ModelContainer(IGpmnModelFactory modelfactory, com.mxgraph.swing.mxGraphComponent graphcomponent, IGpmnModel model) Creates a new container.
 
- 
 - 
Method Detail- 
getGraphComponentpublic com.mxgraph.swing.mxGraphComponent getGraphComponent() Returns the current visual graph component.- Returns:
- The graph.
 
 - 
getGraphpublic GpmnGraph getGraph() Returns the current visual graph.- Returns:
- The graph.
 
 - 
getGpmnModelpublic IGpmnModel getGpmnModel() Returns the GPMN intermediate model.- Returns:
- GPMN model.
 
 - 
setGraphpublic void setGraph(GpmnGraph graph) Sets the current visual graph.- Parameters:
- graph- The graph.
 
 - 
setGraphComponentpublic void setGraphComponent(com.mxgraph.swing.mxGraphComponent component) Sets the visual graph component.- Parameters:
- component- The component.
 
 - 
setGpmnModelpublic void setGpmnModel(IGpmnModel model) Sets the GPMN model.- Parameters:
- model- The model.
 
 - 
getModelFactorypublic IGpmnModelFactory getModelFactory() Gets the model factory.- Returns:
- The model factory.
 
 - 
setModelFactorypublic void setModelFactory(IGpmnModelFactory modelfactory) Sets the model factory.- Parameters:
- modelfactory- The model factory.
 
 - 
getImageProviderpublic ImageProvider getImageProvider() Gets the image provider.- Returns:
- The image provider.
 
 - 
getEditModepublic java.lang.String getEditMode() Gets the edit mode.- Returns:
- The edit mode.
 
 - 
setEditModepublic void setEditMode(java.lang.String editmode) Sets the edit mode.- Parameters:
- editmode- The edit mode.
 
 - 
getEditingToolbarpublic AbstractEditingToolbar getEditingToolbar() Gets the editing tool bar.- Returns:
- The editing tool bar.
 
 - 
setEditingToolbarpublic void setEditingToolbar(AbstractEditingToolbar toolbar) Sets the editing tool bar.- Parameters:
- toolbar- The editing tool bar.
 
 - 
setPropertyPanelpublic void setPropertyPanel(javax.swing.JComponent panel) Sets the current property panel.- Parameters:
- panel- The panel.
 
 - 
getFoldControllerpublic FoldController getFoldController() Returns the controller for folding.- Returns:
- Fold controller.
 
 - 
desynchModelspublic void desynchModels() Disables deletion controller, desynchronizing visual and business model.
 - 
synchModelspublic void synchModels() Enables deletion controller, synchronizing visual and business model.
 - 
setDirtypublic void setDirty(boolean dirty) Sets the dirty model state.- Parameters:
- dirty- The dirty state.
 
 - 
isDirtypublic boolean isDirty() Tests if the state is dirty.- Returns:
- True, if dirty.
 
 - 
checkUnsavedpublic boolean checkUnsaved(java.awt.Component parent) Handles unsaved model deletions.- Parameters:
- parent- Parent component.
- modelcontainer- The model container.
 
 - 
getPropertyPanelContainerprotected javax.swing.JPanel getPropertyPanelContainer() Gets the property panel container.- Returns:
- The property panel container.
 
 - 
setPropertyPanelContainerprotected void setPropertyPanelContainer(javax.swing.JPanel propertypanelcontainer) Sets the property panel container.- Parameters:
- propertypanelcontainer- The property panel container.
 
 - 
getProjectRootpublic java.io.File getProjectRoot() Gets the project root.- Returns:
- The project root.
 
 - 
setProjectRootpublic void setProjectRoot(java.io.File root) Sets the project root.- Parameters:
- root- The project root.
 
 - 
getFilepublic java.io.File getFile() Gets the model file.- Returns:
- The model file.
 
 - 
setFilepublic void setFile(java.io.File file) Sets the model file.- Parameters:
- file- The model file.
 
 - 
getProjectClassespublic java.lang.String[] getProjectClasses() Returns all available Java classes in the project.- Returns:
- Array of class names, null if unknown.
 
 - 
searchForClassespublic java.util.List<java.lang.String> searchForClasses(java.io.File dir) Recursive search for class files.
 - 
findProjectRootprotected void findProjectRoot() Attempts to find the project root.
 
- 
 
-