mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-13 14:56:29 -04:00
fixed some checkstyle issues
This commit is contained in:
parent
fcc5e8dfad
commit
010c4574a1
@ -99,7 +99,7 @@ public class ExpressionCreator {
|
||||
listener.close();
|
||||
time = System.currentTimeMillis() - time;
|
||||
LOGGER.debug("time: " + time / 1000.0 + " sec");
|
||||
if (progressListener!=null)
|
||||
if (progressListener != null)
|
||||
progressListener.complete();
|
||||
}
|
||||
|
||||
@ -130,6 +130,12 @@ public class ExpressionCreator {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the progress listener to use
|
||||
*
|
||||
* @param progressListener the progress listener
|
||||
* @return this for chained calls
|
||||
*/
|
||||
public ExpressionCreator setProgressListener(ProgressListener progressListener) {
|
||||
this.progressListener = progressListener;
|
||||
return this;
|
||||
@ -169,7 +175,7 @@ public class ExpressionCreator {
|
||||
long time = System.currentTimeMillis();
|
||||
getMinimizer(localVars.size()).minimize(localVars, boolTable, resultName, listener);
|
||||
LOGGER.info("finished job with complexity " + getComplexity() + ": " + (System.currentTimeMillis() - time) / 1000 + "sec");
|
||||
if (progressListener!=null)
|
||||
if (progressListener != null)
|
||||
progressListener.oneCompleted();
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,9 @@ import de.neemann.gui.Screen;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* A simple progress dialog which is used by the {@link ExpressionCreator}
|
||||
*/
|
||||
public class ProgressDialog extends JDialog implements ExpressionCreator.ProgressListener {
|
||||
private final JProgressBar bar;
|
||||
private int prog;
|
||||
@ -21,14 +24,14 @@ public class ProgressDialog extends JDialog implements ExpressionCreator.Progres
|
||||
* @param tableDialog the table dialog
|
||||
*/
|
||||
public ProgressDialog(TableDialog tableDialog) {
|
||||
super(tableDialog,false);
|
||||
super(tableDialog, false);
|
||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
|
||||
bar = new JProgressBar(0, tableDialog.getModel().getTable().getResultCount());
|
||||
int b = Screen.getInstance().getFontSize();
|
||||
bar.setBorder(BorderFactory.createEmptyBorder(b,b,b,b));
|
||||
bar.setBorder(BorderFactory.createEmptyBorder(b, b, b, b));
|
||||
final JLabel label = new JLabel(Lang.get("msg_optimizationInProgress"));
|
||||
label.setBorder(BorderFactory.createEmptyBorder(b,b,0,b));
|
||||
label.setBorder(BorderFactory.createEmptyBorder(b, b, 0, b));
|
||||
getContentPane().add(label, BorderLayout.NORTH);
|
||||
getContentPane().add(bar, BorderLayout.SOUTH);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user