mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-06 14:45:50 +00:00
Issue #1118 Loading characters through ImportAssets - show as readonly
icon
This commit is contained in:
@@ -24,6 +24,7 @@ import com.jpexs.decompiler.flash.helpers.HighlightedText;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightSpecialType;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
|
||||
import com.jpexs.decompiler.flash.tags.DefineEditTextTag;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.FontTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.MissingCharacterHandler;
|
||||
import com.jpexs.decompiler.flash.tags.base.TextTag;
|
||||
@@ -59,6 +60,8 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
|
||||
private final LineMarkedEditorPane textValue;
|
||||
|
||||
private final JPanel buttonsPanel;
|
||||
|
||||
private final JButton textEditButton;
|
||||
|
||||
private final JButton textSaveButton;
|
||||
@@ -132,7 +135,7 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
topPanel.add(textButtonsPanel);
|
||||
add(topPanel, BorderLayout.NORTH);
|
||||
|
||||
JPanel buttonsPanel = new JPanel(new FlowLayout());
|
||||
buttonsPanel = new JPanel(new FlowLayout());
|
||||
textEditButton = createButton("button.edit", "edit16", null, e -> editText());
|
||||
textSaveButton = createButton("button.save", "save16", null, e -> saveText(true));
|
||||
textCancelButton = createButton("button.cancel", "cancel16", null, e -> cancelText());
|
||||
@@ -174,6 +177,17 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
textValue.setCaretPosition(0);
|
||||
setModified(false);
|
||||
setEditText(false);
|
||||
boolean readOnly = ((Tag) textTag).isReadOnly();
|
||||
textValue.setEditable(!readOnly);
|
||||
buttonsPanel.setVisible(!readOnly);
|
||||
textAlignLeftButton.setVisible(!readOnly);
|
||||
textAlignCenterButton.setVisible(!readOnly);
|
||||
textAlignRightButton.setVisible(!readOnly);
|
||||
textAlignJustifyButton.setVisible(!readOnly);
|
||||
decreaseTranslateXButton.setVisible(!readOnly);
|
||||
increaseTranslateXButton.setVisible(!readOnly);
|
||||
changeCaseButton.setVisible(!readOnly);
|
||||
undoChangesButton.setVisible(!readOnly);
|
||||
}
|
||||
|
||||
private boolean isModified() {
|
||||
|
||||
Reference in New Issue
Block a user