mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fixed Layout issues where components were only partly visible
Former-commit-id: 518b72093d38a7692c7c7707f5fe9f663477ec9d
This commit is contained in:
parent
3939380b5e
commit
8a9c052e8d
@ -1 +1 @@
|
||||
e81048005035c3bc370c6b2141998c1b379e1a7b
|
||||
8b85d78801cd11fdefd0d389d61e2c9e5a50ad03
|
@ -26,7 +26,7 @@ public class Main {
|
||||
// Create a frame for the configuration panel
|
||||
JFrame frame = new JFrame();
|
||||
frame.setTitle("Hyperion configuration Tool");
|
||||
frame.setSize(1300, 620);
|
||||
frame.setSize(1300, 700);
|
||||
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frame.setIconImage(new ImageIcon(Main.class.getResource("HyperConIcon_64.png")).getImage());
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.hyperion.hypercon.gui;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.Observable;
|
||||
@ -120,7 +119,6 @@ public class ConfigPanel extends JPanel {
|
||||
private JPanel getSpecificationPanel() {
|
||||
if (mSpecificationPanel == null) {
|
||||
mSpecificationPanel = new JPanel();
|
||||
mSpecificationPanel.setPreferredSize(new Dimension(300, 200));
|
||||
mSpecificationPanel.setLayout(new BoxLayout(mSpecificationPanel, BoxLayout.Y_AXIS));
|
||||
|
||||
mConstructionPanel = new LedFramePanel(ledString.mLedFrameConfig);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.hyperion.hypercon.gui;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.Observable;
|
||||
@ -49,57 +48,37 @@ public class ImageProcessPanel extends JPanel implements Observer {
|
||||
|
||||
private void initialise() {
|
||||
mHorizontalDepthLabel = new JLabel("Horizontal depth [%]:");
|
||||
mHorizontalDepthLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mHorizontalDepthLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mHorizontalDepthLabel);
|
||||
|
||||
mHorizontalDepthSpinner = new JSpinner(new SpinnerNumberModel(5.0, 1.0, 100.0, 1.0));
|
||||
mHorizontalDepthSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mHorizontalDepthSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
mHorizontalDepthSpinner.addChangeListener(mChangeListener);
|
||||
add(mHorizontalDepthSpinner);
|
||||
|
||||
mVerticalDepthLabel = new JLabel("Vertical depth [%]:");
|
||||
mVerticalDepthLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mVerticalDepthLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mVerticalDepthLabel);
|
||||
|
||||
mVerticalDepthSpinner = new JSpinner(new SpinnerNumberModel(5.0, 1.0, 100.0, 1.0));
|
||||
mVerticalDepthSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mVerticalDepthSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
mVerticalDepthSpinner.addChangeListener(mChangeListener);
|
||||
add(mVerticalDepthSpinner);
|
||||
|
||||
mHorizontalGapLabel = new JLabel("Horizontal gap [%]:");
|
||||
mHorizontalGapLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mHorizontalGapLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mHorizontalGapLabel);
|
||||
|
||||
mHorizontalGapSpinner = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 50.0, 1.0));
|
||||
mHorizontalGapSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mHorizontalGapSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
mHorizontalGapSpinner.addChangeListener(mChangeListener);
|
||||
add(mHorizontalGapSpinner);
|
||||
|
||||
mVerticalGapLabel = new JLabel("Vertical gap [%]:");
|
||||
mVerticalGapLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mVerticalGapLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mVerticalGapLabel);
|
||||
|
||||
mVerticalGapSpinner = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 50.0, 1.0));
|
||||
mVerticalGapSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mVerticalGapSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
mVerticalGapSpinner.addChangeListener(mChangeListener);
|
||||
add(mVerticalGapSpinner);
|
||||
|
||||
mOverlapLabel = new JLabel("Overlap [%]:");
|
||||
mOverlapLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mOverlapLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mOverlapLabel);
|
||||
|
||||
mOverlapSpinner = new JSpinner(new SpinnerNumberModel(0.0, -100.0, 100.0, 1.0));
|
||||
mOverlapSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mOverlapSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
mOverlapSpinner.addChangeListener(mChangeListener);
|
||||
add(mOverlapSpinner);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.hyperion.hypercon.gui;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
@ -52,83 +51,51 @@ public class LedFramePanel extends JPanel {
|
||||
|
||||
private void initialise() {
|
||||
mTypeLabel = new JLabel("LED Type:");
|
||||
mTypeLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mTypeLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mTypeLabel);
|
||||
mTypeCombo = new JComboBox<>(DeviceType.values());
|
||||
mTypeCombo.addActionListener(mActionListener);
|
||||
mTypeCombo.setPreferredSize(new Dimension(150, 30));
|
||||
mTypeCombo.setMaximumSize(new Dimension(250, 30));
|
||||
add(mTypeCombo);
|
||||
|
||||
mTopCornerLabel = new JLabel("Led in top corners");
|
||||
mTopCornerLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mTopCornerLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mTopCornerLabel);
|
||||
mTopCornerCombo = new JComboBox<>(new Boolean[] {true, false});
|
||||
mTopCornerCombo.addActionListener(mActionListener);
|
||||
mTopCornerCombo.setPreferredSize(new Dimension(150, 30));
|
||||
mTopCornerCombo.setMaximumSize(new Dimension(250, 30));
|
||||
add(mTopCornerCombo);
|
||||
|
||||
mBottomCornerLabel = new JLabel("Led in bottom corners");
|
||||
mBottomCornerLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mBottomCornerLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mBottomCornerLabel);
|
||||
mBottomCornerCombo = new JComboBox<>(new Boolean[] {true, false});
|
||||
mBottomCornerCombo.addActionListener(mActionListener);
|
||||
mBottomCornerCombo.setPreferredSize(new Dimension(150, 30));
|
||||
mBottomCornerCombo.setMaximumSize(new Dimension(250, 30));
|
||||
add(mBottomCornerCombo);
|
||||
|
||||
mDirectionLabel = new JLabel("Direction");
|
||||
mDirectionLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mDirectionLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mDirectionLabel);
|
||||
mDirectionCombo = new JComboBox<>(LedFrameConstruction.Direction.values());
|
||||
mDirectionCombo.addActionListener(mActionListener);
|
||||
mDirectionCombo.setPreferredSize(new Dimension(150, 30));
|
||||
mDirectionCombo.setMaximumSize(new Dimension(250, 30));
|
||||
add(mDirectionCombo);
|
||||
|
||||
mHorizontalCountLabel = new JLabel("Horizontal #:");
|
||||
mHorizontalCountLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mHorizontalCountLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mHorizontalCountLabel);
|
||||
mHorizontalCountSpinner = new JSpinner(new SpinnerNumberModel(mLedFrameSpec.topLedCnt, 0, 1024, 1));
|
||||
mHorizontalCountSpinner.addChangeListener(mChangeListener);
|
||||
mHorizontalCountSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mHorizontalCountSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
add(mHorizontalCountSpinner);
|
||||
|
||||
mBottomGapCountLabel = new JLabel("Bottom Gap #:");
|
||||
mBottomGapCountLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mBottomGapCountLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mBottomGapCountLabel);
|
||||
mBottomGapCountSpinner = new JSpinner(new SpinnerNumberModel(mLedFrameSpec.topLedCnt - mLedFrameSpec.bottomLedCnt, 0, 1024, 1));
|
||||
mBottomGapCountSpinner.addChangeListener(mChangeListener);
|
||||
mBottomGapCountSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mBottomGapCountSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
add(mBottomGapCountSpinner);
|
||||
|
||||
mVerticalCountLabel = new JLabel("Vertical #:");
|
||||
mVerticalCountLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mVerticalCountLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mVerticalCountLabel);
|
||||
mVerticalCountSpinner = new JSpinner(new SpinnerNumberModel(mLedFrameSpec.rightLedCnt, 0, 1024, 1));
|
||||
mVerticalCountSpinner.addChangeListener(mChangeListener);
|
||||
mVerticalCountSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mVerticalCountSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
add(mVerticalCountSpinner);
|
||||
|
||||
mOffsetLabel = new JLabel("1st LED offset");
|
||||
mOffsetLabel.setPreferredSize(new Dimension(100, 30));
|
||||
mOffsetLabel.setMaximumSize(new Dimension(150, 30));
|
||||
add(mOffsetLabel);
|
||||
mOffsetSpinner = new JSpinner(new SpinnerNumberModel(mLedFrameSpec.firstLedOffset, Integer.MIN_VALUE, Integer.MAX_VALUE, 1));
|
||||
mOffsetSpinner.addChangeListener(mChangeListener);
|
||||
mOffsetSpinner.setPreferredSize(new Dimension(150, 30));
|
||||
mOffsetSpinner.setMaximumSize(new Dimension(250, 30));
|
||||
add(mOffsetSpinner);
|
||||
|
||||
GroupLayout layout = new GroupLayout(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user