UI enhancements
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dmitry Isaenko 2023-09-12 16:07:13 +03:00
parent ab47f1c960
commit 3c391cf1d3
5 changed files with 99 additions and 82 deletions

View file

@ -34,7 +34,7 @@ public class Main {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Image img = new ImageIcon(Objects.requireNonNull(MainAppUi.class.getClassLoader().getResource("tray_icon.gif"))).getImage();
frame.setIconImage(img);
frame.setMinimumSize(new Dimension(700, 300));
frame.setMinimumSize(new Dimension(700, 350));
//frame.setResizable(false);
frame.setVisible(true);
}

View file

@ -2,6 +2,7 @@
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="tihwin.MainAppUi">
<grid id="27dc6" binding="mainPanel" layout-manager="FormLayout">
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:m:grow"/>
<rowspec value="top:4dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:4dlu:noGrow"/>
@ -10,9 +11,10 @@
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:4dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:p:grow"/>
<rowspec value="top:4dlu:noGrow"/>
<rowspec value="center:max(d;4px):noGrow"/>
<rowspec value="top:4dlu:noGrow"/>
<rowspec value="center:max(d;1dlu):noGrow"/>
<colspec value="fill:p:noGrow"/>
<colspec value="left:4dlu:noGrow"/>
<colspec value="fill:p:noGrow"/>
@ -23,14 +25,14 @@
<colspec value="left:4dlu:noGrow"/>
<colspec value="fill:p:noGrow"/>
<constraints>
<xy x="0" y="0" width="729" height="288"/>
<xy x="0" y="0" width="763" height="488"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="3f7d8" class="javax.swing.JButton" binding="diskImageSelectBtn">
<constraints>
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<forms top="0" left="5" bottom="0" right="0" defaultalign-vert="false"/>
</constraints>
<properties>
@ -40,7 +42,7 @@
</component>
<component id="8e185" class="javax.swing.JTextField" binding="titleField">
<constraints>
<grid row="4" column="6" row-span="1" col-span="3" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="1" use-parent-layout="false">
<grid row="5" column="6" row-span="1" col-span="3" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="1" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
<forms top="0" left="0" bottom="0" right="5"/>
@ -49,7 +51,7 @@
</component>
<component id="b32ec" class="javax.swing.JLabel" binding="destinationDirectoryLbl">
<constraints>
<grid row="6" column="6" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="7" column="6" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -58,7 +60,7 @@
</component>
<component id="43fa" class="javax.swing.JLabel" binding="diskImageNameLbl">
<constraints>
<grid row="2" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="3" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -67,7 +69,7 @@
</component>
<component id="fbb6" class="javax.swing.JButton" binding="destinationSelectBtn">
<constraints>
<grid row="6" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="7" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<forms top="0" left="5" bottom="0" right="0"/>
</constraints>
<properties>
@ -77,7 +79,7 @@
</component>
<component id="ed01c" class="javax.swing.JLabel" binding="ulDestinationRoLbl">
<constraints>
<grid row="6" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="7" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -86,7 +88,7 @@
</component>
<component id="778d6" class="javax.swing.JLabel" binding="diskImageRoLbl">
<constraints>
<grid row="2" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="3" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -95,7 +97,7 @@
</component>
<component id="cbd88" class="javax.swing.JLabel" binding="titleRoLbl">
<constraints>
<grid row="4" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="5" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -104,7 +106,7 @@
</component>
<component id="a214f" class="javax.swing.JRadioButton" binding="CDRadioButton" default-binding="true">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -113,7 +115,7 @@
</component>
<component id="1dd66" class="javax.swing.JRadioButton" binding="DVDRadioButton" default-binding="true">
<constraints>
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="5" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
@ -123,7 +125,7 @@
</component>
<component id="308a4" class="javax.swing.JButton" binding="convertBtn">
<constraints>
<grid row="8" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
<grid row="9" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="-1" height="50"/>
</grid>
<forms top="0" left="5" bottom="0" right="5"/>
@ -133,37 +135,14 @@
<text resource-bundle="locale" key="ConvertBtn"/>
</properties>
</component>
<grid id="8b0eb" binding="statusJPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="5" left="5" bottom="5" right="5"/>
<constraints>
<grid row="11" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
<background color="-1"/>
</properties>
<border type="none">
<color color="-4473925"/>
</border>
<children>
<component id="2cf16" class="javax.swing.JLabel" binding="statusLbl">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="locale" key="WelcomeText"/>
</properties>
</component>
</children>
</grid>
<component id="be17f" class="javax.swing.JProgressBar" binding="progressBar" default-binding="true">
<constraints>
<grid row="10" column="0" row-span="1" col-span="7" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<forms defaultalign-horz="false"/>
<grid row="11" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="6" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
<forms defaultalign-horz="false" defaultalign-vert="false"/>
</constraints>
<properties>
<borderPainted value="false"/>
<foreground color="-9251843"/>
<foreground color="-26368"/>
<indeterminate value="false"/>
</properties>
</component>
@ -189,9 +168,12 @@
</component>
<component id="92f10" class="javax.swing.JComboBox" binding="ulLangComboBox" custom-create="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="9" fill="1" indent="0" use-parent-layout="false"/>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="9" fill="1" indent="1" use-parent-layout="false"/>
</constraints>
<properties/>
<properties>
<background color="-9251843"/>
<foreground color="-1"/>
</properties>
<clientProperties>
<html.disable class="java.lang.Boolean" value="false"/>
</clientProperties>
@ -200,7 +182,7 @@
</grid>
<component id="824ea" class="javax.swing.JButton" binding="ulCfgBtn">
<constraints>
<grid row="2" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="3" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<forms top="0" left="0" bottom="0" right="5"/>
</constraints>
<properties>
@ -211,6 +193,29 @@
<text resource-bundle="locale" key="editUlCfgBtn"/>
</properties>
</component>
<grid id="8b0eb" binding="statusJPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="5" left="5" bottom="5" right="5"/>
<constraints>
<grid row="13" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<forms/>
</constraints>
<properties>
<background color="-1"/>
</properties>
<border type="none">
<color color="-4473925"/>
</border>
<children>
<component id="2cf16" class="javax.swing.JLabel" binding="statusLbl">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="locale" key="WelcomeText"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
<buttonGroups>

