mirror of https://github.com/rusefi/RomRaider.git
Initial 3d graph internal frame integration.
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@254 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
4bd091c2a6
commit
199c828f09
Binary file not shown.
Binary file not shown.
|
@ -50,7 +50,7 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
|
||||||
private String version = "0.3.2 Beta";
|
private String version = "0.3.2 Beta";
|
||||||
private String versionDate = "8/12/2006";
|
private String versionDate = "8/12/2006";
|
||||||
private String titleText = "Enginuity v" + version;
|
private String titleText = "Enginuity v" + version;
|
||||||
private MDIDesktopPane rightPanel = new MDIDesktopPane();
|
public MDIDesktopPane rightPanel = new MDIDesktopPane();
|
||||||
private Rom lastSelectedRom = null;
|
private Rom lastSelectedRom = null;
|
||||||
private JSplitPane splitPane = new JSplitPane();
|
private JSplitPane splitPane = new JSplitPane();
|
||||||
private ECUEditorToolBar toolBar;
|
private ECUEditorToolBar toolBar;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import javax.swing.tree.TreePath;
|
||||||
|
|
||||||
public class RomTree extends JTree implements MouseListener {
|
public class RomTree extends JTree implements MouseListener {
|
||||||
|
|
||||||
private ECUEditor container;
|
public static ECUEditor container;
|
||||||
|
|
||||||
public RomTree (DefaultMutableTreeNode input) {
|
public RomTree (DefaultMutableTreeNode input) {
|
||||||
super(input);
|
super(input);
|
||||||
|
|
|
@ -6,9 +6,12 @@ import enginuity.maps.Table;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.JInternalFrame;
|
import javax.swing.JInternalFrame;
|
||||||
|
import javax.swing.JPanel;
|
||||||
import javax.swing.event.InternalFrameEvent;
|
import javax.swing.event.InternalFrameEvent;
|
||||||
import javax.swing.event.InternalFrameListener;
|
import javax.swing.event.InternalFrameListener;
|
||||||
|
|
||||||
|
import com.ecm.graphics.Graph3dJPanel;
|
||||||
|
|
||||||
public class TableFrame extends JInternalFrame implements InternalFrameListener {
|
public class TableFrame extends JInternalFrame implements InternalFrameListener {
|
||||||
|
|
||||||
private Table table;
|
private Table table;
|
||||||
|
@ -29,6 +32,17 @@ public class TableFrame extends JInternalFrame implements InternalFrameListener
|
||||||
addInternalFrameListener(this);
|
addInternalFrameListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TableFrame(Graph3dJPanel graph3dJPanel) {
|
||||||
|
super("Test Title", true, true);
|
||||||
|
this.add(graph3dJPanel);
|
||||||
|
setFrameIcon(null);
|
||||||
|
setBorder(BorderFactory.createBevelBorder(0));
|
||||||
|
setVisible(false);
|
||||||
|
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||||
|
addInternalFrameListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public TableToolBar getToolBar() {
|
public TableToolBar getToolBar() {
|
||||||
return toolBar;
|
return toolBar;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,16 @@ import javax.swing.ImageIcon;
|
||||||
import javax.swing.InputMap;
|
import javax.swing.InputMap;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JDesktopPane;
|
||||||
import javax.swing.JFormattedTextField;
|
import javax.swing.JFormattedTextField;
|
||||||
|
import javax.swing.JInternalFrame;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
import javax.swing.JToolBar;
|
import javax.swing.JToolBar;
|
||||||
import javax.swing.KeyStroke;
|
import javax.swing.KeyStroke;
|
||||||
import javax.swing.border.LineBorder;
|
import javax.swing.border.LineBorder;
|
||||||
|
|
||||||
|
import com.ecm.graphics.Graph3dJPanel;
|
||||||
import com.ecm.graphics.Graph3dManager;
|
import com.ecm.graphics.Graph3dManager;
|
||||||
import com.ecm.graphics.listeners.ModifiedDataListener;
|
import com.ecm.graphics.listeners.ModifiedDataListener;
|
||||||
import com.ecm.graphics.listeners.TableData;
|
import com.ecm.graphics.listeners.TableData;
|
||||||
|
@ -253,9 +256,9 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
||||||
String zLabel = ((Table3D)table).getYAxis().getName();
|
String zLabel = ((Table3D)table).getYAxis().getName();
|
||||||
String yLabel = ((Table3D)table).getCategory();
|
String yLabel = ((Table3D)table).getCategory();
|
||||||
|
|
||||||
//TODO Implement JFrame Title once again
|
Graph3dJPanel graph3dJPanel = new Graph3dJPanel(graphValues, testX, testZ,xLabel, yLabel, zLabel);
|
||||||
Graph3dManager.openGraph3dFrame(graphValues, testX, testZ,xLabel, yLabel, zLabel);
|
TableFrame frame = new TableFrame(graph3dJPanel);
|
||||||
Graph3dManager.addListener(this);
|
RomTree.container.displayTable(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -314,6 +317,7 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
||||||
// ******************************************
|
// ******************************************
|
||||||
// Code for listening to graph3d data changes
|
// Code for listening to graph3d data changes
|
||||||
// ******************************************
|
// ******************************************
|
||||||
|
// TODO Tie into Enginuity 2d table values
|
||||||
public void newGraphData(Vector data) {
|
public void newGraphData(Vector data) {
|
||||||
|
|
||||||
System.out.println("New data recieved at the client \n*********************");
|
System.out.println("New data recieved at the client \n*********************");
|
||||||
|
@ -323,8 +327,26 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
|
||||||
while(modDataListenerIterator.hasNext()){
|
while(modDataListenerIterator.hasNext()){
|
||||||
TableData td = (TableData)modDataListenerIterator.next();
|
TableData td = (TableData)modDataListenerIterator.next();
|
||||||
System.out.println("X:"+td.getX()+" Z:"+td.getZ()+" VALUE:"+td.getValue());
|
System.out.println("X:"+td.getX()+" Z:"+td.getZ()+" VALUE:"+td.getValue());
|
||||||
|
|
||||||
|
Table3D table3d = (Table3D)table;
|
||||||
|
table3d.selectCellAt(td.getX(), table3d.getSizeY() - td.getZ() - 1);
|
||||||
|
|
||||||
|
//Set the value
|
||||||
|
table.setRealValue(td.getValue()+"");
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("*********************");
|
System.out.println("*********************");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cellSelected(int x, int z){
|
||||||
|
//Set cell to be selected
|
||||||
|
Table3D table3d = (Table3D)table;
|
||||||
|
table3d.selectCellAt(x, table3d.getSizeY() - z - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void cellDeSelected(int x, int z){
|
||||||
|
//Set cell de selected
|
||||||
|
Table3D table3d = (Table3D)table;
|
||||||
|
table3d.selectCellAt(x, table3d.getSizeY() - z - 1);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue