Browse Source

Pull request #15891: REPORT-136131 & REPORT-134353 & REPORT-144260 fix:FBP UI相关调整

Merge in DESIGN/design from ~RICHARD.FANG/design:fbp/release to fbp/release

* commit '97bc87225c5fd1939e58cef062af2c57133435f7':
  REPORT-144260 fix:数据集数据查询失败弹窗调整为折叠弹窗
  REPORT-134353 feat:系列table加上垂直线
  REPORT-136131 fix:AlphaFine相关面板缩放适配及布局/图标调整
fbp/release
Richard.Fang-方超 3 months ago
parent
commit
30a4c82a7a
  1. 6
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java
  2. 1
      designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java
  3. 4
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_function.svg
  4. 4
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_function_disable.svg
  5. 4
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_function_white.svg
  6. 11
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_plugin.svg
  7. 11
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_plugin_disable.svg
  8. 11
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_plugin_white.svg
  9. 3
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_template.svg
  10. 3
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_template_disable.svg
  11. 3
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_template_white.svg
  12. 16
      designer-base/src/main/resources/com/fine/theme/icon/alphafine/internet_error.svg
  13. 25
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  14. 20
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/SearchResultContentCellRender.java
  15. 15
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/SearchResultPane.java
  16. 15
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/TemplateResourceImagePanel.java
  17. 44
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/NetWorkFailedPane.java
  18. 54
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateResourceDetailPane.java

