Commit f396005f authored by apvrille's avatar apvrille

Adding first diagram reference qith a home button

parent a49beb98
......@@ -450,7 +450,8 @@ git:
DESTDIR ?= $(TTOOL_PATH)
install: ttool launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler
install:
#ttool launcher graphminimize graphshow tiftranslator tmltranslator rundse remotesimulator webcrawler
@cp $(TTOOL_BUILD)/* $(DESTDIR)/bin
# ========================================
......
This diff is collapsed.
......@@ -22,6 +22,11 @@ make all
If the compilation fails with the following error: 'unmappable character for encoding ASCII', you need to do, before the compilation process:
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
* Installing TTool once compiled
make install
This installs all necessary files in bin/
* Generating a release:
make release
......
......@@ -132,10 +132,11 @@ public class ActionPerformer {
mgui.lastDiag();
} else if (command.equals(mgui.actions[TGUIAction.ACT_ABOUT].getActionCommand())) {
mgui.aboutVersion();
}
} else if (command.equals(mgui.actions[TGUIAction.FIRST_DIAGRAM].getActionCommand())) {
mgui.firstDiag();
//@author: Huy TRUONG.
//open a external search box for ACT_EXTERNAL_SEARCH
else if (command.equals(mgui.actions[TGUIAction.ACT_EXTERNAL_SEARCH].getActionCommand())) {
} else if (command.equals(mgui.actions[TGUIAction.ACT_EXTERNAL_SEARCH].getActionCommand())) {
mgui.showExternalSearch();}
else if (command.equals(mgui.actions[TGUIAction.ACT_INTERNAL_SEARCH].getActionCommand())) {
mgui.doInternalSearch();
......
......@@ -109,6 +109,8 @@ public class JToolBarMainTurtle extends JToolBar implements ActionListener
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.MOVE_ENABLED]);
button.addMouseListener(mgui.mouseHandler);
button = add(mgui.actions[TGUIAction.FIRST_DIAGRAM]);
button.addMouseListener(mgui.mouseHandler);
addSeparator();
......
......@@ -1517,6 +1517,14 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
return tabs;
}
public void firstDiag() {
TURTLEPanel tp = getCurrentTURTLEPanel();
if (tp == null) {
return;
}
tp.tabbedPane.setSelectedIndex(0);
}
public String getTitleOf(TDiagramPanel _tdp) {
TURTLEPanel panel;
for(int i=0; i<tabs.size(); i++) {
......@@ -2881,7 +2889,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
actions[TGUIAction.ACT_SHOW_ZOOM].setName(TGUIAction.ACT_SHOW_ZOOM, s);
}
public void firstDiag() {
public void oldFirstDiag() {
getCurrentJTabbedPane().setSelectedIndex(0);
}
......
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
*
* ludovic.apvrille AT enst.fr
*
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
......@@ -31,7 +31,7 @@
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*/
......@@ -46,17 +46,17 @@ import common.ConfigurationTTool;
import myutil.TraceManager;
/**
* Class ModeManager
* Managing modes in TTool (icon/action activation)
* Created for refactoring of MainGUI
* Creation: 19/02/2017
* @version 1.0 19/02/2017
* @author Ludovic APVRILLE
* Class ModeManager
* Managing modes in TTool (icon/action activation)
* Created for refactoring of MainGUI
* Creation: 19/02/2017
* @version 1.0 19/02/2017
* @author Ludovic APVRILLE
*/
public class ModeManager {
public static void setMode(byte mode, TGUIAction [] actions, JToolBarMainTurtle mainBar, MainGUI mgui) {
switch(mode) {
switch(mode) {
case MainGUI.NOT_OPENED:
mgui.activeActions(false);
actions[TGUIAction.ACT_NEW].setEnabled(true);
......@@ -122,7 +122,8 @@ public class ModeManager {
actions[TGUIAction.ACT_DELETE].setEnabled(false);
actions[TGUIAction.ACT_SUPPR].setEnabled(false);
actions[TGUIAction.MOVE_ENABLED].setEnabled(false);
actions[TGUIAction.FIRST_DIAGRAM].setEnabled(true);
if (mainBar != null) {
mainBar.activateSearch(true);
}
......@@ -138,11 +139,11 @@ public class ModeManager {
actions[TGUIAction.ACT_GEN_LOTOS].setEnabled(true);
actions[TGUIAction.ACT_DSE].setEnabled(true);
if (mgui.getCurrentTURTLEPanel() instanceof TMLComponentDesignPanel){
actions[TGUIAction.ACT_GEN_UPPAAL].setEnabled(true);
actions[TGUIAction.ACT_GEN_UPPAAL].setEnabled(true);
}
else {
actions[TGUIAction.ACT_GEN_UPPAAL].setEnabled(false);
}
actions[TGUIAction.ACT_GEN_UPPAAL].setEnabled(false);
}
actions[TGUIAction.ACT_GEN_JAVA].setEnabled(true);
actions[TGUIAction.ACT_SIMU_JAVA].setEnabled(true);
actions[TGUIAction.ACT_GEN_RTLOTOS].setEnabled(true);
......@@ -410,7 +411,7 @@ public class ModeManager {
actions[TGUIAction.ACT_NC].setEnabled(true);
break;
case MainGUI.COMPONENT_SELECTED:
actions[TGUIAction.MOVE_ENABLED].setEnabled(true);
actions[TGUIAction.MOVE_ENABLED].setEnabled(true);
actions[TGUIAction.ACT_DELETE].setEnabled(true);
actions[TGUIAction.ACT_SUPPR].setEnabled(true);
break;
......
......@@ -617,8 +617,9 @@ public class TGUIAction extends AbstractAction {
//--
public static final int MOVE_ENABLED = 463;
public static final int FIRST_DIAGRAM = 464;
public static final int NB_ACTION = 464;
public static final int NB_ACTION = 465;
private static final TAction [] actions = new TAction[NB_ACTION];
......@@ -1229,7 +1230,8 @@ public class TGUIAction extends AbstractAction {
actions[ACT_GENERATE_ONTOLOGIES_CURRENT_SET_OF_DIAGRAMS] = new TAction("generate-ontology-current-set-of-diagrams", "Generate ontology (current set of diagrams)", IconManager.imgic338, IconManager.imgic339, "Generate ontology (current set of diagrams)", "Generate the ontology for the current set of diagrams under edition", 0);
actions[ACT_GENERATE_ONTOLOGIES_ALL_DIAGRAMS] = new TAction("generate-ontology-all-diagrams", "Generate ontology (all diagrams)", IconManager.imgic338, IconManager.imgic339, "Generate ontology (all diagrams)", "Generate the ontology for the diagrams under edition", 0);
actions[MOVE_ENABLED] = new TAction("Move", "Move enable", IconManager.imgic780, IconManager.imgic780, "Move enabled (shift + arrow)", "Move", 0);
actions[MOVE_ENABLED] = new TAction("Move", "Move enabled", IconManager.imgic780, IconManager.imgic780, "Move enabled (shift + arrow)", "Move", 0);
actions[FIRST_DIAGRAM] = new TAction("FirstDiagram", "First Diagram", IconManager.imgic142, IconManager.imgic142, "Switch the the first diagram", "Switch to the first diagram", 0);
}
......
......@@ -37,8 +37,6 @@
*/
package ui;
import myutil.GenericTree;
......
......@@ -75,6 +75,9 @@ public class IconManager {
public static ImageIcon imgic80, imgic82, imgic84, imgic86, imgic88, imgic89;
public static ImageIcon imgic90, imgic92, imgic94, imgic96, imgic98, imgic99;
public static ImageIcon imgic142;
// Class diagram
public static ImageIcon imgic100, imgic101, imgic102, imgic104, imgic106, imgic108;
public static ImageIcon imgic110, imgic112, imgic114, imgic116, imgic118;
......@@ -309,6 +312,7 @@ public class IconManager {
private static String icon136 = "cdtogglesyn.gif";
private static String icon138 = "adtogglejava.gif";
private static String icon140 = "avatarfv.png";
private static String icon142 = "toolbarButtonGraphics/navigation/Home16.gif";
private static String icon200 = "toolbarButtonGraphics/general/Properties16.gif";
private static String icon201 = "toolbarButtonGraphics/general/Properties24.gif";
......@@ -772,6 +776,7 @@ public class IconManager {
imgic136 = getIcon(icon136);
imgic138 = getIcon(icon138);
imgic140 = getIcon(icon140);
imgic142 = getIcon(icon142);
imgic200 = getIcon(icon200);
imgic201 = getIcon(icon201);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment