mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 04:40:46 +00:00
Added: #1418 Option to make main window Always on top
This commit is contained in:
@@ -25,7 +25,6 @@ import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.configuration.ConfigurationItemChangeListener;
|
||||
import com.jpexs.decompiler.flash.console.ContextMenuTools;
|
||||
import com.jpexs.decompiler.flash.easygui.EasyPanel;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfFlashDevelopExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfIntelliJIdeaExporter;
|
||||
import com.jpexs.decompiler.flash.exporters.swf.SwfVsCodeExporter;
|
||||
@@ -1292,6 +1291,9 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
finishMenu("/file/start");
|
||||
|
||||
addMenuItem("/file/view", translate("menu.view"), null, null, 0, null, false, null, false);
|
||||
if (!supportsAppMenu()) {
|
||||
addToggleMenuItem("/file/view/alwaysOnTop", translate("menu.file.view.alwaysOnTop"), null, null, this::alwaysOnTopActionPerformed, 0, null);
|
||||
}
|
||||
addToggleMenuItem("/file/view/viewResources", translate("menu.file.view.resources"), "view", "viewresources16", this::viewResourcesActionPerformed, PRIORITY_MEDIUM, null);
|
||||
addToggleMenuItem("/file/view/viewTagList", translate("menu.file.view.tagList"), "view", "taglist16", this::viewTagListActionPerformed, PRIORITY_MEDIUM, null);
|
||||
addToggleMenuItem("/file/view/viewHex", translate("menu.file.view.hex"), "view", "viewhex16", this::viewHexActionPerformed, PRIORITY_MEDIUM, null);
|
||||
@@ -1555,6 +1557,11 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void alwaysOnTopActionPerformed(ActionEvent evt) {
|
||||
mainFrame.getWindow().setAlwaysOnTop(!mainFrame.getWindow().isAlwaysOnTop());
|
||||
setMenuChecked("/file/view/alwaysOnTop", mainFrame.getWindow().isAlwaysOnTop());
|
||||
}
|
||||
|
||||
private void viewResourcesActionPerformed(ActionEvent evt) {
|
||||
if (mainFrame.getPanel().checkEdited()) {
|
||||
|
||||
@@ -38,9 +38,22 @@ import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowStateListener;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.plaf.RootPaneUI;
|
||||
import org.pushingpixels.flamingo.api.ribbon.JRibbon;
|
||||
import org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.JRibbonApplicationMenuButton;
|
||||
import org.pushingpixels.substance.api.DecorationAreaType;
|
||||
import org.pushingpixels.substance.api.SubstanceColorScheme;
|
||||
import org.pushingpixels.substance.api.SubstanceLookAndFeel;
|
||||
import org.pushingpixels.substance.flamingo.ribbon.ui.SubstanceRibbonRootPaneUI;
|
||||
import org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities;
|
||||
import org.pushingpixels.substance.internal.utils.SubstanceTitleButton;
|
||||
import org.pushingpixels.substance.internal.utils.icon.SubstanceIconFactory;
|
||||
import org.pushingpixels.substance.internal.utils.icon.TransitionAwareIcon;
|
||||
|
||||
/**
|
||||
* @author JPEXS
|
||||
@@ -168,10 +181,70 @@ public final class MainFrameRibbon extends AppRibbonFrame {
|
||||
}
|
||||
});
|
||||
|
||||
View.centerScreenMain(this);
|
||||
|
||||
}
|
||||
View.centerScreenMain(this);
|
||||
/*addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowOpened(WindowEvent e) {
|
||||
RootPaneUI ui = getRootPane().getUI();
|
||||
if (ui instanceof SubstanceRibbonRootPaneUI) {
|
||||
SubstanceRibbonRootPaneUI sui = (SubstanceRibbonRootPaneUI) ui;
|
||||
JComponent titlePane = sui.getTitlePane();
|
||||
final String EXTRA_COMPONENT_KIND = "substancelaf.internal.titlePane.extraComponentKind";
|
||||
Object trailing = null;
|
||||
int i = 0;
|
||||
int cnt = titlePane.getComponentCount();
|
||||
for (; i < cnt; i++) {
|
||||
Component c = titlePane.getComponent(i);
|
||||
|
||||
if (c instanceof JComponent) {
|
||||
JComponent jc = (JComponent) c;
|
||||
Object o = jc.getClientProperty(EXTRA_COMPONENT_KIND);
|
||||
if ("TRAILING".equals("" + o)) {
|
||||
trailing = o;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (trailing != null) {
|
||||
JButton button = new SubstanceTitleButton();
|
||||
button.setFocusPainted(false);
|
||||
button.setFocusable(false);
|
||||
button.setOpaque(true);
|
||||
|
||||
button.putClientProperty(EXTRA_COMPONENT_KIND, trailing);
|
||||
button.setText(null);
|
||||
button.setBorder(null);
|
||||
|
||||
Icon minIcon = new TransitionAwareIcon(button,
|
||||
new TransitionAwareIcon.Delegate() {
|
||||
@Override
|
||||
public Icon getColorSchemeIcon(
|
||||
SubstanceColorScheme scheme) {
|
||||
return SubstanceIconFactory
|
||||
.getTitlePaneIcon(
|
||||
SubstanceIconFactory.IconKind.MINIMIZE,
|
||||
scheme,
|
||||
SubstanceCoreUtilities
|
||||
.getSkin(rootPane)
|
||||
.getBackgroundColorScheme(
|
||||
DecorationAreaType.PRIMARY_TITLE_PANE));
|
||||
}
|
||||
}, "substance.titlePane.minIcon");
|
||||
|
||||
button.setIcon(minIcon);
|
||||
button.setToolTipText("Zkouska");
|
||||
button.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY,
|
||||
Boolean.TRUE);
|
||||
|
||||
titlePane.remove(i);
|
||||
titlePane.add(button, i);
|
||||
titlePane.revalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExtendedState(int state) {
|
||||
if ((state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH) {
|
||||
|
||||
@@ -1053,4 +1053,6 @@ zoom.enter = Enter zoom percentage value:
|
||||
contextmenu.showInEasy = Show in Simple editor
|
||||
|
||||
#after 23.0.1
|
||||
work.debugging.start = Starting Flash content debugger
|
||||
work.debugging.start = Starting Flash content debugger
|
||||
|
||||
menu.file.view.alwaysOnTop = Always on top
|
||||
@@ -611,4 +611,7 @@ message.confirm.remove.nodep = Segur que vols eliminar %item%?
|
||||
message.confirm.removemultiple.nodep = Segur que vols eliminar %count% elements?
|
||||
|
||||
#...
|
||||
filter.swf_spl = Fitxers SWF (*.swf, *.spl)
|
||||
filter.swf_spl = Fitxers SWF (*.swf, *.spl)
|
||||
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Sempre al damunt
|
||||
@@ -442,8 +442,8 @@ text.align.right = Zarovnat vpravo
|
||||
text.align.center = Zarovnat na st\u0159ed
|
||||
text.align.justify = Zarovnat do bloku
|
||||
text.undo = Vr\u00e1tit zm\u011bny
|
||||
menu.file.import.xml = Import SWF XML
|
||||
menu.file.export.xml = Export SWF XML
|
||||
menu.file.import.xml = Importovat SWF XML
|
||||
menu.file.export.xml = Exportovat SWF XML
|
||||
#after version 4.1.1
|
||||
text.align.translatex.decrease = Sn\u00ed\u017eit TranslateX
|
||||
text.align.translatex.increase = Zv\u00fd\u0161it TranslateX
|
||||
@@ -1053,4 +1053,5 @@ zoom.enter = Zadejte hodnotu p\u0159ibl\u00ed\u017een\u00ed v procentech:
|
||||
contextmenu.showInEasy = Zobrazit v Jednoduch\u00e9m editoru
|
||||
|
||||
#after 23.0.1
|
||||
work.debugging.start = Spou\u0161t\u00ed se Flash content debugger
|
||||
work.debugging.start = Spou\u0161t\u00ed se Flash content debugger
|
||||
menu.file.view.alwaysOnTop = V\u017edy navrchu
|
||||
@@ -495,4 +495,7 @@ message.confirm.removemultiple.nodep = Wollen sie wirklich %count% Elemente entf
|
||||
contextmenu.exportFla = Exportiere als *.FLA
|
||||
|
||||
#...
|
||||
filter.swf_spl = SWF Dateien (*.swf, *.spl)
|
||||
filter.swf_spl = SWF Dateien (*.swf, *.spl)
|
||||
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Immer im Vordergrund
|
||||
@@ -566,4 +566,6 @@ message.confirm.remove.nodep = Est\u00e1 seguro que desea remover %item%?
|
||||
message.confirm.removemultiple.nodep = Est\u00e1 seguro que desea eliminar %count% art\u00edculos?
|
||||
contextmenu.exportFla = Exportar a FLA
|
||||
#...
|
||||
filter.swf_spl = Archivos SWF (*.swf, *.spl)
|
||||
filter.swf_spl = Archivos SWF (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Siempre encima
|
||||
@@ -582,4 +582,6 @@ message.confirm.remove.nodep = \u00cates-vous s\u00fbr de vouloir retirer les ob
|
||||
message.confirm.removemultiple.nodep = \u00cates-vous s\u00fbr de vouloir retirer %count% objets ?
|
||||
contextmenu.exportFla = Exporter en FLA
|
||||
#...
|
||||
filter.swf_spl = Fichiers SWF (*.swf, *.spl)
|
||||
filter.swf_spl = Fichiers SWF (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Toujours au-dessus
|
||||
@@ -563,4 +563,6 @@ message.confirm.remove.nodep = Biztos benne, hogy t\u00f6r\u00f6lni k\u00edv\u00
|
||||
message.confirm.removemultiple.nodep = Biztos benne, hogy t\u00f6r\u00f6lni k\u00edv\u00e1nja a %count% elemet ?
|
||||
contextmenu.exportFla = Export\u00e1l\u00e1s FLA-ba
|
||||
#...
|
||||
filter.swf_spl = SWF f\u00e1ljok (*.swf, *.spl)
|
||||
filter.swf_spl = SWF f\u00e1ljok (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Mindig fel\u00fcl
|
||||
@@ -566,4 +566,6 @@ message.confirm.remove.nodep = Sicuro di voler remuovere %item%?
|
||||
message.confirm.removemultiple.nodep = Confermare la rimozione di %count% elementi?
|
||||
contextmenu.exportFla = Esporta come FLA
|
||||
#...
|
||||
filter.swf_spl = File SWF (*.swf, *.spl)
|
||||
filter.swf_spl = File SWF (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Sempre in primo piano
|
||||
@@ -646,4 +646,6 @@ button.showin.flashprojector = flash projector \u3067\u8868\u793a
|
||||
contextmenu.exportFla = FLA \u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8
|
||||
|
||||
#...
|
||||
filter.swf_spl = SWF \u30d5\u30a1\u30a4\u30eb (*.swf, *.spl)
|
||||
filter.swf_spl = SWF \u30d5\u30a1\u30a4\u30eb (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = \u5e38\u306b\u6700\u524d\u9762
|
||||
@@ -958,4 +958,6 @@ node.scenes = sc\u00e8nes
|
||||
contextmenu.showInFramesFolder = Weergeven in framesmap
|
||||
contextmenu.exportFla = Naar FLA exporteren
|
||||
#...
|
||||
filter.swf_spl = SWF-bestanden (*.swf, *.spl)
|
||||
filter.swf_spl = SWF-bestanden (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Altijd bovenop
|
||||
@@ -410,4 +410,6 @@ message.confirm.remove.nodep = Czy na pewno chcesz usun\u0105\u0107 %item%?
|
||||
message.confirm.removemultiple.nodep = Czy na pewno chcesz usun\u0105\u0107 %count% obiekt\u00f3w(y)?
|
||||
contextmenu.exportFla = Eskportuj do pliku FLA
|
||||
#...
|
||||
filter.swf_spl = Pliki SWF (*.swf, *.spl)
|
||||
filter.swf_spl = Pliki SWF (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Zawsze na wierzchu
|
||||
@@ -283,4 +283,6 @@ ColorChooser.sampleText = Amostra de Texto Amostra de Texto
|
||||
message.confirm.remove.nodep = Tem a certeza que pretende remover %item%?
|
||||
contextmenu.exportFla = Exportar para FLA
|
||||
#...
|
||||
filter.swf_spl = Ficheiros SWF (*.swf, *.spl)
|
||||
filter.swf_spl = Ficheiros SWF (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Sempre no topo
|
||||
@@ -925,4 +925,6 @@ shaperecords.edge.style.fillstyle1=FillStyle1 = %value%
|
||||
shaperecords.edge.end = Fim da forma
|
||||
contextmenu.exportFla = Exportar para FLA
|
||||
#...
|
||||
filter.swf_spl = Arquivos SWF (*.swf, *.spl)
|
||||
filter.swf_spl = Arquivos SWF (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Sempre no topo
|
||||
@@ -454,4 +454,6 @@ message.confirm.remove.nodep = \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d
|
||||
message.confirm.removemultiple.nodep = \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435: %count%?
|
||||
contextmenu.exportFla = \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 FLA
|
||||
#...
|
||||
filter.swf_spl = SWF \u0444\u0430\u0439\u043b\u044b (*.swf, *.spl)
|
||||
filter.swf_spl = SWF \u0444\u0430\u0439\u043b\u044b (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0432\u0435\u0440\u0445
|
||||
@@ -644,4 +644,6 @@ notavailable.activex.disable = Du kan aktivera med intern visning genom att avma
|
||||
button.showin.flashprojector = Visa i flash projector
|
||||
contextmenu.exportFla = Exporterar FLA
|
||||
#...
|
||||
filter.swf_spl = SWF filer (*.swf, *.spl)
|
||||
filter.swf_spl = SWF filer (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Alltid \u00f6verst
|
||||
@@ -1037,3 +1037,5 @@ zoom.enter = Yak\u0131nla\u015ft\u0131rma y\u00fczdesi de\u011ferini girin:
|
||||
contextmenu.showInEasy = Basit d\u00fczenleyicide g\u00f6ster
|
||||
#after 23.0.1
|
||||
work.debugging.start = Flash i\u00e7erik hata ay\u0131klay\u0131c\u0131s\u0131n\u0131 ba\u015flatma
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = Her zaman \u00fcstte
|
||||
@@ -337,4 +337,6 @@ message.confirm.remove.nodep = \u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435
|
||||
message.confirm.removemultiple.nodep = \u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438 \u0443 \u043a\u0456\u043b\u044c\u043a\u043e\u0441\u0442\u0456: %count%?
|
||||
contextmenu.exportFla = \u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0434\u043e FLA
|
||||
#...
|
||||
filter.swf_spl = SWF \u0444\u0430\u0439\u043b\u0438 (*.swf, *.spl)
|
||||
filter.swf_spl = SWF \u0444\u0430\u0439\u043b\u0438 (*.swf, *.spl)
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = \u0417\u0430\u0432\u0436\u0434\u0438 \u0437\u0432\u0435\u0440\u0445\u0443
|
||||
@@ -1007,3 +1007,5 @@ menu.tools.solEditor = \u5b58\u6863\u7f16\u8f91\u5668
|
||||
node.cookies = \u5b58\u6863
|
||||
menu.help.wiki = \u8bbf\u95eeFFDec\u7ef4\u57fa\u767e\u79d1
|
||||
message.wiki = \u8bbf\u95eeFFDec\u7ef4\u57fa\u767e\u79d1: \r\n%url%
|
||||
#...
|
||||
menu.file.view.alwaysOnTop = \u59cb\u7ec8\u5728\u6700\u4e0a\u5c42
|
||||
Reference in New Issue
Block a user