6
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -23,6 +23,7 @@ import com.fr.design.data.datapane.preview.desensitization.view.PreviewTableDese
import com.fr.design.data.datapane.preview.desensitization.view.setting.TableDataDesensitizationSettingPane; import com.fr.design.data.datapane.preview.desensitization.view.setting.TableDataDesensitizationSettingPane;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.CollapsibleDetailDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
@ -579,8 +580,9 @@ public class PreviewTablePane extends BasicPane {
} catch (Exception e) { } catch (Exception e) {
if (!(e instanceof CancellationException)) { if (!(e instanceof CancellationException)) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage(), CollapsibleDetailDialog detailDialog = new CollapsibleDetailDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Error"), JOptionPane.ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); new UILabel(Toolkit.i18nText("Fine-Design_Dataset_Query_Fail-Tip")), e.getMessage());
detailDialog.setVisible(true);
} }
dialog.setVisible(false); dialog.setVisible(false);
} finally { } finally {

1
designer-base/src/main/java/com/fr/design/gui/frpane/UICorrelationPane.java

@ -165,7 +165,6 @@ public class UICorrelationPane extends JPanel implements UIObserver {
protected void initComponents() { protected void initComponents() {
tablePane = initUITable(); tablePane = initUITable();
tablePane.setShowVerticalLines(false);
initAddButton(); initAddButton();
} }

4
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_function.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.1961 5.26821L17.5003 2.55679C16.572 2.02078 15.4283 2.02079 14.5001 2.55679L5.10804 7.97927C4.17972 8.51517 3.60786 9.50566 3.60791 10.5776V21.4225C3.60786 22.4944 4.17972 23.4849 5.10804 24.0208L14.5001 29.4433C15.4283 29.9793 16.572 29.9793 17.5003 29.4433L26.8923 24.0208C27.8207 23.4849 28.3925 22.4944 28.3925 21.4225V10.5776C28.3925 9.50566 27.8207 8.51517 26.8923 7.97927L22.1961 5.26821ZM26.3925 10.5775C26.3925 10.2202 26.2019 9.89 25.8924 9.71137L16.5002 4.28879C16.1908 4.11012 15.8096 4.11012 15.5001 4.28879L6.10795 9.71137C5.79851 9.89 5.60789 10.2202 5.60791 10.5775V21.4226C5.60789 21.7799 5.79851 22.1101 6.10795 22.2887L15.5001 27.7113C15.8096 27.89 16.1908 27.89 16.5002 27.7113L25.8924 22.2887C26.2019 22.1101 26.3925 21.7799 26.3925 21.4226V10.5775Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22 16C22 19.3137 19.3137 22 16 22C12.6863 22 10 19.3137 10 16C10 12.6863 12.6863 10 16 10C19.3137 10 22 12.6863 22 16ZM16 20C18.2091 20 20 18.2091 20 16C20 13.7909 18.2091 12 16 12C13.7909 12 12 13.7909 12 16C12 18.2091 13.7909 20 16 20Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

4
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_function_disable.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.1961 5.26821L17.5003 2.55679C16.572 2.02078 15.4283 2.02079 14.5001 2.55679L5.10804 7.97927C4.17972 8.51517 3.60786 9.50566 3.60791 10.5776V21.4225C3.60786 22.4944 4.17972 23.4849 5.10804 24.0208L14.5001 29.4433C15.4283 29.9793 16.572 29.9793 17.5003 29.4433L26.8923 24.0208C27.8207 23.4849 28.3925 22.4944 28.3925 21.4225V10.5776C28.3925 9.50566 27.8207 8.51517 26.8923 7.97927L22.1961 5.26821ZM26.3925 10.5775C26.3925 10.2202 26.2019 9.89 25.8924 9.71137L16.5002 4.28879C16.1908 4.11012 15.8096 4.11012 15.5001 4.28879L6.10795 9.71137C5.79851 9.89 5.60789 10.2202 5.60791 10.5775V21.4226C5.60789 21.7799 5.79851 22.1101 6.10795 22.2887L15.5001 27.7113C15.8096 27.89 16.1908 27.89 16.5002 27.7113L25.8924 22.2887C26.2019 22.1101 26.3925 21.7799 26.3925 21.4226V10.5775Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22 16C22 19.3137 19.3137 22 16 22C12.6863 22 10 19.3137 10 16C10 12.6863 12.6863 10 16 10C19.3137 10 22 12.6863 22 16ZM16 20C18.2091 20 20 18.2091 20 16C20 13.7909 18.2091 12 16 12C13.7909 12 12 13.7909 12 16C12 18.2091 13.7909 20 16 20Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

4
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_function_white.svg

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.1961 5.26821L17.5003 2.55679C16.572 2.02078 15.4283 2.02079 14.5001 2.55679L5.10804 7.97927C4.17972 8.51517 3.60786 9.50566 3.60791 10.5776V21.4225C3.60786 22.4944 4.17972 23.4849 5.10804 24.0208L14.5001 29.4433C15.4283 29.9793 16.572 29.9793 17.5003 29.4433L26.8923 24.0208C27.8207 23.4849 28.3925 22.4944 28.3925 21.4225V10.5776C28.3925 9.50566 27.8207 8.51517 26.8923 7.97927L22.1961 5.26821ZM26.3925 10.5775C26.3925 10.2202 26.2019 9.89 25.8924 9.71137L16.5002 4.28879C16.1908 4.11012 15.8096 4.11012 15.5001 4.28879L6.10795 9.71137C5.79851 9.89 5.60789 10.2202 5.60791 10.5775V21.4226C5.60789 21.7799 5.79851 22.1101 6.10795 22.2887L15.5001 27.7113C15.8096 27.89 16.1908 27.89 16.5002 27.7113L25.8924 22.2887C26.2019 22.1101 26.3925 21.7799 26.3925 21.4226V10.5775Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22 16C22 19.3137 19.3137 22 16 22C12.6863 22 10 19.3137 10 16C10 12.6863 12.6863 10 16 10C19.3137 10 22 12.6863 22 16ZM16 20C18.2091 20 20 18.2091 20 16C20 13.7909 18.2091 12 16 12C13.7909 12 12 13.7909 12 16C12 18.2091 13.7909 20 16 20Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

11
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_plugin.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8156_85961)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.5137 8.91632L16.268 3.00095C16.1021 2.90518 15.8978 2.90518 15.7319 3.00095L5.48606 8.91638L15.9998 15.1291L26.5137 8.91632ZM27.3916 10.1399L16.75 16.4281V28.7209L27.1235 22.7318C27.2894 22.636 27.3916 22.459 27.3916 22.2675V10.1399ZM15.25 28.721V16.4283L4.60833 10.14V22.2675C4.60833 22.4591 4.71051 22.636 4.87638 22.7318L15.25 28.721ZM17.0722 1.6081C16.4087 1.22503 15.5912 1.22503 14.9277 1.6081L4.07222 7.87553C3.40873 8.25859 3 8.96653 3 9.73266V22.2675C3 23.0336 3.40873 23.7416 4.07222 24.1247L14.9277 30.3921C15.5912 30.7751 16.4087 30.7751 17.0722 30.3921L27.9277 24.1247C28.5911 23.7416 28.9999 23.0336 28.9999 22.2675V9.73266C28.9999 8.96653 28.5911 8.25859 27.9277 7.87553L17.0722 1.6081Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.018 8.91882L16.143 3.21746C16.0545 3.16635 15.9454 3.16635 15.8569 3.21746L5.98172 8.91888L15.9998 14.8387L26.018 8.91882ZM16.268 3.00095C16.1021 2.90518 15.8978 2.90518 15.7319 3.00095L5.48606 8.91638L15.9998 15.1291L26.5137 8.91632L16.268 3.00095ZM17 16.5707V28.2879L26.9985 22.5153C27.087 22.4642 27.1416 22.3697 27.1416 22.2675V10.578L17 16.5707ZM16.75 16.4281V28.7209L27.1235 22.7318C27.2894 22.636 27.3916 22.459 27.3916 22.2675V10.1399L16.75 16.4281ZM15 16.5709L4.85833 10.5781V22.2675C4.85833 22.3697 4.91286 22.4642 5.00138 22.5153L15 28.288V16.5709ZM15.25 16.4283L4.60833 10.14V22.2675C4.60833 22.4591 4.71051 22.636 4.87638 22.7318L15.25 28.721V16.4283ZM14.8027 1.39159C15.5436 0.96387 16.4563 0.96387 17.1972 1.39159L28.0527 7.65902C28.7935 8.08675 29.2499 8.87721 29.2499 9.73266V22.2675C29.2499 23.123 28.7935 23.9134 28.0527 24.3412L17.1972 30.6086C16.4563 31.0363 15.5436 31.0363 14.8027 30.6086L3.94722 24.3412C3.20638 23.9134 2.75 23.123 2.75 22.2675V9.73266C2.75 8.87721 3.20638 8.08675 3.94722 7.65902L14.8027 1.39159ZM14.9277 1.6081C15.5912 1.22503 16.4087 1.22503 17.0722 1.6081L27.9277 7.87553C28.5911 8.25859 28.9999 8.96653 28.9999 9.73266V22.2675C28.9999 23.0336 28.5911 23.7416 27.9277 24.1247L17.0722 30.3921C16.4087 30.7751 15.5912 30.7751 14.9277 30.3921L4.07222 24.1247C3.40873 23.7416 3 23.0336 3 22.2675V9.73266C3 8.96653 3.40873 8.25859 4.07222 7.87553L14.9277 1.6081Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
<defs>
<clipPath id="clip0_8156_85961">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

11
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_plugin_disable.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8156_85969)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.5137 8.91632L16.268 3.00095C16.1021 2.90518 15.8978 2.90518 15.7319 3.00095L5.48606 8.91638L15.9998 15.1291L26.5137 8.91632ZM27.3916 10.1399L16.75 16.4281V28.7209L27.1235 22.7318C27.2894 22.636 27.3916 22.459 27.3916 22.2675V10.1399ZM15.25 28.721V16.4283L4.60833 10.14V22.2675C4.60833 22.4591 4.71051 22.636 4.87638 22.7318L15.25 28.721ZM17.0722 1.6081C16.4087 1.22503 15.5912 1.22503 14.9277 1.6081L4.07222 7.87553C3.40873 8.25859 3 8.96653 3 9.73266V22.2675C3 23.0336 3.40873 23.7416 4.07222 24.1247L14.9277 30.3921C15.5912 30.7751 16.4087 30.7751 17.0722 30.3921L27.9277 24.1247C28.5911 23.7416 28.9999 23.0336 28.9999 22.2675V9.73266C28.9999 8.96653 28.5911 8.25859 27.9277 7.87553L17.0722 1.6081Z" fill="#0A1C38" fill-opacity="0.29"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.018 8.91882L16.143 3.21746C16.0545 3.16635 15.9454 3.16635 15.8569 3.21746L5.98172 8.91888L15.9998 14.8387L26.018 8.91882ZM16.268 3.00095C16.1021 2.90518 15.8978 2.90518 15.7319 3.00095L5.48606 8.91638L15.9998 15.1291L26.5137 8.91632L16.268 3.00095ZM17 16.5707V28.2879L26.9985 22.5153C27.087 22.4642 27.1416 22.3697 27.1416 22.2675V10.578L17 16.5707ZM16.75 16.4281V28.7209L27.1235 22.7318C27.2894 22.636 27.3916 22.459 27.3916 22.2675V10.1399L16.75 16.4281ZM15 16.5709L4.85833 10.5781V22.2675C4.85833 22.3697 4.91286 22.4642 5.00138 22.5153L15 28.288V16.5709ZM15.25 16.4283L4.60833 10.14V22.2675C4.60833 22.4591 4.71051 22.636 4.87638 22.7318L15.25 28.721V16.4283ZM14.8027 1.39159C15.5436 0.96387 16.4563 0.96387 17.1972 1.39159L28.0527 7.65902C28.7935 8.08675 29.2499 8.87721 29.2499 9.73266V22.2675C29.2499 23.123 28.7935 23.9134 28.0527 24.3412L17.1972 30.6086C16.4563 31.0363 15.5436 31.0363 14.8027 30.6086L3.94722 24.3412C3.20638 23.9134 2.75 23.123 2.75 22.2675V9.73266C2.75 8.87721 3.20638 8.08675 3.94722 7.65902L14.8027 1.39159ZM14.9277 1.6081C15.5912 1.22503 16.4087 1.22503 17.0722 1.6081L27.9277 7.87553C28.5911 8.25859 28.9999 8.96653 28.9999 9.73266V22.2675C28.9999 23.0336 28.5911 23.7416 27.9277 24.1247L17.0722 30.3921C16.4087 30.7751 15.5912 30.7751 14.9277 30.3921L4.07222 24.1247C3.40873 23.7416 3 23.0336 3 22.2675V9.73266C3 8.96653 3.40873 8.25859 4.07222 7.87553L14.9277 1.6081Z" fill="#0A1C38" fill-opacity="0.29"/>
</g>
<defs>
<clipPath id="clip0_8156_85969">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

