diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java index b5214ca48..7c29b5741 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java @@ -42,16 +42,14 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { public JEditorPane slotConstEditor; private ABC abc; private TraitSlotConst trait; - private JTextPane warnLabel; - + private boolean showWarning=false; + public SlotConstTraitDetailPanel() { slotConstEditor = new JEditorPane(); setLayout(new BorderLayout()); add(new JLabel(translate("abc.detail.slotconst.typevalue")), BorderLayout.NORTH); add(new JScrollPane(slotConstEditor), BorderLayout.CENTER); - warnLabel = new JTextPane(); - warnLabel.setText(translate("warning.initializers")); - StyledDocument doc = warnLabel.getStyledDocument(); + /*StyledDocument doc = warnLabel.getStyledDocument(); SimpleAttributeSet center = new SimpleAttributeSet(); StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER); doc.setParagraphAttributes(0, doc.getLength(), center, false); @@ -60,7 +58,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { //warnLabel.setWrapStyleWord(true); //warnLabel.setLineWrap(true); warnLabel.setFont(new JLabel().getFont().deriveFont(Font.BOLD)); - add(warnLabel, BorderLayout.SOUTH); + add(warnLabel, BorderLayout.SOUTH);*/ slotConstEditor.setContentType("text/flasm3_methodinfo"); Flasm3MethodInfoSyntaxKit sk = (Flasm3MethodInfoSyntaxKit) slotConstEditor.getEditorKit(); sk.deinstallComponent(slotConstEditor, "jsyntaxpane.components.LineNumbersRuler"); @@ -83,7 +81,8 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { s = typeStr + valueStr; - warnLabel.setVisible(trait.isConst() || isStatic); + showWarning = trait.isConst()||isStatic; + //warnLabel.setVisible(trait.isConst() || isStatic); slotConstEditor.setText(s); } @@ -102,6 +101,9 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail { @Override public void setEditMode(boolean val) { + if(val){ + JOptionPane.showMessageDialog(null, translate("warning.initializers"), translate("message.warning"), JOptionPane.WARNING_MESSAGE); + } slotConstEditor.setEditable(val); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties index 63031015d..1f86e1086 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties @@ -336,4 +336,4 @@ startup.selectopen = Click open icon on the top panel or drag SWF file to this w error.font.nocharacter = Selected source font does not contain character "%char%". -warning.initializers = WARNING:\nStatic fields and consts are often initialized in initializers.\nEditing value here is usually not enough! +warning.initializers = Static fields and consts are often initialized in initializers.\nEditing value here is usually not enough! diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties index 5d8a32a29..e3f863944 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties @@ -334,4 +334,4 @@ startup.selectopen = Pro za\u010d\u00e1tek klikn\u011bte na otev\u0159\u00edt v error.font.nocharacter = Vybran\u00e9 zdrojov\u00e9 p\u00edsmo neobsahuje znak "%char%". -warning.initializers = VAROV\u00c1N\u00cd:\nStatick\u00e9 atributy a konstanty jsou \u010dasto inicializov\u00e1ny pomoc\u00ed inicializ\u00e1tor\u016f.\nPokud to uprav\u00edte zde, obvykle to nesta\u010d\u00ed! \ No newline at end of file +warning.initializers = Statick\u00e9 atributy a konstanty jsou \u010dasto inicializov\u00e1ny pomoc\u00ed inicializ\u00e1tor\u016f.\nPokud to uprav\u00edte zde, obvykle to nesta\u010d\u00ed! \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties index 1456070c2..1b1b91439 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_hu.properties @@ -334,4 +334,4 @@ startup.selectopen = A kezd\u00e9shez kattintson a megnyit\u00e1s ikonra a fels\ error.font.nocharacter = A kiv\u00e1lasztott forr\u00e1s bet\u0171t\u00edpus nem tartalmazza a "%char%" karaktert. -warning.initializers = WARNING:\nA statikus mez\u0151k \u00e9s konstansok gyakram az initializerekben vannak inicializ\u00e1lva.\nAz \u00e9rt\u00e9k szerkeszt\u00e9se csak itt \u00e1ltal\u00e1ban nem elegend\u0151! \ No newline at end of file +warning.initializers = A statikus mez\u0151k \u00e9s konstansok gyakram az initializerekben vannak inicializ\u00e1lva.\nAz \u00e9rt\u00e9k szerkeszt\u00e9se csak itt \u00e1ltal\u00e1ban nem elegend\u0151! \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties index ee20fe515..e887eba03 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_ru.properties @@ -325,4 +325,4 @@ startup.selectopen = \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0437\u043d\u04 error.font.nocharacter = \u0421\u0438\u043c\u0432\u043e\u043b "%char%" \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0448\u0440\u0438\u0444\u0442\u0435. -warning.initializers = \u0412\u041d\u0418\u041c\u0410\u041d\u0418\u0415:\n\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445.\n\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0434\u0435\u0441\u044c, \u043d\u043e \u0438 \u0442\u0430\u043c! \ No newline at end of file +warning.initializers = \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445.\n\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0434\u0435\u0441\u044c, \u043d\u043e \u0438 \u0442\u0430\u043c! \ No newline at end of file diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_sv.properties b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_sv.properties index cf858eadc..84eaced51 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_sv.properties +++ b/trunk/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_sv.properties @@ -337,4 +337,4 @@ startup.selectopen = Klicka p\u00e5 ikonen \u00d6ppna p\u00e5 den \u00f6vre pane error.font.nocharacter = Vald teckensnitt-k\u00e4lla inneh\u00e5ller inte bokstav "%char%". -warning.initializers = VARNING:\nStatiska f\u00e4lt och consts initieras i initierare ofta.\nRedigera v\u00e4rdet h\u00e4r \u00e4r oftast inte tillr\u00e4ckligt! \ No newline at end of file +warning.initializers = Statiska f\u00e4lt och consts initieras i initierare ofta.\nRedigera v\u00e4rdet h\u00e4r \u00e4r oftast inte tillr\u00e4ckligt! \ No newline at end of file