View file

@ -227,6 +227,11 @@ public class MainAppUi extends JFrame {
ulCfgBtn.setText(resourceBundle.getString("editUlCfgBtn"));
}
private void createUIComponents() {
this.ulLangComboBox = new LanguageComboBox();
ulLangComboBox.addActionListener(e -> onLanguageChanged());
}
/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
@ -237,56 +242,49 @@ public class MainAppUi extends JFrame {
private void $$$setupUI$$$() {
createUIComponents();
mainPanel = new JPanel();
mainPanel.setLayout(new FormLayout("fill:p:noGrow,left:4dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:p:noGrow,fill:max(d;4px):noGrow,fill:d:grow,left:4dlu:noGrow,fill:p:noGrow", "center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:p:grow,top:4dlu:noGrow,center:max(d;4px):noGrow"));
mainPanel.setLayout(new FormLayout("fill:p:noGrow,left:4dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:p:noGrow,fill:max(d;4px):noGrow,fill:d:grow,left:4dlu:noGrow,fill:p:noGrow", "center:max(d;4px):noGrow,top:m:grow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;1dlu):noGrow"));
diskImageSelectBtn = new JButton();
diskImageSelectBtn.setBackground(new Color(-2034433));
this.$$$loadButtonText$$$(diskImageSelectBtn, this.$$$getMessageFromBundle$$$("locale", "SelectBtn"));
CellConstraints cc = new CellConstraints();
mainPanel.add(diskImageSelectBtn, new CellConstraints(1, 3, 3, 1, CellConstraints.DEFAULT, CellConstraints.CENTER, new Insets(0, 5, 0, 0)));
mainPanel.add(diskImageSelectBtn, new CellConstraints(1, 4, 3, 1, CellConstraints.DEFAULT, CellConstraints.CENTER, new Insets(0, 5, 0, 0)));
titleField = new JTextField();
mainPanel.add(titleField, new CellConstraints(7, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5)));
mainPanel.add(titleField, new CellConstraints(7, 6, 3, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5)));
destinationDirectoryLbl = new JLabel();
destinationDirectoryLbl.setText("");
mainPanel.add(destinationDirectoryLbl, cc.xyw(7, 7, 3));
mainPanel.add(destinationDirectoryLbl, cc.xyw(7, 8, 3));
diskImageNameLbl = new JLabel();
diskImageNameLbl.setText("");
mainPanel.add(diskImageNameLbl, cc.xy(7, 3));
mainPanel.add(diskImageNameLbl, cc.xy(7, 4));
destinationSelectBtn = new JButton();
destinationSelectBtn.setBackground(new Color(-2034433));
this.$$$loadButtonText$$$(destinationSelectBtn, this.$$$getMessageFromBundle$$$("locale", "SelectBtn"));
mainPanel.add(destinationSelectBtn, new CellConstraints(1, 7, 3, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));
mainPanel.add(destinationSelectBtn, new CellConstraints(1, 8, 3, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0)));
ulDestinationRoLbl = new JLabel();
this.$$$loadLabelText$$$(ulDestinationRoLbl, this.$$$getMessageFromBundle$$$("locale", "ulDestinationLbl"));
mainPanel.add(ulDestinationRoLbl, cc.xy(5, 7));
mainPanel.add(ulDestinationRoLbl, cc.xy(5, 8));
diskImageRoLbl = new JLabel();
this.$$$loadLabelText$$$(diskImageRoLbl, this.$$$getMessageFromBundle$$$("locale", "DiskImageLbl"));
mainPanel.add(diskImageRoLbl, cc.xy(5, 3));
mainPanel.add(diskImageRoLbl, cc.xy(5, 4));
titleRoLbl = new JLabel();
this.$$$loadLabelText$$$(titleRoLbl, this.$$$getMessageFromBundle$$$("locale", "TitleLbl"));
mainPanel.add(titleRoLbl, cc.xy(5, 5));
mainPanel.add(titleRoLbl, cc.xy(5, 6));
CDRadioButton = new JRadioButton();
this.$$$loadButtonText$$$(CDRadioButton, this.$$$getMessageFromBundle$$$("locale", "CD"));
mainPanel.add(CDRadioButton, cc.xy(1, 5));
mainPanel.add(CDRadioButton, cc.xy(1, 6));
DVDRadioButton = new JRadioButton();
DVDRadioButton.setSelected(true);
this.$$$loadButtonText$$$(DVDRadioButton, this.$$$getMessageFromBundle$$$("locale", "DVD"));
mainPanel.add(DVDRadioButton, cc.xy(3, 5));
mainPanel.add(DVDRadioButton, cc.xy(3, 6));
convertBtn = new JButton();
convertBtn.setBackground(new Color(-2034433));
this.$$$loadButtonText$$$(convertBtn, this.$$$getMessageFromBundle$$$("locale", "ConvertBtn"));
mainPanel.add(convertBtn, new CellConstraints(1, 9, 9, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 5)));
statusJPanel = new JPanel();
statusJPanel.setLayout(new GridLayoutManager(1, 1, new Insets(5, 5, 5, 5), -1, -1));
statusJPanel.setBackground(new Color(-1));
mainPanel.add(statusJPanel, cc.xyw(1, 12, 9));
statusLbl = new JLabel();
this.$$$loadLabelText$$$(statusLbl, this.$$$getMessageFromBundle$$$("locale", "WelcomeText"));
statusJPanel.add(statusLbl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
mainPanel.add(convertBtn, new CellConstraints(1, 10, 9, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 5)));
progressBar = new JProgressBar();
progressBar.setBorderPainted(false);
progressBar.setForeground(new Color(-9251843));
progressBar.setForeground(new Color(-26368));
progressBar.setIndeterminate(false);
mainPanel.add(progressBar, cc.xyw(1, 11, 7, CellConstraints.FILL, CellConstraints.DEFAULT));
mainPanel.add(progressBar, cc.xyw(1, 12, 9, CellConstraints.FILL, CellConstraints.TOP));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
panel1.setBackground(new Color(-9251843));
@ -295,15 +293,24 @@ public class MainAppUi extends JFrame {
label1.setIcon(new ImageIcon(getClass().getResource("/banner.png")));
label1.setText("");
panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
ulLangComboBox.setBackground(new Color(-9251843));
ulLangComboBox.setForeground(new Color(-1));
ulLangComboBox.putClientProperty("html.disable", Boolean.FALSE);
panel1.add(ulLangComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
panel1.add(ulLangComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 1, false));
ulCfgBtn = new JButton();
ulCfgBtn.setBackground(new Color(-2031648));
ulCfgBtn.setMargin(new Insets(1, 1, 1, 1));
ulCfgBtn.setMinimumSize(new Dimension(130, 30));
ulCfgBtn.setPreferredSize(new Dimension(140, 30));
this.$$$loadButtonText$$$(ulCfgBtn, this.$$$getMessageFromBundle$$$("locale", "editUlCfgBtn"));
mainPanel.add(ulCfgBtn, new CellConstraints(9, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5)));
mainPanel.add(ulCfgBtn, new CellConstraints(9, 4, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5)));
statusJPanel = new JPanel();
statusJPanel.setLayout(new GridLayoutManager(1, 1, new Insets(5, 5, 5, 5), -1, -1));
statusJPanel.setBackground(new Color(-1));
mainPanel.add(statusJPanel, cc.xyw(1, 14, 9));
statusLbl = new JLabel();
this.$$$loadLabelText$$$(statusLbl, this.$$$getMessageFromBundle$$$("locale", "WelcomeText"));
statusJPanel.add(statusLbl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
ButtonGroup buttonGroup;
buttonGroup = new ButtonGroup();
buttonGroup.add(DVDRadioButton);
@ -388,8 +395,4 @@ public class MainAppUi extends JFrame {
return mainPanel;
}
private void createUIComponents() {
this.ulLangComboBox = new LanguageComboBox();
ulLangComboBox.addActionListener(e -> onLanguageChanged());
}
}