11
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_plugin_white.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8156_86033)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.5137 8.91632L16.268 3.00095C16.1021 2.90518 15.8978 2.90518 15.7319 3.00095L5.48606 8.91638L15.9998 15.1291L26.5137 8.91632ZM27.3916 10.1399L16.75 16.4281V28.7209L27.1235 22.7318C27.2894 22.636 27.3916 22.459 27.3916 22.2675V10.1399ZM15.25 28.721V16.4283L4.60833 10.14V22.2675C4.60833 22.4591 4.71051 22.636 4.87638 22.7318L15.25 28.721ZM17.0722 1.6081C16.4087 1.22503 15.5912 1.22503 14.9277 1.6081L4.07222 7.87553C3.40873 8.25859 3 8.96653 3 9.73266V22.2675C3 23.0336 3.40873 23.7416 4.07222 24.1247L14.9277 30.3921C15.5912 30.7751 16.4087 30.7751 17.0722 30.3921L27.9277 24.1247C28.5911 23.7416 28.9999 23.0336 28.9999 22.2675V9.73266C28.9999 8.96653 28.5911 8.25859 27.9277 7.87553L17.0722 1.6081Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.018 8.91882L16.143 3.21746C16.0545 3.16635 15.9454 3.16635 15.8569 3.21746L5.98172 8.91888L15.9998 14.8387L26.018 8.91882ZM16.268 3.00095C16.1021 2.90518 15.8978 2.90518 15.7319 3.00095L5.48606 8.91638L15.9998 15.1291L26.5137 8.91632L16.268 3.00095ZM17 16.5707V28.2879L26.9985 22.5153C27.087 22.4642 27.1416 22.3697 27.1416 22.2675V10.578L17 16.5707ZM16.75 16.4281V28.7209L27.1235 22.7318C27.2894 22.636 27.3916 22.459 27.3916 22.2675V10.1399L16.75 16.4281ZM15 16.5709L4.85833 10.5781V22.2675C4.85833 22.3697 4.91286 22.4642 5.00138 22.5153L15 28.288V16.5709ZM15.25 16.4283L4.60833 10.14V22.2675C4.60833 22.4591 4.71051 22.636 4.87638 22.7318L15.25 28.721V16.4283ZM14.8027 1.39159C15.5436 0.96387 16.4563 0.96387 17.1972 1.39159L28.0527 7.65902C28.7935 8.08675 29.2499 8.87721 29.2499 9.73266V22.2675C29.2499 23.123 28.7935 23.9134 28.0527 24.3412L17.1972 30.6086C16.4563 31.0363 15.5436 31.0363 14.8027 30.6086L3.94722 24.3412C3.20638 23.9134 2.75 23.123 2.75 22.2675V9.73266C2.75 8.87721 3.20638 8.08675 3.94722 7.65902L14.8027 1.39159ZM14.9277 1.6081C15.5912 1.22503 16.4087 1.22503 17.0722 1.6081L27.9277 7.87553C28.5911 8.25859 28.9999 8.96653 28.9999 9.73266V22.2675C28.9999 23.0336 28.5911 23.7416 27.9277 24.1247L17.0722 30.3921C16.4087 30.7751 15.5912 30.7751 14.9277 30.3921L4.07222 24.1247C3.40873 23.7416 3 23.0336 3 22.2675V9.73266C3 8.96653 3.40873 8.25859 4.07222 7.87553L14.9277 1.6081Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_8156_86033">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

