mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fix shortcuts
This commit is contained in:
@@ -659,7 +659,7 @@ public class TreePanel extends JPanel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setText("<html>" + payload.toString() + shortCutHtml + variantsHtml + "</html>");
|
setText("<html>" + payload.forDisplay() + shortCutHtml + variantsHtml + "</html>");
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@@ -704,20 +704,23 @@ public class TreePanel extends JPanel {
|
|||||||
return clickListener;
|
return clickListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String categoryForDisplay() {
|
public String forDisplay() {
|
||||||
String display = category;
|
if (componentType == null) {
|
||||||
Matcher match = contributedPattern.matcher(display);
|
String display = category;
|
||||||
if (match.find()) {
|
Matcher match = contributedPattern.matcher(display);
|
||||||
String name = match.group(1);
|
if (match.find()) {
|
||||||
String owner = match.group(2);
|
String name = match.group(1);
|
||||||
display = name + "<font color='gray'>[" + owner + "]</font>";
|
String owner = match.group(2);
|
||||||
|
display = name + "<font color='gray'>[" + owner + "]</font>";
|
||||||
|
}
|
||||||
|
return display;
|
||||||
}
|
}
|
||||||
return display;
|
return componentType.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return componentType == null ? categoryForDisplay() : componentType.getName();
|
return componentType == null ? category : componentType.getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user