mirror of https://github.com/rusefi/RomRaider.git
Fixed table window sizing issues
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@499 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
337f613ac4
commit
8783528c6c
|
@ -275,7 +275,8 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
|
|||
// table is already open, so set focus
|
||||
frame.requestFocus();
|
||||
}
|
||||
frame.setSize(frame.getTable().getFrameSize());
|
||||
//frame.setSize(frame.getTable().getFrameSize());
|
||||
frame.pack();
|
||||
rightPanel.repaint();
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
|
|||
public DataCell() {
|
||||
}
|
||||
|
||||
public DataCell(Scale scale) {
|
||||
public DataCell(Scale scale, Dimension size) {
|
||||
this.scale = scale;
|
||||
this.setHorizontalAlignment(CENTER);
|
||||
this.setVerticalAlignment(CENTER);
|
||||
|
@ -69,6 +69,7 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
|
|||
this.setOpaque(true);
|
||||
this.setVisible(true);
|
||||
this.addMouseListener(this);
|
||||
this.setPreferredSize(size);
|
||||
}
|
||||
|
||||
public void updateDisplayValue() {
|
||||
|
|
|
@ -159,7 +159,8 @@ public class Rom implements Serializable {
|
|||
// apply settings to tables
|
||||
for (int i = 0; i < tables.size(); i++) {
|
||||
tables.get(i).applyColorSettings(container.getSettings());
|
||||
tables.get(i).resize();
|
||||
//tables.get(i).resize();
|
||||
tables.get(i).getFrame().pack();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
if (data[i] == null) {
|
||||
data[i] = new DataCell(scales.get(scaleIndex));
|
||||
data[i] = new DataCell(scales.get(scaleIndex), settings.getCellSize());
|
||||
data[i].setTable(this);
|
||||
|
||||
// populate data cells
|
||||
|
@ -643,7 +643,8 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
|
||||
public void setFrame(TableFrame frame) {
|
||||
this.frame = frame;
|
||||
frame.setSize(getFrameSize());
|
||||
//frame.setSize(getFrameSize());
|
||||
frame.pack();
|
||||
}
|
||||
|
||||
public Dimension getFrameSize() {
|
||||
|
@ -1028,7 +1029,8 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
}
|
||||
|
||||
public void resize() {
|
||||
frame.setSize(getFrameSize());
|
||||
//frame.setSize(getFrameSize());
|
||||
frame.pack();
|
||||
}
|
||||
|
||||
public Color getMaxColor() {
|
||||
|
|
|
@ -143,7 +143,7 @@ public class Table3D extends Table {
|
|||
for (int x = 0; x < yAxis.getDataSize(); x++) {
|
||||
centerPanel.add(yAxis.getDataCell(x));
|
||||
for (int y = 0; y < xAxis.getDataSize(); y++) {
|
||||
data[y][x] = new DataCell(scales.get(scaleIndex));
|
||||
data[y][x] = new DataCell(scales.get(scaleIndex), settings.getCellSize());
|
||||
data[y][x].setTable(this);
|
||||
|
||||
// populate data cells
|
||||
|
@ -330,7 +330,8 @@ public class Table3D extends Table {
|
|||
this.frame = frame;
|
||||
xAxis.setFrame(frame);
|
||||
yAxis.setFrame(frame);
|
||||
frame.setSize(getFrameSize());
|
||||
//frame.setSize(getFrameSize());
|
||||
frame.pack();
|
||||
}
|
||||
|
||||
public Dimension getFrameSize() {
|
||||
|
|
Loading…
Reference in New Issue