3
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_template.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3C2.89543 3 2 3.89543 2 5V27C2 28.1046 2.89543 29 4 29H28C29.1046 29 30 28.1046 30 27V5C30 3.89543 29.1046 3 28 3H4ZM28 5H4V11H28V5ZM4 27V13H10V27H4ZM12 27H28V13H12V27Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 361 B

3
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_template_disable.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3C2.89543 3 2 3.89543 2 5V27C2 28.1046 2.89543 29 4 29H28C29.1046 29 30 28.1046 30 27V5C30 3.89543 29.1046 3 28 3H4ZM28 5H4V11H28V5ZM4 27V13H10V27H4ZM12 27H28V13H12V27Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 362 B

3
designer-base/src/main/resources/com/fine/theme/icon/alphafine/alphaFine_template_white.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3C2.89543 3 2 3.89543 2 5V27C2 28.1046 2.89543 29 4 29H28C29.1046 29 30 28.1046 30 27V5C30 3.89543 29.1046 3 28 3H4ZM28 5H4V11H28V5ZM4 27V13H10V27H4ZM12 27H28V13H12V27Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 340 B

16
designer-base/src/main/resources/com/fine/theme/icon/alphafine/internet_error.svg

@ -0,0 +1,16 @@
<svg width="110" height="110" viewBox="0 0 110 110" fill="none" xmlns="http://www.w3.org/2000/svg">
<g opacity="0.75">
<path opacity="0.8" fill-rule="evenodd" clip-rule="evenodd" d="M41.7854 31.6035C29.0822 34.2778 17.7425 40.6533 8.94681 49.5495C7.26139 51.2542 7.46782 54.0066 9.27928 55.5767C11.0926 57.1484 13.8258 56.938 15.5302 55.2487C22.1993 48.6387 30.5086 43.6807 39.7933 41.0396L41.7854 31.6035ZM68.3034 40.4028L71.2237 32.1731C82.9283 35.1193 93.3743 41.233 101.597 49.5495C103.282 51.2542 103.076 54.0066 101.264 55.5767C99.451 57.1484 96.7178 56.938 95.0135 55.2488C90.6463 50.9202 85.5757 47.3001 79.9885 44.5751L80.6903 43.1204C81.2468 41.967 80.4064 40.6285 79.1258 40.6285H69.2237C68.9179 40.5507 68.6112 40.4755 68.3034 40.4028ZM38.137 48.8852C31.5936 51.2992 25.7002 55.056 20.7913 59.8212C19.0718 61.4904 19.2812 64.246 21.0921 65.8156C22.9059 67.3877 25.6368 67.1705 27.3897 65.5307C29.9465 63.1387 32.8113 61.0718 35.9181 59.3958L38.137 48.8852ZM73.1934 58.6595L76.9685 50.8348C81.7025 53.1466 86.013 56.1913 89.7523 59.8212C91.4719 61.4904 91.2625 64.246 89.4516 65.8156C87.6377 67.3877 84.9069 67.1705 83.154 65.5307C80.2087 62.7754 76.855 60.4514 73.1934 58.6595ZM40.3114 64.9482C37.5237 66.3227 34.9523 68.0694 32.6623 70.1234C30.8795 71.7224 31.0937 74.4846 32.9034 76.0532C34.7182 77.6262 37.446 77.3917 39.3024 75.868C41.3356 74.1992 43.6347 72.8425 46.1266 71.8711L47.2535 64.9482H40.3114ZM66.3983 72.7439L70.1734 64.9192C72.9838 66.2981 75.5752 68.0549 77.8813 70.1234C79.6641 71.7224 79.4499 74.4846 77.6402 76.0532C75.8254 77.6262 73.0977 77.3917 71.2413 75.868C69.7588 74.6513 68.1351 73.6005 66.3983 72.7439ZM44.7279 80.4626C44.3989 80.6961 44.078 80.9402 43.7656 81.1944C42.3741 82.327 42.5391 84.405 43.8949 85.5802L44.7279 80.4626ZM59.6027 86.8293L63.3781 79.0039C64.271 79.4476 65.1223 79.9623 65.9248 80.5406C67.8625 81.9371 67.6413 84.7199 65.8364 86.2843L65.3802 86.6798C63.8135 88.0377 61.4501 87.7704 59.6027 86.8293Z" fill="url(#paint0_linear_11857_159065)"/>
<path d="M66.7091 19.7832H53.3121C51.6699 19.7832 50.252 20.933 49.9128 22.5398L43.1283 54.6766C42.6724 56.8365 44.3201 58.8684 46.5277 58.8684H54.4032L49.4309 89.4131C49.2455 90.552 50.8171 91.0475 51.3185 90.0083L71.0065 49.2005C71.563 48.0471 70.7226 46.7086 69.4419 46.7086H59.6146L68.3463 22.1012C68.7475 20.9705 67.9089 19.7832 66.7091 19.7832Z" fill="url(#paint1_linear_11857_159065)"/>
</g>
<defs>
<linearGradient id="paint0_linear_11857_159065" x1="8.00001" y1="25.5" x2="124.871" y2="153.289" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADEE7"/>
<stop offset="1" stop-color="#5D6B81"/>
</linearGradient>
<linearGradient id="paint1_linear_11857_159065" x1="71" y1="96" x2="57" y2="20" gradientUnits="userSpaceOnUse">
<stop stop-color="#5D6B81"/>
<stop offset="1" stop-color="#A3ADBD"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