View file

@ -24,17 +24,21 @@ import tihwin.ui.model.LocaleHolder;
import tihwin.ui.model.SettingsLanguagesSetup;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.basic.BasicComboBoxUI;
import java.awt.*;
import java.util.List;
public class LanguageComboBox extends JComboBox<LocaleHolder> {
private static final Color COLOR_SKY_BLUE = new Color(114, 211, 253);
private final Color COLOR_DARK = new Color(71, 81, 93);
private final Border myBorder = new EmptyBorder(5, 10, 5, 10);
public LanguageComboBox(){
super();
UIManager.put("ComboBox.selectionForeground", COLOR_SKY_BLUE);
UIManager.put("ComboBox.selectionBackground", Color.white);
UIManager.put("ComboBox.selectionForeground", COLOR_DARK);
UIManager.put("ComboBox.selectionBackground", COLOR_SKY_BLUE);
UIManager.put("ComboBox.squareButton", Boolean.FALSE);
setUI(new BasicComboBoxUI(){
@ -51,14 +55,17 @@ public class LanguageComboBox extends JComboBox<LocaleHolder> {
ListCellRenderer<LocaleHolder> current = (ListCellRenderer<LocaleHolder>) getRenderer();
setRenderer((list, localeHolder, index, isSelected, hasFocus) -> {
Component component = current.getListCellRendererComponent(list, localeHolder, index, isSelected, hasFocus);
JLabel component = (JLabel) current.getListCellRendererComponent(list, localeHolder, index, isSelected, hasFocus);
component.setHorizontalAlignment(SwingConstants.RIGHT);
component.setBorder(myBorder);
if (isSelected) {
component.setForeground(Color.black);
component.setForeground(COLOR_DARK);
component.setBackground(Color.ORANGE);
} else {
component.setForeground(Color.white);
component.setBackground(COLOR_SKY_BLUE);
component.setBackground(COLOR_DARK);
}
return component;
});

View file

@ -32,6 +32,7 @@ public class UiUpdater {
this.progressBar = progressBar;
this.statusLine = statusLine;
progressBar.setMaximum(100);
progressBar.setStringPainted(true);
}
public synchronized void updateProgressBySize(int value){
@ -49,6 +50,7 @@ public class UiUpdater {
public void close(){
progressBar.setValue(0);
progressBar.setStringPainted(false);
AwesomeMediator.notifyAllConvertsEnded();
}
}