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);
}
......
......@@ -122,6 +122,7 @@ 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);
......
......@@ -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