25
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -487,6 +487,29 @@
"bulb_hover": "alphafine/bulb_hover.svg", "bulb_hover": "alphafine/bulb_hover.svg",
"minimize": "alphafine/minimize.svg", "minimize": "alphafine/minimize.svg",
"search_hint": "alphafine/search_hint.svg", "search_hint": "alphafine/search_hint.svg",
"no_result": "alphafine/no_result.svg" "no_result": "alphafine/no_result.svg",
"internet_error": "alphafine/internet_error.svg",
"alphafine1": {
"normal": "alphafine/alphaFine_function.svg",
"disable": "alphafine/alphaFine_function_disable.svg",
"white": "alphafine/alphaFine_function_white.svg"
},
"alphafine2": "toolbar/help.svg",
"alphafine3": {
"normal": "alphafine/alphaFine_template.svg",
"disable": "alphafine/alphaFine_template_disable.svg",
"white": "alphafine/alphaFine_template_white.svg"
},
"alphafine4": {
"normal": "alphafine/alphaFine_plugin.svg",
"disable": "alphafine/alphaFine_plugin_disable.svg",
"white": "alphafine/alphaFine_plugin_white.svg"
},
"alphafine8": "toolbar/help.svg",
"alphafine10": {
"normal": "alphafine/alphaFine_template.svg",
"disable": "alphafine/alphaFine_template_disable.svg",
"white": "alphafine/alphaFine_template_white.svg"
}
} }
} }

20
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/SearchResultContentCellRender.java

