diff --git a/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/cca/CyclicCellularAutomatonButtons.java b/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/cca/CyclicCellularAutomatonButtons.java index 9f6dbfda..92468b8e 100644 --- a/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/cca/CyclicCellularAutomatonButtons.java +++ b/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/cca/CyclicCellularAutomatonButtons.java @@ -5,6 +5,7 @@ import org.woehlke.computer.kurzweil.commons.GuiComponentTab; import javax.swing.*; +import javax.swing.border.CompoundBorder; import java.awt.*; @Log @@ -17,20 +18,23 @@ public class CyclicCellularAutomatonButtons extends JPanel implements GuiCompone private final String buttonLabelVonNeumann; private final String buttonLabelMoore; private final String buttonLabelWoehlke; + private final String title; private final CyclicCellularAutomatonCanvas canvas; public CyclicCellularAutomatonButtons( CyclicCellularAutomatonCanvas canvas ) { this.canvas = canvas; + this.title = this.canvas.getTabCtx().getCtx().getProperties().getCca().getView().getNeighborhood().getTitle(); this.buttonLabelVonNeumann = this.canvas.getTabCtx().getCtx().getProperties().getCca().getView().getNeighborhood().getTypeVonNeumann(); this.buttonLabelMoore =this.canvas.getTabCtx().getCtx().getProperties().getCca().getView().getNeighborhood().getTypeMoore(); this.buttonLabelWoehlke =this.canvas.getTabCtx().getCtx().getProperties().getCca().getView().getNeighborhood().getTypeWoehlke(); this.buttonVonNeumann = new JButton(this.buttonLabelVonNeumann); this.buttonMoore = new JButton(this.buttonLabelMoore ); this.buttonWoehlke = new JButton(this.buttonLabelWoehlke); + CompoundBorder border = this.canvas.getTabCtx().getCtx().getBorder( this.title); + this.setBorder(border); this.setLayout(new FlowLayout()); - this.add(new JLabel(this.canvas.getTabCtx().getCtx().getProperties().getCca().getView().getNeighborhood().getTitle())); this.add(this.buttonVonNeumann); this.add(this.buttonMoore); this.add(this.buttonWoehlke); diff --git a/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/mandelbrot/widgets/PanelZoomButtons.java b/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/mandelbrot/widgets/PanelZoomButtons.java index 1ac743c3..a8381862 100644 --- a/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/mandelbrot/widgets/PanelZoomButtons.java +++ b/allinone/src/main/java/org/woehlke/computer/kurzweil/tabs/mandelbrot/widgets/PanelZoomButtons.java @@ -20,13 +20,13 @@ public PanelZoomButtons(MandelbrotContext tabCtx) { FlowLayout layout = new FlowLayout(); String buttonsZoomOut = this.tabCtx.getCtx().getProperties().getMandelbrot().getView().getButtonsZoomOut(); String buttonsZoomLabel = this.tabCtx.getCtx().getProperties().getMandelbrot().getView().getButtonsZoomLabel(); - CompoundBorder borderPanelPushButtons = this.tabCtx.getCtx().getBorder(); + CompoundBorder borderPanelPushButtons = this.tabCtx.getCtx().getBorder(buttonsZoomLabel); this.zoomLevelFieldLabel = new JLabel(buttonsZoomLabel); this.zoomLevelField = new TextField("1",3); this.zoomOutButton = new JButton(buttonsZoomOut); this.setLayout(layout); this.setBorder(borderPanelPushButtons); - this.add(this.zoomLevelFieldLabel); + //this.add(this.zoomLevelFieldLabel); this.add(this.zoomLevelField); this.add(this.zoomOutButton); }