fixed some checkstyle issues

This commit is contained in:
hneemann 2019-06-20 23:53:54 +02:00
parent da3f0b2b0e
commit 4d95d67745

View File

@ -17,6 +17,9 @@ import java.awt.geom.Point2D;
import static de.neemann.digital.draw.shapes.GenericShape.SIZE;
/**
* A scroll panel used by the circuit component
*/
public class CircuitScrollPanel extends JPanel {
private static final int BORDER = SIZE * 10;
private final CircuitComponent circuitComponent;
@ -25,6 +28,11 @@ public class CircuitScrollPanel extends JPanel {
private GraphicMinMax graphicMinMax;
private AffineTransform transform;
/**
* Creates a new instance
*
* @param circuitComponent the circuit component to use
*/
public CircuitScrollPanel(CircuitComponent circuitComponent) {
super(new BorderLayout());
horizontal = new JScrollBar(JScrollBar.HORIZONTAL);
@ -64,10 +72,15 @@ public class CircuitScrollPanel extends JPanel {
void sizeChanged() {
graphicMinMax = null;
if (transform!=null)
if (transform != null)
updateBars();
}
/**
* Updates the transformation
*
* @param transform the transform
*/
void transformChanged(AffineTransform transform) {
this.transform = transform;
updateBars();