@ -1,12 +1,13 @@
package com.fr.design.mainframe.alphafine.component; package com.fr.design.mainframe.alphafine.component;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.actions.help.alphafine.AlphaFineConstants; import com.fr.design.actions.help.alphafine.AlphaFineConstants;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineUtil; import com.fr.design.mainframe.alphafine.AlphaFineUtil;
import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel;
import com.fr.general.IOUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JList; import javax.swing.JList;
@ -25,9 +26,7 @@ import java.awt.Dimension;
public class SearchResultContentCellRender implements ListCellRenderer<Object> { public class SearchResultContentCellRender implements ListCellRenderer<Object> {
private static final int OFFSET = FineUIScale.scale(45); private static final int OFFSET = FineUIScale.scale(45);
private static final String SELECTED_PATH = AlphaFineConstants.IMAGE_URL + "selected"; private static final String ICON_ID_PREFIX = "alphafine";
private static final String CELL_PATH = AlphaFineConstants.IMAGE_URL + "alphafine";
private static final String SUFFIX = ".png";
private String[] segmentationResult; private String[] segmentationResult;
@ -43,19 +42,16 @@ public class SearchResultContentCellRender implements ListCellRenderer<Object> {
AlphaCellModel model = (AlphaCellModel) value; AlphaCellModel model = (AlphaCellModel) value;
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.setBackground(Color.WHITE); panel.setBackground(Color.WHITE);
panel.setBorder(new ScaledEmptyBorder(0,10,0,0)); panel.setBorder(new ScaledEmptyBorder(0,0,0,0));
// 图标icon 样式 // 图标icon 样式
UILabel iconLabel = new UILabel(); UILabel iconLabel = new UILabel();
if (isSelected) { if (isSelected) {
iconLabel.setText(StringUtils.BLANK + model.getName()); iconLabel.setText(model.getName());
String iconUrl = SELECTED_PATH + model.getType().getTypeValue() + SUFFIX; panel.setBackground(FineUIUtils.getUIColor("defaultHighlightBorderColor", "Component.focusedBorderColor"));
panel.setBackground(AlphaFineConstants.BLUE); iconLabel.setIcon(new LazyIcon(ICON_ID_PREFIX + model.getType().getTypeValue()).white());
iconLabel.setForeground(Color.WHITE);
iconLabel.setIcon(IOUtils.readIcon(iconUrl));
} else { } else {
iconLabel.setText(AlphaFineUtil.highLightModelName(model.getName(), segmentationResult)); iconLabel.setText(AlphaFineUtil.highLightModelName(model.getName(), segmentationResult));
String iconUrl = CELL_PATH + model.getType().getTypeValue() + SUFFIX; iconLabel.setIcon(new LazyIcon(ICON_ID_PREFIX + model.getType().getTypeValue()));
iconLabel.setIcon(IOUtils.readIcon(iconUrl));
} }

15
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/SearchResultPane.java

@ -3,10 +3,12 @@ package com.fr.design.mainframe.alphafine.component;
import com.formdev.flatlaf.ui.FlatUIUtils; import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.design.actions.help.alphafine.AlphaFineConstants; import com.fr.design.actions.help.alphafine.AlphaFineConstants;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.iscrollbar.UIScrollBar;
import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.design.mainframe.alphafine.preview.ResultShowPane; import com.fr.design.mainframe.alphafine.preview.ResultShowPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
@ -31,14 +33,23 @@ public class SearchResultPane extends JPanel {
searchResultList = new AlphaFineList(); searchResultList = new AlphaFineList();
searchResultList.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE)); searchResultList.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
searchResultList.setFixedCellHeight(AlphaFineConstants.CELL_HEIGHT); searchResultList.setFixedCellHeight(AlphaFineConstants.CELL_HEIGHT);
leftSearchResultPane = new UIScrollPane(searchResultList); leftSearchResultPane = new UIScrollPane(searchResultList) {
@Override
public UIScrollBar createVerticalScrollBar() {
UIScrollBar verticalScrollBar = super.createVerticalScrollBar();
verticalScrollBar.setOpaque(false);
return verticalScrollBar;
}
};
searchListModel = new SearchListModel(new SearchResult(), searchResultList, leftSearchResultPane); searchListModel = new SearchListModel(new SearchResult(), searchResultList, leftSearchResultPane);
searchResultList.setModel(searchListModel); searchResultList.setModel(searchListModel);
searchResultList.setCellRenderer(new SearchResultContentCellRender(segmentationResult)); searchResultList.setCellRenderer(new SearchResultContentCellRender(segmentationResult));
searchResultList.setResultShowPane(rightSearchResultPane); searchResultList.setResultShowPane(rightSearchResultPane);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(row(cell(leftSearchResultPane).weight(1), cell(rightSearchResultPane).weight(1)).getComponent()); JSeparator sep = new JSeparator();
sep.setOrientation(JSeparator.VERTICAL);
this.add(row(cell(leftSearchResultPane).weight(1), row(cell(sep),cell(rightSearchResultPane)).weight(1)).getComponent());
this.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE)); this.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
this.setPreferredSize(AlphaFineConstants.PREVIEW_SIZE); this.setPreferredSize(AlphaFineConstants.PREVIEW_SIZE);
} }

15
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/TemplateResourceImagePanel.java

