|
@@ -71,7 +71,9 @@ import classes.IdCounter;
|
|
|
import classes.IdCounterElem;
|
|
|
import interfaces.CategoryListener;
|
|
|
import ui.controller.Control;
|
|
|
-import ui.model.Model;;
|
|
|
+import ui.model.Model;
|
|
|
+import ui.view.Languages;
|
|
|
+import javax.swing.JList;
|
|
|
|
|
|
|
|
|
* Graphical User Interface.
|
|
@@ -198,6 +200,8 @@ public class GUI<E> implements CategoryListener {
|
|
|
private final JToolBar toolBarHolonEl = new JToolBar();
|
|
|
private final JToolBar toolBarGraph = new JToolBar();
|
|
|
|
|
|
+ private final Languages languages = new Languages();
|
|
|
+
|
|
|
|
|
|
private boolean dragging = false;
|
|
|
private String actualObjectClicked;
|
|
@@ -229,6 +233,7 @@ public class GUI<E> implements CategoryListener {
|
|
|
private final JMenuItem mntmFindReplace = new JMenuItem("Find/ Replace");
|
|
|
private final JMenuItem mntmEditShowedInformation = new JMenuItem("Edit showed Information");
|
|
|
private final JMenuItem mntmResetCategory = new JMenuItem("Reset Categories");
|
|
|
+ private final JMenu mnLanguage = new JMenu("Language");
|
|
|
|
|
|
|
|
|
* Create the application.
|
|
@@ -549,6 +554,8 @@ public class GUI<E> implements CategoryListener {
|
|
|
menuBar.add(mnHelp);
|
|
|
|
|
|
mnHelp.add(aboutUs);
|
|
|
+
|
|
|
+ mnNewMenuOptions.add(mnLanguage);
|
|
|
|
|
|
canvas.setBackground(Color.WHITE);
|
|
|
canvas.setPreferredSize(new Dimension(model.getCanvasX(), model.getCanvasY()));
|
|
@@ -1305,14 +1312,6 @@ public class GUI<E> implements CategoryListener {
|
|
|
|
|
|
@Override
|
|
|
public void actionPerformed(ActionEvent arg0) {
|
|
|
- if (model.getObjectsOnCanvas().size() != 0) {
|
|
|
- int newWarning = JOptionPane.YES_NO_OPTION;
|
|
|
- int dialogForNewWarning = JOptionPane.showConfirmDialog(null, "Do you want to save the old data?",
|
|
|
- "Warning", newWarning);
|
|
|
- if (dialogForNewWarning == JOptionPane.YES_OPTION) {
|
|
|
- mntmSave.doClick();
|
|
|
- }
|
|
|
- }
|
|
|
model.getEdgesOnCanvas().removeAll(model.getEdgesOnCanvas());
|
|
|
model.getObjectsOnCanvas().removeAll(model.getObjectsOnCanvas());
|
|
|
controller.setSelectedObjectID(0);
|
|
@@ -1491,7 +1490,9 @@ public class GUI<E> implements CategoryListener {
|
|
|
splitPaneCanvasConsole.setRightComponent(console);
|
|
|
splitPane1.setLeftComponent(splitPaneCanvasConsole);
|
|
|
splitPane1.setRightComponent(splitHolonElPro);
|
|
|
-
|
|
|
+
|
|
|
+ splitPane1.setResizeWeight(0.9);
|
|
|
+
|
|
|
splitHolonElPro.setDividerLocation(400);
|
|
|
splitHolonElPro.setTopComponent(splitGraphHolonEl);
|
|
|
splitHolonElPro.setBottomComponent(scrollProperties);
|
|
@@ -1821,5 +1822,19 @@ public class GUI<E> implements CategoryListener {
|
|
|
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ * Languages Mode
|
|
|
+ */
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|