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