mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-19 21:16:30 +02:00
Enable text wrapping on the option description
This commit is contained in:
parent
02b50be782
commit
46bbc9b82e
@ -165,9 +165,11 @@ public class InstallWindow implements IUserInterface {
|
|||||||
@Override
|
@Override
|
||||||
public Future<Boolean> showOptions(List<IOptionDetails> opts) {
|
public Future<Boolean> showOptions(List<IOptionDetails> opts) {
|
||||||
CompletableFuture<Boolean> future = new CompletableFuture<>();
|
CompletableFuture<Boolean> future = new CompletableFuture<>();
|
||||||
|
EventQueue.invokeLater(() -> {
|
||||||
OptionsSelectWindow dialog = new OptionsSelectWindow(opts, future);
|
OptionsSelectWindow dialog = new OptionsSelectWindow(opts, future);
|
||||||
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
|
});
|
||||||
return future;
|
return future;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
public class OptionsSelectWindow extends JDialog implements ActionListener {
|
public class OptionsSelectWindow extends JDialog implements ActionListener {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private final JLabel lblOptionDescription;
|
private final JTextArea lblOptionDescription;
|
||||||
private final OptionTableModel tableModel;
|
private final OptionTableModel tableModel;
|
||||||
private final CompletableFuture<Boolean> future;
|
private final CompletableFuture<Boolean> future;
|
||||||
|
|
||||||
@ -71,10 +71,15 @@ public class OptionsSelectWindow extends JDialog implements ActionListener {
|
|||||||
splitPane.setLeftComponent(scrollPane);
|
splitPane.setLeftComponent(scrollPane);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
lblOptionDescription = new JLabel("Select an option...");
|
lblOptionDescription = new JTextArea("Select an option...");
|
||||||
lblOptionDescription.setBackground(UIManager.getColor("List.background"));
|
lblOptionDescription.setBackground(UIManager.getColor("List.background"));
|
||||||
lblOptionDescription.setOpaque(true);
|
lblOptionDescription.setOpaque(true);
|
||||||
lblOptionDescription.setVerticalAlignment(SwingConstants.TOP);
|
lblOptionDescription.setWrapStyleWord(true);
|
||||||
|
lblOptionDescription.setLineWrap(true);
|
||||||
|
lblOptionDescription.setOpaque(true);
|
||||||
|
lblOptionDescription.setEditable(false);
|
||||||
|
lblOptionDescription.setFocusable(false);
|
||||||
|
lblOptionDescription.setFont(UIManager.getFont("Label.font"));
|
||||||
lblOptionDescription.setBorder(new EmptyBorder(10, 10, 10, 10));
|
lblOptionDescription.setBorder(new EmptyBorder(10, 10, 10, 10));
|
||||||
JScrollPane scrollPane = new JScrollPane(lblOptionDescription);
|
JScrollPane scrollPane = new JScrollPane(lblOptionDescription);
|
||||||
scrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));
|
scrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user