horizontal fill

This commit is contained in:
rusefillc 2022-01-27 22:43:17 -05:00
parent caed05d4c2
commit 63600e33e7
2 changed files with 9 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import com.rusefi.ldmp.StateDictionary;
import com.rusefi.livedata.LiveDataParserPanel;
import com.rusefi.ui.util.UiUtils;
import com.rusefi.ui.widgets.IntGaugeLabel;
import net.miginfocom.swing.MigLayout;
import org.jetbrains.annotations.NotNull;
import org.putgemin.VerticalFlowLayout;
@ -16,6 +17,8 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.rusefi.autoupdate.AutoupdateUtil.wrap;
/**
* Andrey Belomutskiy, (c) 2013-2020
@ -34,7 +37,8 @@ public class LiveDataPane {
public LiveDataPane(UIContext uiContext) {
JPanel vertical = new JPanel(new VerticalFlowLayout());
JPanel vertical = new JPanel(new MigLayout("wrap 1", "[grow,fill]"));
vertical.setBorder(BorderFactory.createLineBorder(Color.orange));
JScrollPane scroll = new JScrollPane(vertical, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
JPanel legend = populateLegend();
@ -53,7 +57,7 @@ public class LiveDataPane {
});
leftList.add(shortCut);
vertical.add(liveDataParserContent);
vertical.add(liveDataParserContent, "grow, wrap");
}
content.add(leftList, BorderLayout.WEST);

View File

@ -2,9 +2,11 @@ package com.rusefi.ui;
import com.rusefi.ui.util.FrameHelper;
import javax.swing.*;
public class LiveDataPaneSandbox {
public static void main(String[] args) {
UIContext uiContext = new UIContext();
new FrameHelper().showFrame(new LiveDataPane(uiContext).getContent());
new FrameHelper(WindowConstants.EXIT_ON_CLOSE).showFrame(new LiveDataPane(uiContext).getContent());
}
}