|
@@ -1,6 +1,5 @@
|
|
|
package ui.view;
|
|
|
|
|
|
-import java.awt.EventQueue;
|
|
|
import java.io.File;
|
|
|
import java.util.ArrayList;
|
|
|
|
|
@@ -9,8 +8,6 @@ import javax.swing.JMenuBar;
|
|
|
import javax.swing.JMenu;
|
|
|
import javax.swing.JMenuItem;
|
|
|
import javax.swing.JOptionPane;
|
|
|
-import javax.swing.UIManager;
|
|
|
-import javax.swing.UnsupportedLookAndFeelException;
|
|
|
import javax.swing.JTree;
|
|
|
import javax.swing.BoxLayout;
|
|
|
import javax.swing.JSplitPane;
|
|
@@ -31,37 +28,18 @@ import javax.swing.JFileChooser;
|
|
|
import javax.swing.table.DefaultTableModel;
|
|
|
|
|
|
import java.awt.Color;
|
|
|
-import java.awt.Component;
|
|
|
-import java.awt.Window.Type;
|
|
|
-
|
|
|
-import javax.swing.JInternalFrame;
|
|
|
-
|
|
|
import java.awt.BorderLayout;
|
|
|
|
|
|
import javax.swing.JPanel;
|
|
|
-import javax.swing.JTextField;
|
|
|
import javax.swing.JToolBar;
|
|
|
import javax.swing.JButton;
|
|
|
-import javax.swing.JList;
|
|
|
-import javax.swing.ListSelectionModel;
|
|
|
import javax.swing.TransferHandler;
|
|
|
-import javax.swing.AbstractListModel;
|
|
|
-
|
|
|
-import java.awt.Choice;
|
|
|
-
|
|
|
import javax.swing.JComboBox;
|
|
|
import javax.swing.DefaultComboBoxModel;
|
|
|
-import javax.swing.GroupLayout;
|
|
|
-import javax.swing.GroupLayout.Alignment;
|
|
|
import javax.swing.Icon;
|
|
|
import javax.swing.ImageIcon;
|
|
|
|
|
|
import Interfaces.CategoryListener;
|
|
|
-import javafx.util.Pair;
|
|
|
-
|
|
|
-import java.awt.GridBagLayout;
|
|
|
-import java.awt.GridBagConstraints;
|
|
|
-import java.awt.Font;
|
|
|
import java.awt.event.ActionListener;
|
|
|
import java.awt.event.MouseAdapter;
|
|
|
import java.awt.event.ActionEvent;
|
|
@@ -188,7 +166,6 @@ public class GUI implements CategoryListener {
|
|
|
tree.setEditable(true);
|
|
|
|
|
|
Icon icon = new ImageIcon(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage().getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH));
|
|
|
-
|
|
|
DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer)tree.getCellRenderer();
|
|
|
renderer.setLeafIcon(icon);
|
|
|
|
|
@@ -196,6 +173,9 @@ public class GUI implements CategoryListener {
|
|
|
tree.setRowHeight(icon.getIconHeight());
|
|
|
tree.setCellRenderer(renderer);
|
|
|
|
|
|
+
|
|
|
+ TransferHandler transfer = new TransferHandler("text");
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -216,8 +196,9 @@ public class GUI implements CategoryListener {
|
|
|
});*/
|
|
|
tree.addMouseListener(new MouseAdapter(){
|
|
|
public void mouseClicked(MouseEvent e){
|
|
|
- Pair<Integer,Integer> xy = new Pair<Integer, Integer>((int)canvas.getMousePosition().getX(),(int)canvas.getMousePosition().getY());
|
|
|
- canvas.choords.add(xy);
|
|
|
+ HolonObject h = new HolonObject("House");
|
|
|
+ h.setPos((int)canvas.getMousePosition().getX(),(int)canvas.getMousePosition().getY());
|
|
|
+ canvas.choords.add(h);
|
|
|
canvas.repaint();
|
|
|
}
|
|
|
});
|