mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Javafx: Support application icon in JavaFX self-contained app deployment - show system-dependent paths in dialog, mnemonics in dialog (IDEA-134616)
This commit is contained in:
+6
-3
@@ -13,7 +13,8 @@
|
||||
<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 value="Linux Icon"/>
|
||||
<labelFor value="153bd"/>
|
||||
<text value="&Linux Icon"/>
|
||||
</properties>
|
||||
</component>
|
||||
<vspacer id="3b423">
|
||||
@@ -32,7 +33,8 @@
|
||||
<grid row="1" 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 value="Mac Icon"/>
|
||||
<labelFor value="4c06e"/>
|
||||
<text value="&Mac Icon"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="4c06e" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="myMacIconPath">
|
||||
@@ -46,7 +48,8 @@
|
||||
<grid row="2" 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 value="Windows Icon"/>
|
||||
<labelFor value="8c868"/>
|
||||
<text value="&Windows Icon"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="8c868" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="myWindowsIconPath">
|
||||
|
||||
+7
-3
@@ -28,9 +28,9 @@ public class JavaFxApplicationIconsDialog extends DialogWrapper {
|
||||
init();
|
||||
|
||||
if (icons != null) {
|
||||
myPanel.myLinuxIconPath.setText(icons.getLinuxIcon());
|
||||
myPanel.myMacIconPath.setText(icons.getMacIcon());
|
||||
myPanel.myWindowsIconPath.setText(icons.getWindowsIcon());
|
||||
setSystemDependentPath(myPanel.myLinuxIconPath, icons.getLinuxIcon());
|
||||
setSystemDependentPath(myPanel.myMacIconPath, icons.getMacIcon());
|
||||
setSystemDependentPath(myPanel.myWindowsIconPath, icons.getWindowsIcon());
|
||||
}
|
||||
|
||||
addBrowseListener(myPanel.myLinuxIconPath, "png", project);
|
||||
@@ -71,6 +71,10 @@ public class JavaFxApplicationIconsDialog extends DialogWrapper {
|
||||
return FileUtil.toSystemIndependentName(text.trim());
|
||||
}
|
||||
|
||||
private static void setSystemDependentPath(TextFieldWithBrowseButton withBrowseButton, String path) {
|
||||
withBrowseButton.setText(!StringUtil.isEmptyOrSpaces(path) ? FileUtil.toSystemDependentName(path) : "");
|
||||
}
|
||||
|
||||
private boolean isValidPath(TextFieldWithBrowseButton withBrowseButton, ProjectFileIndex index, String osName) {
|
||||
final String text = withBrowseButton.getText();
|
||||
if (StringUtil.isEmptyOrSpaces(text)) return true;
|
||||
|
||||
Reference in New Issue
Block a user