@ -1,9 +1,10 @@
package com.fr.design.mainframe.alphafine.component; package com.fr.design.mainframe.alphafine.component;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.design.mainframe.alphafine.model.TemplateResource; import com.fr.design.mainframe.alphafine.model.TemplateResource;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.FRFont;
import com.fr.third.jodd.util.StringUtil; import com.fr.third.jodd.util.StringUtil;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -19,9 +20,11 @@ import java.awt.RenderingHints;
public class TemplateResourceImagePanel extends JPanel { public class TemplateResourceImagePanel extends JPanel {
private static final int BACKGROUND_HEIGHT = 20; private static final int BACKGROUND_HEIGHT = FineUIScale.scale(20);
private static final Color BACKGROUND_COLOR = new Color(0x419BF9); private static final int HEIGHT_OFFSET = FineUIScale.scale(5);
private static final Color BACKGROUND_COLOR = FineUIUtils.getUIColor("defaultHighlightBorderColor", "Component.focusedBorderColor");
private static final Font TAG_FONT = DesignUtils.getDefaultGUIFont().applySize(12); private static final Font TAG_FONT = DesignUtils.getDefaultGUIFont().applySize(12);
@ -29,8 +32,8 @@ public class TemplateResourceImagePanel extends JPanel {
private TemplateResource templateResource; private TemplateResource templateResource;
private int width = 200; private int width = FineUIScale.scale(200);
private int height = 100; private int height = FineUIScale.scale(100);
public TemplateResourceImagePanel(TemplateResource templateResource) { public TemplateResourceImagePanel(TemplateResource templateResource) {
this.templateResource = templateResource; this.templateResource = templateResource;
@ -68,7 +71,7 @@ public class TemplateResourceImagePanel extends JPanel {
g2.setColor(Color.WHITE); g2.setColor(Color.WHITE);
int x = (getWidth() - GraphHelper.getWidth(tagName, g2.getFont())) / 2; int x = (getWidth() - GraphHelper.getWidth(tagName, g2.getFont())) / 2;
g2.setFont(TAG_FONT); g2.setFont(TAG_FONT);
g2.drawString(tagName, x, getHeight() - 5); g2.drawString(tagName, x, getHeight() - HEIGHT_OFFSET);
} }
g2.setColor(defaultColor); g2.setColor(defaultColor);
} }

44
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/NetWorkFailedPane.java

@ -1,21 +1,25 @@
package com.fr.design.mainframe.alphafine.preview; package com.fr.design.mainframe.alphafine.preview;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.actions.help.alphafine.AlphaFineConstants; import com.fr.design.actions.help.alphafine.AlphaFineConstants;
import com.fr.design.mainframe.share.ui.base.MouseClickListener; import com.fr.design.mainframe.share.ui.base.MouseClickListener;
import com.fr.general.IOUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.FlowLayout;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.fix;
/** /**
* @author hades * @author hades
* @version 11.0 * @version 11.0
@ -38,17 +42,10 @@ public class NetWorkFailedPane extends JPanel {
} }
private JPanel createInternetErrorPane() { private JPanel createInternetErrorPane() {
JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); JPanel panel = new JPanel(new BorderLayout());
panel.setBackground(Color.WHITE); panel.setBackground(Color.WHITE);
UILabel imagePanel = new UILabel(IOUtils.readIcon("/com/fr/base/images/share/internet_error.png")); UILabel reloadLabel = new UILabel(Toolkit.i18nText("Fine-Design_Share_Online_Reload"));
imagePanel.setBorder(BorderFactory.createEmptyBorder(50, 280, 0, 0)); reloadLabel.setForeground(FineUIUtils.getUIColor("defaultHighlightBorderColor", "Component.focusedBorderColor"));
panel.add(imagePanel);
UILabel uiLabel = tipLabel(Toolkit.i18nText("Fine-Design_Share_Internet_Connect_Failed"));
uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 300, 0, 0));
uiLabel.setForeground(Color.decode("#8F8F92"));
UILabel reloadLabel = tipLabel(Toolkit.i18nText("Fine-Design_Share_Online_Reload"));
reloadLabel.setBorder(BorderFactory.createEmptyBorder(0, 310, 0, 0));
reloadLabel.setForeground(Color.decode("#419BF9"));
reloadLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); reloadLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
reloadLabel.addMouseListener(new MouseClickListener() { reloadLabel.addMouseListener(new MouseClickListener() {
@Override @Override
@ -56,14 +53,15 @@ public class NetWorkFailedPane extends JPanel {
reload.run(); reload.run();
} }
}); });
panel.add(uiLabel); panel.add(column(
panel.add(reloadLabel); flex(),
row(flex(), cell(new UILabel(new LazyIcon("internet_error", 110))), flex()),
fix(4),
row(flex(), cell(new UILabel(Toolkit.i18nText("Fine-Design_Share_Internet_Connect_Failed"), FineUIStyle.LABEL_DISABLED)), flex()),
fix(10),
row(flex(), cell(reloadLabel), flex()),
flex()
).getComponent());
return panel; return panel;
} }
private UILabel tipLabel(String text) {
UILabel tipLabel = new UILabel(text);
tipLabel.setHorizontalAlignment(SwingConstants.CENTER);
return tipLabel;
}
} }

54
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateResourceDetailPane.java

@ -1,6 +1,9 @@
package com.fr.design.mainframe.alphafine.preview; package com.fr.design.mainframe.alphafine.preview;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.actions.help.alphafine.AlphaFineConstants; import com.fr.design.actions.help.alphafine.AlphaFineConstants;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.link.MessageWithLink; import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
@ -13,7 +16,6 @@ import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.LinkStrUtils; import com.fr.design.utils.LinkStrUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -28,6 +30,11 @@ import java.awt.RenderingHints;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.theme.utils.FineUIScale.scale;
public class TemplateResourceDetailPane extends JPanel { public class TemplateResourceDetailPane extends JPanel {
@ -40,17 +47,18 @@ public class TemplateResourceDetailPane extends JPanel {
private UIScrollPane detailInfoPane; private UIScrollPane detailInfoPane;
private static final int IMAGE_HEIGHT = 170; private static final int IMAGE_HEIGHT = scale(170);
private static final int IMAGE_WIDTH = 310; private static final int IMAGE_WIDTH = scale(310);
private static final int SCROLL_PANE_WIDTH = 315; private static final int SCROLL_PANE_WIDTH = scale(315);
private static final int SCROLL_PANE_HEIGHT = 135; private static final int SCROLL_PANE_HEIGHT = scale(135);
private static final int CONTENT_PANE_WIDTH = 320; private static final int CONTENT_PANE_WIDTH = scale(320);
private static final int CONTENT_PANE_HEIGHT = 180; private static final int CONTENT_PANE_HEIGHT = scale(180);
private static final int DETAIL_PANE_HEIGHT = 95; private static final int DETAIL_PANE_HEIGHT = scale(95);
private static final int TEXT_SCROLL_PANE_HEIGHT = 500; private static final int TEXT_SCROLL_PANE_HEIGHT = scale(95);
private static final int PANE_WIDTH = 635; private static final int PANE_WIDTH = scale(635);
private static final int BUTTON_WIDTH = 68; private static final int BUTTON_WIDTH = scale(68);
private static final int BUTTON_HEIGHT = 20; private static final int BUTTON_HEIGHT = scale(20);
private static final int BUTTON_OFFSET = scale(4);
private static final String GOTO_DETAIL = Toolkit.i18nText("Fine-Design_Report_AlphaFine_Template_Detail_GOTO_DETAIL"); private static final String GOTO_DETAIL = Toolkit.i18nText("Fine-Design_Report_AlphaFine_Template_Detail_GOTO_DETAIL");
private static final String START_USE = Toolkit.i18nText("Fine-Design_Report_AlphaFine_Template_Detail_START_USE"); private static final String START_USE = Toolkit.i18nText("Fine-Design_Report_AlphaFine_Template_Detail_START_USE");
@ -66,7 +74,7 @@ public class TemplateResourceDetailPane extends JPanel {
private static final Color INFO_PANE_BACKGROUND = new Color(0xf9f9f9); private static final Color INFO_PANE_BACKGROUND = new Color(0xf9f9f9);
private static final Color INFO_PANE_FOREGROUND = new Color(0x5b5b5c); private static final Color INFO_PANE_FOREGROUND = new Color(0x5b5b5c);
private static final Color MORE_INFO_LINK = new Color(0x419bf9); private static final Color MORE_INFO_LINK = FineUIUtils.getUIColor("defaultHighlightBorderColor", "Component.focusedBorderColor");
private static final Font HTML_FONT = DesignUtils.getDefaultGUIFont().applySize(12); private static final Font HTML_FONT = DesignUtils.getDefaultGUIFont().applySize(12);
private static final Color HTML_COLOR = new Color(0x5c5c5d); private static final Color HTML_COLOR = new Color(0x5c5c5d);
@ -79,11 +87,11 @@ public class TemplateResourceDetailPane extends JPanel {
public TemplateResourceDetailPane(TemplateResourceDetail detail) { public TemplateResourceDetailPane(TemplateResourceDetail detail) {
this.data = detail; this.data = detail;
initComponent(); initComponent();
this.setLayout(new FlowLayout(FlowLayout.LEFT)); this.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
this.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 20)); this.add(column(LayoutConstants.VGAP_HUGER,
this.add(imagePane); row(LayoutConstants.HORIZONTAL_GAP, cell(imagePane), cell(contentPane)),
this.add(contentPane); cell(detailInfoPane)
this.add(detailInfoPane); ).getComponent());
this.setBackground(Color.WHITE); this.setBackground(Color.WHITE);
SwingUtilities.invokeLater(()->{scrollToTop();}); SwingUtilities.invokeLater(()->{scrollToTop();});
} }
@ -120,7 +128,7 @@ public class TemplateResourceDetailPane extends JPanel {
operatePane = new JPanel(new FlowLayout(FlowLayout.LEFT)); operatePane = new JPanel(new FlowLayout(FlowLayout.LEFT));
JLabel emptyLabel = new JLabel(); JLabel emptyLabel = new JLabel();
emptyLabel.setPreferredSize(new Dimension(145, 25)); emptyLabel.setPreferredSize(scale(new Dimension(145, 25)));
JLabel priceLabel = new JLabel(); JLabel priceLabel = new JLabel();
priceLabel.setForeground(Color.RED); priceLabel.setForeground(Color.RED);
if (data.getPrice() == 0) { if (data.getPrice() == 0) {
@ -172,11 +180,11 @@ public class TemplateResourceDetailPane extends JPanel {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setColor(UIConstants.FLESH_BLUE); g2d.setColor(UIConstants.FLESH_BLUE);
g2d.fillRoundRect(0, 0, getWidth(), getHeight(), 4, 4); g2d.fillRoundRect(0, 0, getWidth(), getHeight(), BUTTON_OFFSET, BUTTON_OFFSET);
super.paintComponent(g2d); super.paintComponent(g2d);
} }
}; };
starUseButton.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); starUseButton.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
starUseButton.setForeground(Color.WHITE); starUseButton.setForeground(Color.WHITE);
starUseButton.setFont(AlphaFineConstants.MEDIUM_FONT); starUseButton.setFont(AlphaFineConstants.MEDIUM_FONT);
starUseButton.addActionListener(new StartUseAction(data)); starUseButton.addActionListener(new StartUseAction(data));
@ -214,7 +222,7 @@ public class TemplateResourceDetailPane extends JPanel {
infoScrollPane = new UIScrollPane(content); infoScrollPane = new UIScrollPane(content);
infoScrollPane.setForeground(INFO_PANE_FOREGROUND); infoScrollPane.setForeground(INFO_PANE_FOREGROUND);
infoScrollPane.setPreferredSize(new Dimension(SCROLL_PANE_WIDTH, SCROLL_PANE_HEIGHT)); infoScrollPane.setPreferredSize(new Dimension(SCROLL_PANE_WIDTH, SCROLL_PANE_HEIGHT));
infoScrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); infoScrollPane.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
} }
/** /**
@ -225,7 +233,7 @@ public class TemplateResourceDetailPane extends JPanel {
detailInfoPane = new UIScrollPane(content); detailInfoPane = new UIScrollPane(content);
detailInfoPane.setPreferredSize(new Dimension(PANE_WIDTH, DETAIL_PANE_HEIGHT)); detailInfoPane.setPreferredSize(new Dimension(PANE_WIDTH, DETAIL_PANE_HEIGHT));
detailInfoPane.setBackground(Color.WHITE); detailInfoPane.setBackground(Color.WHITE);
detailInfoPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); detailInfoPane.setBorder(new ScaledEmptyBorder(0, 0, 0, 0));
} }

Loading…
Cancel
Save