mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 22:52:22 +00:00
Slipped in a last fix
after release to correctly size components in PamModel viewer which weren't showing on hiDef correctly.
This commit is contained in:
parent
5b1cc760d8
commit
35ee1e3dfc
@ -63,7 +63,7 @@ public class MapParametersDialog extends PamDialog {
|
||||
|
||||
private JCheckBox headingUp = new JCheckBox("Ship heading always up");
|
||||
|
||||
private JCheckBox showSurface = new JCheckBox("Show sea sueface");
|
||||
private JCheckBox showSurface = new JCheckBox("Show sea surface");
|
||||
|
||||
private MapFileManager mapFileManager;
|
||||
|
||||
@ -261,7 +261,7 @@ public class MapParametersDialog extends PamDialog {
|
||||
|
||||
public HydrophonePanel() {
|
||||
super();
|
||||
setBorder(new TitledBorder("Hydropone Options"));
|
||||
setBorder(new TitledBorder("Hydrophone Options"));
|
||||
setLayout(new GridBagLayout());
|
||||
GridBagConstraints c = new PamGridBagContraints();
|
||||
c.gridx = 0;
|
||||
@ -272,7 +272,7 @@ public class MapParametersDialog extends PamDialog {
|
||||
addComponent(this, colourByChannel, c);
|
||||
c.gridy++;
|
||||
c.gridwidth = 1;
|
||||
addComponent(this, new JLabel("Symbox size ", JLabel.RIGHT), c);
|
||||
addComponent(this, new JLabel("Symbol size ", JLabel.RIGHT), c);
|
||||
c.gridx++;
|
||||
symbolSize = new SpinnerNumberModel(Hydrophone.DefaultSymbolSize, 4, 30, 2);
|
||||
addComponent(this, symbolSizeSpinner = new JSpinner(symbolSize), c);
|
||||
|
@ -63,6 +63,7 @@ public class SettingsFileDialog extends PamDialog {
|
||||
pan.add(BorderLayout.CENTER, p);
|
||||
pan.add(BorderLayout.SOUTH, q);
|
||||
|
||||
setMoveToMouse(false);
|
||||
setDialogComponent(pan);
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ import javax.swing.JPanel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.Timer;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
@ -882,6 +883,7 @@ public class PamObjectViewer implements PamViewInterface, ComponentListener,
|
||||
blockTimer.start();
|
||||
|
||||
setVisible(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1005,6 +1007,22 @@ public class PamObjectViewer implements PamViewInterface, ComponentListener,
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(boolean vis) {
|
||||
if (vis) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
/**
|
||||
* This seems to work and resize the text fields on high def displays.
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
pack();
|
||||
}
|
||||
});
|
||||
}
|
||||
super.setVisible(vis);
|
||||
}
|
||||
|
||||
void fillPanelContent() {
|
||||
p.removeAll();
|
||||
GridBagLayout layout = new GridBagLayout();
|
||||
|
@ -64,6 +64,10 @@ abstract public class PamDialog extends JDialog {
|
||||
private boolean warnDefaultSetting = true;
|
||||
private CancelObserver cancelObserver;
|
||||
private boolean firstShowing = true;
|
||||
/*
|
||||
* Move to mouse position is parent is null
|
||||
*/
|
||||
private boolean moveToMouse = true;
|
||||
|
||||
public JPanel getButtonPanel() {
|
||||
return buttonPanel;
|
||||
@ -281,7 +285,7 @@ abstract public class PamDialog extends JDialog {
|
||||
synchronized (this) {
|
||||
PamColors.getInstance().notifyContianer(this.getContentPane());
|
||||
}
|
||||
if (getOwner() == null) {
|
||||
if (getOwner() == null && isMoveToMouse()) {
|
||||
moveToMouseLocation();
|
||||
}
|
||||
if (firstShowing) {
|
||||
@ -691,4 +695,18 @@ abstract public class PamDialog extends JDialog {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the moveToMouse
|
||||
*/
|
||||
public boolean isMoveToMouse() {
|
||||
return moveToMouse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param moveToMouse the moveToMouse to set
|
||||
*/
|
||||
public void setMoveToMouse(boolean moveToMouse) {
|
||||
this.moveToMouse = moveToMouse;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,8 +6,6 @@ import java.sql.Types;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user