|
|
|
@ -45,7 +45,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
|
|
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.FRFont; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.general.log.Log4jConfig; |
|
|
|
@ -53,7 +52,6 @@ import com.fr.io.attr.ImageExportAttr;
|
|
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.report.ReportConfigManager; |
|
|
|
|
import com.fr.scheduler.tool.FineScheduler; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
import com.fr.stable.os.OperatingSystem; |
|
|
|
|
import com.fr.third.apache.logging.log4j.Level; |
|
|
|
@ -77,13 +75,11 @@ import javax.swing.ButtonGroup;
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JDialog; |
|
|
|
|
import javax.swing.JFileChooser; |
|
|
|
|
import javax.swing.JLabel; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JProgressBar; |
|
|
|
|
import javax.swing.KeyStroke; |
|
|
|
|
import javax.swing.ScrollPaneConstants; |
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.SwingWorker; |
|
|
|
|
import javax.swing.Timer; |
|
|
|
@ -396,8 +392,8 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
previewRenderGroup.add(previewRenderSpeed); |
|
|
|
|
JPanel imageExportSettingPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
JComponent[][] templateComps = { |
|
|
|
|
{new UILabel(createLabelColonName("Fine-Design_Report_Engine_Enlarge_Or_Reduce")), this.previewResolutionBtnS, this.previewResolutionBtnM}, |
|
|
|
|
{new UILabel(createLabelColonName("Fine-Design_Image_Export_Rendering_Quality")), this.previewRenderQuality, this.previewRenderSpeed}, |
|
|
|
|
{new UILabel(Toolkit.i18nText("Fine-Design_Report_Engine_Enlarge_Or_Reduce") + ":"), this.previewResolutionBtnS, this.previewResolutionBtnM}, |
|
|
|
|
{new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality") + ":"), this.previewRenderQuality, this.previewRenderSpeed}, |
|
|
|
|
}; |
|
|
|
|
imageExportSettingPane.add( |
|
|
|
|
TableLayoutHelper.createGapTableLayoutPane( |
|
|
|
@ -444,9 +440,9 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
//gc面板
|
|
|
|
|
gcControlPane = createGcControlPane(); |
|
|
|
|
|
|
|
|
|
JPanel enableVcsPanel = new JPanel(FRGUIPaneFactory.createLeadingZeroLayout()); |
|
|
|
|
JPanel enableVcsPanel = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
enableVcsPanel.add(remindVcsLabel); |
|
|
|
|
JPanel intervalPanel = new JPanel(FRGUIPaneFactory.createLeadingZeroLayout()); |
|
|
|
|
JPanel intervalPanel = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
final UILabel everyLabel = new UILabel(i18nText("Fine-Design_Vcs_Every")); |
|
|
|
|
final UILabel delayLabel = new UILabel(i18nText("Fine-Design_Vcs_Delay")); |
|
|
|
|
intervalPanel.add(useIntervalCheckBox); |
|
|
|
@ -474,7 +470,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
vcsPane.add(remindVcsLabel); |
|
|
|
|
vcsPane.add(enableVcsPanel); |
|
|
|
|
vcsPane.add(intervalPanel); |
|
|
|
|
if (VcsHelper.getInstance().isLegacyMode()) { |
|
|
|
|
vcsPane.add(saveCommitCheckBox); |
|
|
|
@ -512,7 +508,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
private JPanel createAutoCleanPane() { |
|
|
|
|
JPanel autoCleanPane = new JPanel(FRGUIPaneFactory.createLeadingZeroLayout()); |
|
|
|
|
JPanel autoCleanPane = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
useVcsAutoCleanScheduleCheckBox = new UICheckBox(); |
|
|
|
|
autoCleanIntervalComboBox = new UIComboBox(INTERVAL); |
|
|
|
|
autoCleanIntervalComboBox.setSelectedIndex(DEFAULT_INDEX); |
|
|
|
@ -560,7 +556,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createSaveIntervalPane() { |
|
|
|
|
JPanel saveIntervalPane = new JPanel(FRGUIPaneFactory.createLeadingZeroLayout()); |
|
|
|
|
JPanel saveIntervalPane = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
useVcsAutoSaveScheduleCheckBox = new UICheckBox(); |
|
|
|
|
autoSaveIntervalEditor = new UIPositiveIntEditor(60); |
|
|
|
|
saveIntervalPane.add(useVcsAutoSaveScheduleCheckBox); |
|
|
|
@ -662,7 +658,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
JPanel keyStrokePane = new JPanel(new BorderLayout()); |
|
|
|
|
keyStrokePane.add(new UILabel(createLabelColonName("Fine-Design_Basic_Support_Auto_Complete_Shortcut")), BorderLayout.LINE_START); |
|
|
|
|
keyStrokePane.add(new UILabel(i18nText("Fine-Design_Basic_Support_Auto_Complete_Shortcut") + ":"), BorderLayout.WEST); |
|
|
|
|
shortCutLabel = new UILabel(); |
|
|
|
|
keyStrokePane.add(shortCutLabel, BorderLayout.CENTER); |
|
|
|
|
keyStrokePane.setBorder(new EmptyBorder(0, 10,0,0)); |
|
|
|
@ -741,10 +737,10 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
paginationLineColorTBButton.setEnabled(this.isEnabled()); |
|
|
|
|
|
|
|
|
|
JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
leftPane.add(new UILabel(createLabelColonName("Fine-Design_Basic_Preference_Grid_Line_Color"))); |
|
|
|
|
leftPane.add(new UILabel(i18nText("Fine-Design_Basic_Preference_Grid_Line_Color") + ":")); |
|
|
|
|
leftPane.add(gridLineColorTBButton); |
|
|
|
|
JPanel rightPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
rightPane.add(new UILabel(createLabelColonName("Fine-Design_Basic_Preference_Pagination_Line_Color"))); |
|
|
|
|
rightPane.add(new UILabel(i18nText("Fine-Design_Basic_Preference_Pagination_Line_Color") + ":")); |
|
|
|
|
rightPane.add(paginationLineColorTBButton); |
|
|
|
|
colorSettingPane.add(leftPane); |
|
|
|
|
colorSettingPane.add(rightPane); |
|
|
|
@ -756,7 +752,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
advancePane.add(logPane); |
|
|
|
|
JPanel logExportPane = FRGUIPaneFactory.createTitledBorderPane("log" + i18nText("Fine-Design_Basic_Export_Setting")); |
|
|
|
|
logPane.add(logExportPane); |
|
|
|
|
UILabel logLabel = new UILabel(i18nText(createLabelColonName("Fine-Design_Basic_Select_Export_Log_Directory"))); |
|
|
|
|
UILabel logLabel = new UILabel(i18nText("Fine-Design_Basic_Select_Export_Log_Directory") + ":"); |
|
|
|
|
logExportPane.add(logLabel, BorderLayout.WEST); |
|
|
|
|
logExportDirectoryField = new UITextField(24); |
|
|
|
|
logExportPane.add(logExportDirectoryField, BorderLayout.CENTER); |
|
|
|
@ -876,8 +872,8 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
reportLengthComboBox = new UIComboBox(UnitConvertUtil.getUnitItems()); |
|
|
|
|
reportLengthComboBox.setPreferredSize(new Dimension(80, 20)); |
|
|
|
|
reportLengthComboBox.setMinimumSize(new Dimension(80, 20)); |
|
|
|
|
UILabel pagelengthLabel = new UILabel(createLabelColonName("Fine-Design_Basic_Page_Setup_Scale_Units")); |
|
|
|
|
UILabel reportLengthLabel = new UILabel(createLabelColonName("Fine-Design_Basic_Report_Design_Ruler_Units")); |
|
|
|
|
UILabel pagelengthLabel = new UILabel(i18nText("Fine-Design_Basic_Page_Setup_Scale_Units") + ":"); |
|
|
|
|
UILabel reportLengthLabel = new UILabel(i18nText("Fine-Design_Basic_Report_Design_Ruler_Units") + ":"); |
|
|
|
|
Component[][] lengthComponents = { |
|
|
|
|
{pagelengthLabel, pageLengthComboBox, reportLengthLabel, reportLengthComboBox}, |
|
|
|
|
}; |
|
|
|
@ -896,7 +892,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
portEditor.setPreferredSize(new Dimension(80, 20)); |
|
|
|
|
portEditor.setMinimumSize(new Dimension(80, 20)); |
|
|
|
|
UILabel notiJlabel = new UILabel(i18nText("Fine-Design_Basic_Work_After_Restart_Designer")); |
|
|
|
|
UILabel serverPortLabel = new UILabel(createLabelColonName("Fine-Design_Basic_Web_Preview_Port")); |
|
|
|
|
UILabel serverPortLabel = new UILabel(i18nText("Fine-Design_Basic_Web_Preview_Port") + ":"); |
|
|
|
|
Component[][] portComponents = { |
|
|
|
|
{serverPortLabel, portEditor, notiJlabel}, |
|
|
|
|
}; |
|
|
|
@ -911,7 +907,7 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
i18nText("Fine-Design_Basic_Preference_Caching_Template_Tip"), MEMORY_TIP_LABEL_MAX_WIDTH); |
|
|
|
|
memoryTipLabel.setBorder(BorderFactory.createEmptyBorder(0, CACHING_GAP, 0, 0)); |
|
|
|
|
cachingTemplateSpinner = new UISpinner(0, CACHING_MAX, 1, CACHING_DEFAULT); |
|
|
|
|
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeadingZeroLayout()); |
|
|
|
|
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
memorySpace.add(memoryLabel); |
|
|
|
|
memorySpace.add(cachingTemplateSpinner); |
|
|
|
|
memorySpace.add(memoryTipLabel); |
|
|
|
@ -1490,12 +1486,5 @@ public class PreferencePane extends BasicPane {
|
|
|
|
|
return gcButton; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建带冒号的label名,适配RTL |
|
|
|
|
*/ |
|
|
|
|
private String createLabelColonName(String i18nKey) { |
|
|
|
|
return BidiUtils.reverseConcatenateStrings(i18nText(i18nKey) + ":"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|