mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 10:25:18 +00:00
Added #1901 Double click tree node to start edit
Added Info about editation in status bar
This commit is contained in:
@@ -22,6 +22,8 @@ All notable changes to this project will be documented in this file.
|
||||
- [#1900] Transformation panel with flip/move/scale/rotate/skew/matrix options
|
||||
- [#1900] Move object around with arrow keys (in transform mode)
|
||||
- Alt + click selects PlaceObjectTag under cursor
|
||||
- [#1901] Double click tree node to start edit
|
||||
- Info about editation in status bar
|
||||
|
||||
### Fixed
|
||||
- [#1897] Close menu button without selecting specific item
|
||||
@@ -2735,6 +2737,7 @@ All notable changes to this project will be documented in this file.
|
||||
[#1893]: https://www.free-decompiler.com/flash/issues/1893
|
||||
[#1181]: https://www.free-decompiler.com/flash/issues/1181
|
||||
[#1900]: https://www.free-decompiler.com/flash/issues/1900
|
||||
[#1901]: https://www.free-decompiler.com/flash/issues/1901
|
||||
[#1897]: https://www.free-decompiler.com/flash/issues/1897
|
||||
[#1006]: https://www.free-decompiler.com/flash/issues/1006
|
||||
[#1828]: https://www.free-decompiler.com/flash/issues/1828
|
||||
|
||||
@@ -859,6 +859,10 @@ public final class Configuration {
|
||||
@ConfigurationInternal
|
||||
public static ConfigurationItem<String> guiTransformLastExpandedCards = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("display")
|
||||
public static ConfigurationItem<Boolean> doubleClickNodeToEdit = null;
|
||||
|
||||
private enum OSId {
|
||||
WINDOWS, OSX, UNIX
|
||||
}
|
||||
|
||||
@@ -111,14 +111,14 @@ public class FontPanel extends JPanel {
|
||||
}
|
||||
|
||||
public boolean isEditing() {
|
||||
return buttonSave.isVisible();
|
||||
return saveButton.isVisible();
|
||||
}
|
||||
|
||||
private void setEditable(boolean editable) {
|
||||
if (editable) {
|
||||
buttonEdit.setVisible(false);
|
||||
buttonSave.setVisible(true);
|
||||
buttonCancel.setVisible(true);
|
||||
editButton.setVisible(false);
|
||||
saveButton.setVisible(true);
|
||||
cancelButton.setVisible(true);
|
||||
if (fontTag.isBoldEditable()) {
|
||||
fontIsBoldCheckBox.setEnabled(true);
|
||||
}
|
||||
@@ -143,9 +143,9 @@ public class FontPanel extends JPanel {
|
||||
fontLeadingLabel.setVisible(false);
|
||||
}
|
||||
} else {
|
||||
buttonEdit.setVisible(true);
|
||||
buttonSave.setVisible(false);
|
||||
buttonCancel.setVisible(false);
|
||||
editButton.setVisible(true);
|
||||
saveButton.setVisible(false);
|
||||
cancelButton.setVisible(false);
|
||||
fontIsBoldCheckBox.setEnabled(false);
|
||||
fontIsItalicCheckBox.setEnabled(false);
|
||||
fontNameIntagTextField.setVisible(false);
|
||||
@@ -282,7 +282,7 @@ public class FontPanel extends JPanel {
|
||||
boolean readOnly = ((Tag) ft).isReadOnly();
|
||||
if (readOnly) {
|
||||
addCharsPanel.setVisible(false);
|
||||
buttonEdit.setVisible(false);
|
||||
editButton.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,11 +322,11 @@ public class FontPanel extends JPanel {
|
||||
fontFamilyNameSelection = new JComboBox<>();
|
||||
fontFaceSelection = new JComboBox<>();
|
||||
fontEmbedButton = new JButton();
|
||||
buttonEdit = new JButton();
|
||||
buttonSave = new JButton();
|
||||
buttonCancel = new JButton();
|
||||
buttonPreviewFont = new JButton();
|
||||
buttonSetAdvanceValues = new JButton();
|
||||
editButton = new JButton();
|
||||
saveButton = new JButton();
|
||||
cancelButton = new JButton();
|
||||
previewFontButton = new JButton();
|
||||
setAdvanceValuesButton = new JButton();
|
||||
addComponentListener(new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentResized(ComponentEvent evt) {
|
||||
@@ -501,23 +501,23 @@ public class FontPanel extends JPanel {
|
||||
fontEmbedButton.setText(AppStrings.translate("button.font.embed"));
|
||||
fontEmbedButton.addActionListener(this::fontEmbedButtonActionPerformed);
|
||||
|
||||
buttonEdit.setIcon(View.getIcon("edit16"));
|
||||
buttonEdit.setText(AppStrings.translate("button.edit"));
|
||||
buttonEdit.addActionListener(this::buttonEditActionPerformed);
|
||||
editButton.setIcon(View.getIcon("edit16"));
|
||||
editButton.setText(AppStrings.translate("button.edit"));
|
||||
editButton.addActionListener(this::editButtonActionPerformed);
|
||||
|
||||
buttonSave.setIcon(View.getIcon("save16"));
|
||||
buttonSave.setText(AppStrings.translate("button.save"));
|
||||
buttonSave.addActionListener(this::buttonSaveActionPerformed);
|
||||
saveButton.setIcon(View.getIcon("save16"));
|
||||
saveButton.setText(AppStrings.translate("button.save"));
|
||||
saveButton.addActionListener(this::saveButtonActionPerformed);
|
||||
|
||||
buttonCancel.setIcon(View.getIcon("cancel16"));
|
||||
buttonCancel.setText(AppStrings.translate("button.cancel"));
|
||||
buttonCancel.addActionListener(this::buttonCancelActionPerformed);
|
||||
cancelButton.setIcon(View.getIcon("cancel16"));
|
||||
cancelButton.setText(AppStrings.translate("button.cancel"));
|
||||
cancelButton.addActionListener(this::cancelButtonActionPerformed);
|
||||
|
||||
buttonPreviewFont.setText(AppStrings.translate("button.preview"));
|
||||
buttonPreviewFont.addActionListener(this::buttonPreviewFontActionPerformed);
|
||||
previewFontButton.setText(AppStrings.translate("button.preview"));
|
||||
previewFontButton.addActionListener(this::previewButtonFontActionPerformed);
|
||||
|
||||
buttonSetAdvanceValues.setText(AppStrings.translate("button.setAdvanceValues"));
|
||||
buttonSetAdvanceValues.addActionListener(this::buttonSetAdvanceValuesActionPerformed);
|
||||
setAdvanceValuesButton.setText(AppStrings.translate("button.setAdvanceValues"));
|
||||
setAdvanceValuesButton.addActionListener(this::setAdvanceValuesButtonActionPerformed);
|
||||
|
||||
TableLayout tlAddCharsPanel;
|
||||
addCharsPanel.setLayout(tlAddCharsPanel = new TableLayout(new double[][]{
|
||||
@@ -535,13 +535,13 @@ public class FontPanel extends JPanel {
|
||||
addCharsPanel.add(fontSourceLabel, "0,1,R");
|
||||
addCharsPanel.add(fontFamilyNameSelection, "1,1");
|
||||
addCharsPanel.add(fontFaceSelection, "2,1");
|
||||
addCharsPanel.add(buttonPreviewFont, "3,1");
|
||||
addCharsPanel.add(buttonSetAdvanceValues, "4,1");
|
||||
addCharsPanel.add(previewFontButton, "3,1");
|
||||
addCharsPanel.add(setAdvanceValuesButton, "4,1");
|
||||
|
||||
JPanel buttonsPanel = new JPanel(new FlowLayout());
|
||||
buttonsPanel.add(buttonEdit);
|
||||
buttonsPanel.add(buttonSave);
|
||||
buttonsPanel.add(buttonCancel);
|
||||
buttonsPanel.add(editButton);
|
||||
buttonsPanel.add(saveButton);
|
||||
buttonsPanel.add(cancelButton);
|
||||
|
||||
TableLayout tlAll;
|
||||
contentPanel.setLayout(tlAll = new TableLayout(new double[][]{
|
||||
@@ -673,11 +673,12 @@ public class FontPanel extends JPanel {
|
||||
savePair();
|
||||
}
|
||||
|
||||
private void buttonEditActionPerformed(ActionEvent evt) {
|
||||
private void editButtonActionPerformed(ActionEvent evt) {
|
||||
setEditable(true);
|
||||
mainPanel.setEditingStatus();
|
||||
}
|
||||
|
||||
private void buttonSaveActionPerformed(ActionEvent evt) {
|
||||
private void saveButtonActionPerformed(ActionEvent evt) {
|
||||
|
||||
if (!(fontTag instanceof DefineFontTag)) {
|
||||
if (fontTag.getCharacterCount() == 0 && !fontTag.hasLayout()) {
|
||||
@@ -720,18 +721,20 @@ public class FontPanel extends JPanel {
|
||||
mainPanel.getCurrentTree().repaint();
|
||||
fontTag.setModified(true);
|
||||
setEditable(false);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void buttonCancelActionPerformed(ActionEvent evt) {
|
||||
private void cancelButtonActionPerformed(ActionEvent evt) {
|
||||
showFontTag(fontTag);
|
||||
setEditable(false);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void buttonPreviewFontActionPerformed(ActionEvent evt) {
|
||||
private void previewButtonFontActionPerformed(ActionEvent evt) {
|
||||
new FontPreviewDialog(null, true, ((FontFace) fontFaceSelection.getSelectedItem()).font).setVisible(true);
|
||||
}
|
||||
|
||||
private void buttonSetAdvanceValuesActionPerformed(ActionEvent evt) {
|
||||
private void setAdvanceValuesButtonActionPerformed(ActionEvent evt) {
|
||||
if (ViewMessages.showConfirmDialog(FontPanel.this, AppStrings.translate("message.font.setadvancevalues"), AppStrings.translate("message.warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, Configuration.showSetAdvanceValuesMessage, JOptionPane.OK_OPTION) == JOptionPane.OK_OPTION) {
|
||||
fontTag.setAdvanceValues(((FontFace) fontFaceSelection.getSelectedItem()).font);
|
||||
}
|
||||
@@ -791,16 +794,23 @@ public class FontPanel extends JPanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void startEdit() {
|
||||
if (!editButton.isVisible()) {
|
||||
return;
|
||||
}
|
||||
editButtonActionPerformed(null);
|
||||
}
|
||||
|
||||
private JButton buttonCancel;
|
||||
private JButton cancelButton;
|
||||
|
||||
private JButton buttonEdit;
|
||||
private JButton editButton;
|
||||
|
||||
private JButton buttonPreviewFont;
|
||||
private JButton previewFontButton;
|
||||
|
||||
private JButton buttonSetAdvanceValues;
|
||||
private JButton setAdvanceValuesButton;
|
||||
|
||||
private JButton buttonSave;
|
||||
private JButton saveButton;
|
||||
|
||||
private JTextField fontAddCharactersField;
|
||||
|
||||
|
||||
@@ -99,9 +99,12 @@ public class HeaderInfoPanel extends JPanel implements TagEditorPanel {
|
||||
private final JLabel warningLabel = new JLabel();
|
||||
|
||||
private SWF swf;
|
||||
|
||||
private MainPanel mainPanel;
|
||||
|
||||
public HeaderInfoPanel() {
|
||||
public HeaderInfoPanel(MainPanel mainPanel) {
|
||||
setLayout(new BorderLayout());
|
||||
this.mainPanel = mainPanel;
|
||||
|
||||
TableLayout tl;
|
||||
propertiesPanel.setLayout(tl = new TableLayout(new double[][]{
|
||||
@@ -219,6 +222,7 @@ public class HeaderInfoPanel extends JPanel implements TagEditorPanel {
|
||||
|
||||
private void editButtonActionPerformed(ActionEvent evt) {
|
||||
setEditMode(true);
|
||||
mainPanel.setEditingStatus();
|
||||
}
|
||||
|
||||
private void saveButtonActionPerformed(ActionEvent evt) {
|
||||
@@ -233,13 +237,15 @@ public class HeaderInfoPanel extends JPanel implements TagEditorPanel {
|
||||
swf.setHeaderModified(true);
|
||||
|
||||
load(swf);
|
||||
Main.getMainFrame().getPanel().repaintTree();
|
||||
mainPanel.repaintTree();
|
||||
setEditMode(false);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void cancelButtonActionPerformed(ActionEvent evt) {
|
||||
load(swf);
|
||||
setEditMode(false);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
public void load(SWF swf) {
|
||||
@@ -364,4 +370,11 @@ public class HeaderInfoPanel extends JPanel implements TagEditorPanel {
|
||||
public boolean isEditing() {
|
||||
return saveButton.isVisible();
|
||||
}
|
||||
|
||||
public void startEdit() {
|
||||
if (!editButton.isVisible()) {
|
||||
return;
|
||||
}
|
||||
editButtonActionPerformed(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,7 +834,15 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
public void setStatus(String s) {
|
||||
statusPanel.setStatus(s);
|
||||
}
|
||||
|
||||
public void setEditingStatus() {
|
||||
statusPanel.setStatus(translate("status.editing"));
|
||||
}
|
||||
|
||||
public void clearEditingStatus() {
|
||||
statusPanel.setStatus("");
|
||||
}
|
||||
|
||||
public void setWorkStatus(String s, CancellableWorker worker) {
|
||||
statusPanel.setWorkStatus(s, worker);
|
||||
mainMenu.updateComponents();
|
||||
@@ -1051,7 +1059,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
displayPanel.add(createFolderListCard(), CARDFOLDERLISTPANEL);
|
||||
displayPanel.add(createDumpPreviewCard(), CARDDUMPVIEW);
|
||||
|
||||
headerPanel = new HeaderInfoPanel();
|
||||
headerPanel = new HeaderInfoPanel(this);
|
||||
displayPanel.add(headerPanel, CARDHEADER);
|
||||
|
||||
displayPanel.add(new JPanel(), CARDEMPTYPANEL);
|
||||
@@ -5562,4 +5570,29 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
return itemToStr;
|
||||
}
|
||||
|
||||
public void startEdit() {
|
||||
TreeItem treeItem = getCurrentTree().getCurrentTreeItem();
|
||||
if (treeItem == null) {
|
||||
return;
|
||||
}
|
||||
if (treeItem instanceof HeaderItem) {
|
||||
headerPanel.startEdit();
|
||||
} else if (treeItem instanceof PlaceObjectTypeTag) {
|
||||
previewPanel.startEditPlaceTag();
|
||||
} else if (treeItem instanceof MetadataTag) {
|
||||
previewPanel.startEditMetaDataTag();
|
||||
} else if (treeItem instanceof DefineBinaryDataTag) {
|
||||
//TODO
|
||||
} else if (treeItem instanceof FontTag) {
|
||||
previewPanel.startEditFontTag();
|
||||
} else if (treeItem instanceof TextTag) {
|
||||
previewPanel.startEditTextTag();
|
||||
} else if (treeItem instanceof Tag) {
|
||||
Tag tag = (Tag)treeItem;
|
||||
previewPanel.showGenericTagPanel(tag);
|
||||
previewPanel.startEditGenericTag();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1139,6 +1139,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
if (item instanceof MetadataTag) {
|
||||
metadataEditor.setEditable(true);
|
||||
updateMetadataButtonsVisibility();
|
||||
mainPanel.setEditingStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1149,6 +1150,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
setMetadataModified(false);
|
||||
updateMetadataButtonsVisibility();
|
||||
mainPanel.repaintTree();
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void cancelMetadataButtonActionPerformed(ActionEvent evt) {
|
||||
@@ -1157,6 +1159,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
metadataEditor.setEditable(Configuration.editorMode.get());
|
||||
setMetadataModified(false);
|
||||
updateMetadataButtonsVisibility();
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void editGenericTagButtonActionPerformed(ActionEvent evt) {
|
||||
@@ -1174,6 +1177,8 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
genericSaveButton.setVisible(true);
|
||||
genericCancelButton.setVisible(true);
|
||||
genericTagPanel.setEditMode(true, (Tag) item);
|
||||
|
||||
mainPanel.setEditingStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1193,6 +1198,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
genericCancelButton.setVisible(false);
|
||||
genericTagPanel.setEditMode(false, null);
|
||||
mainPanel.setTagTreeSelectedNode(mainPanel.getCurrentTree(), tag);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1201,6 +1207,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
genericSaveButton.setVisible(false);
|
||||
genericCancelButton.setVisible(false);
|
||||
genericTagPanel.setEditMode(false, null);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void savePlaceTagButtonActionPerformed(ActionEvent evt) {
|
||||
@@ -1224,12 +1231,13 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
mainPanel.refreshTree(swf);
|
||||
hilightTag = tag;
|
||||
}
|
||||
placeGenericPanel.setEditMode(false, null);
|
||||
placeGenericPanel.setEditMode(false, null);
|
||||
}
|
||||
placeTransformButton.setVisible(true);
|
||||
placeEditButton.setVisible(true);
|
||||
placeSaveButton.setVisible(false);
|
||||
placeCancelButton.setVisible(false);
|
||||
mainPanel.clearEditingStatus();
|
||||
mainPanel.repaintTree();
|
||||
if (hilightTag != null) {
|
||||
mainPanel.setTagTreeSelectedNode(mainPanel.getCurrentTree(), hilightTag);
|
||||
@@ -1243,6 +1251,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
placeTransformButton.setVisible(false);
|
||||
placeSaveButton.setVisible(true);
|
||||
placeCancelButton.setVisible(true);
|
||||
mainPanel.setEditingStatus();
|
||||
}
|
||||
|
||||
private void transformPlaceTagButtonActionPerformed(ActionEvent evt) {
|
||||
@@ -1259,7 +1268,8 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
placeEditButton.setVisible(false);
|
||||
placeTransformButton.setVisible(false);
|
||||
placeSaveButton.setVisible(true);
|
||||
placeCancelButton.setVisible(true);
|
||||
placeCancelButton.setVisible(true);
|
||||
mainPanel.setEditingStatus();
|
||||
|
||||
Timer t = new Timer();
|
||||
t.schedule(new TimerTask(){
|
||||
@@ -1377,6 +1387,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
imageTransformSaveButton.setVisible(true);
|
||||
imageTransformCancelButton.setVisible(true);
|
||||
imageTransformScrollPane.setVisible(true);
|
||||
mainPanel.setEditingStatus();
|
||||
|
||||
|
||||
Timer t = new Timer();
|
||||
@@ -1406,8 +1417,9 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
placeGenericPanel.setVisible(true);
|
||||
}
|
||||
if (placeEditMode == PLACE_EDIT_RAW) {
|
||||
placeGenericPanel.setEditMode(false, null);
|
||||
placeGenericPanel.setEditMode(false, null);
|
||||
}
|
||||
mainPanel.clearEditingStatus();
|
||||
placeEditButton.setVisible(true);
|
||||
placeTransformButton.setVisible(true);
|
||||
placeSaveButton.setVisible(false);
|
||||
@@ -1451,4 +1463,33 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
public void selectImageDepth(int depth) {
|
||||
imagePanel.selectDepth(depth);
|
||||
}
|
||||
|
||||
public void startEditPlaceTag() {
|
||||
if (!placeEditButton.isVisible()) {
|
||||
return;
|
||||
}
|
||||
editPlaceTagButtonActionPerformed(null);
|
||||
}
|
||||
|
||||
public void startEditMetaDataTag() {
|
||||
if (!metadataEditButton.isVisible()) {
|
||||
return;
|
||||
}
|
||||
editMetadataButtonActionPerformed(null);
|
||||
}
|
||||
|
||||
public void startEditGenericTag() {
|
||||
if (!genericEditButton.isVisible()) {
|
||||
return;
|
||||
}
|
||||
editGenericTagButtonActionPerformed(null);
|
||||
}
|
||||
|
||||
public void startEditFontTag() {
|
||||
fontPanel.startEdit();
|
||||
}
|
||||
|
||||
public void startEditTextTag() {
|
||||
textPanel.startEdit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,11 +329,13 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
private void editText() {
|
||||
setEditText(true);
|
||||
showTextComparingPreview();
|
||||
mainPanel.setEditingStatus();
|
||||
}
|
||||
|
||||
private void cancelText() {
|
||||
setEditText(false);
|
||||
mainPanel.reload(true);
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
|
||||
private void saveText(boolean refresh) {
|
||||
@@ -344,6 +346,7 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
if (refresh) {
|
||||
mainPanel.repaintTree();
|
||||
}
|
||||
mainPanel.clearEditingStatus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,4 +428,11 @@ public class TextPanel extends JPanel implements TagEditorPanel {
|
||||
public boolean isEditing() {
|
||||
return textSaveButton.isVisible();
|
||||
}
|
||||
|
||||
public void startEdit() {
|
||||
if (!textEditButton.isVisible()) {
|
||||
return;
|
||||
}
|
||||
editText();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,4 +649,7 @@ config.name.gui.splitPaneTransform2.dividerLocationPercent = (Internal) Splitter
|
||||
config.description.gui.splitPaneTransform2.dividerLocationPercent =
|
||||
|
||||
config.name.gui.transform.lastExpandedCards = (Internal) Last expanded transformation cards
|
||||
config.description.gui.transform.lastExpandedCards =
|
||||
config.description.gui.transform.lastExpandedCards =
|
||||
|
||||
config.name.doubleClickNodeToEdit = Double click to start editing
|
||||
config.description.doubleClickNodeToEdit = Double clicking tree node starts its editation.
|
||||
@@ -639,4 +639,7 @@ config.name.gui.splitPaneTransform2.dividerLocationPercent = (Intern\u00ed) Pozi
|
||||
config.description.gui.splitPaneTransform2.dividerLocationPercent =
|
||||
|
||||
config.name.gui.transform.lastExpandedCards = (Intern\u00ed) Posledn\u00ed rozbalen\u00e9 transforma\u010dn\u00ed karty
|
||||
config.description.gui.transform.lastExpandedCards =
|
||||
config.description.gui.transform.lastExpandedCards =
|
||||
|
||||
config.name.doubleClickNodeToEdit = Dvojit\u00fd klik za\u010dne editaci
|
||||
config.description.doubleClickNodeToEdit = Dvojit\u00e9 kliknut\u00ed na polo\u017eku ve stromu za\u010dne jej\u00ed editaci.
|
||||
@@ -1042,4 +1042,6 @@ transform.matrix.f = F
|
||||
transform.matrix.editCurrent = Edit current matrix
|
||||
|
||||
transform.apply = Apply
|
||||
transform.clear = Clear
|
||||
transform.clear = Clear
|
||||
|
||||
status.editing = You are in the EDIT mode. Make changes, then press Save button. Or discard changes with Cancel button. You cannot switch to other item during editation.
|
||||
|
||||
@@ -1027,4 +1027,6 @@ transform.matrix.f = F
|
||||
transform.matrix.editCurrent = Upravit sou\u010dasnou matici
|
||||
|
||||
transform.apply = Pou\u017e\u00edt
|
||||
transform.clear = Vy\u010distit
|
||||
transform.clear = Vy\u010distit
|
||||
|
||||
status.editing = Jste v EDITA\u010cN\u00cdM re\u017eimu. Prove\u010fte zm\u011bny a stiskn\u011bte tla\u010d\u00edtko Ulo\u017eit. Nebo zru\u0161te zm\u011bny tla\u010d\u00edtkem Storno. B\u011bhem editace nelze p\u0159ep\u00ednat na jin\u00e9 polo\u017eky.
|
||||
|
||||
@@ -96,6 +96,8 @@ import com.jpexs.decompiler.flash.types.BUTTONCONDACTION;
|
||||
import com.jpexs.decompiler.flash.types.BUTTONRECORD;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD;
|
||||
import java.awt.Color;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -106,6 +108,7 @@ import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JTree;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.ToolTipManager;
|
||||
import javax.swing.plaf.basic.BasicTreeUI;
|
||||
import javax.swing.tree.TreeModel;
|
||||
@@ -201,6 +204,25 @@ public abstract class AbstractTagTree extends JTree {
|
||||
}
|
||||
});
|
||||
ToolTipManager.sharedInstance().registerComponent(this);
|
||||
addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (!Configuration.doubleClickNodeToEdit.get()) {
|
||||
return;
|
||||
}
|
||||
if (!SwingUtilities.isLeftMouseButton(e)) {
|
||||
return;
|
||||
}
|
||||
if (e.getClickCount() != 2) {
|
||||
return;
|
||||
}
|
||||
TreeItem item = getCurrentTreeItem();
|
||||
if (!getModel().isLeaf(item)) { //double click also expands the node so editing should work only for leaf nodes
|
||||
return;
|
||||
}
|
||||
mainPanel.startEdit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static TreeNodeType getTreeNodeType(TreeItem t) {
|
||||
|
||||
@@ -239,7 +239,7 @@ public class TagTree extends AbstractTagTree {
|
||||
public TagTree(TagTreeModel treeModel, MainPanel mainPanel) {
|
||||
super(treeModel, mainPanel);
|
||||
setCellRenderer(new TagTreeCellRenderer());
|
||||
setShowsRootHandles(true);
|
||||
setShowsRootHandles(true);
|
||||
}
|
||||
|
||||
public static List<Integer> getSwfFolderItemNestedTagIds(String folderName, boolean gfx) {
|
||||
|
||||
Reference in New Issue
Block a user