Puck detection dialog is maximized
This commit is contained in:
@@ -53,16 +53,7 @@ public class PuckLoadingDialog extends JDialog {
|
||||
if (!showBasePlate){
|
||||
splitPanel.setDividerLocation(0);
|
||||
}
|
||||
if (!showBasePlate && !persist){
|
||||
Rectangle bounds = parent.getBounds();
|
||||
int width = bounds.width / 3;
|
||||
int height = bounds.height;
|
||||
int x = bounds.x + bounds.width - width;
|
||||
int y = bounds.y;
|
||||
setBounds(x, y, width, height);
|
||||
} else {
|
||||
setLocationRelativeTo(parent);
|
||||
}
|
||||
setLocationRelativeTo(parent);
|
||||
}
|
||||
|
||||
public BasePlatePanel getBasePlatePanel(){
|
||||
@@ -84,23 +75,34 @@ public class PuckLoadingDialog extends JDialog {
|
||||
super.setVisible(visible);
|
||||
|
||||
if ( visible){
|
||||
if (persist){
|
||||
try {
|
||||
MainFrame.restore(PuckLoadingDialog.this, dialogPersistPath);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(DataPanel.class.getName()).log(Level.WARNING, null, ex);
|
||||
}
|
||||
} else {
|
||||
if(showBasePlate){
|
||||
Rectangle bounds = getParent().getBounds();
|
||||
setSize(new Dimension(bounds.width * 3 / 4, bounds.height * 3 / 4));
|
||||
setLocationRelativeTo(getParent());
|
||||
}
|
||||
}
|
||||
restore();
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void restore(){
|
||||
if (persist){
|
||||
try {
|
||||
MainFrame.restore(PuckLoadingDialog.this, dialogPersistPath);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(DataPanel.class.getName()).log(Level.WARNING, null, ex);
|
||||
}
|
||||
} else {
|
||||
Rectangle bounds = getParent().getBounds();
|
||||
if(showBasePlate){
|
||||
//setSize(new Dimension(bounds.width * 3 / 4, bounds.height * 3 / 4));
|
||||
//setLocationRelativeTo(getParent());
|
||||
setBounds(bounds);
|
||||
} else {
|
||||
int width = bounds.width / 3;
|
||||
int height = bounds.height;
|
||||
int x = bounds.x + bounds.width - width;
|
||||
int y = bounds.y;
|
||||
setBounds(x, y, width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void update() {
|
||||
Map dms = Controller.getInstance().getPuckDatamatrixInfo();
|
||||
|
||||
Reference in New Issue
Block a user