mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 05:30:45 +00:00
format code: blank lines
This commit is contained in:
+4
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,6 +26,7 @@ import com.jpexs.browsers.cache.firefox.FirefoxCache;
|
||||
public class CacheReader {
|
||||
|
||||
public static final String BROWSER_FIREFOX = "firefox";
|
||||
|
||||
public static final String BROWSER_CHROME = "chrome";
|
||||
|
||||
public static String[] availableBrowsers() {
|
||||
|
||||
+7
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,9 +26,13 @@ import java.io.InputStream;
|
||||
public class ChunkedInputStream extends InputStream {
|
||||
|
||||
private final InputStream is;
|
||||
|
||||
private int chunkPos = 0;
|
||||
|
||||
private int chunkLen = 0;
|
||||
|
||||
private boolean end = false;
|
||||
|
||||
private boolean first = true;
|
||||
|
||||
public ChunkedInputStream(InputStream is) {
|
||||
|
||||
+4
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
|
||||
public class RafInputStream extends InputStream {
|
||||
|
||||
private final RandomAccessFile raf;
|
||||
|
||||
private long pos = 0;
|
||||
|
||||
public RafInputStream(RandomAccessFile raf) {
|
||||
|
||||
+17
-4
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,18 +26,31 @@ import java.io.InputStream;
|
||||
public class BlockFileHeader {
|
||||
|
||||
protected static final int kBlockHeaderSize = 8192; // Two pages: almost 64k entries
|
||||
|
||||
private static final int kMaxBlocks = (kBlockHeaderSize - 80) * 8;
|
||||
private final long magic; // c3 ca 04 c1
|
||||
|
||||
private final long magic; // c3 ca 04 c1
|
||||
|
||||
private final long version; // 00 00 02 00
|
||||
|
||||
private final int this_file;
|
||||
|
||||
private final int next_file;
|
||||
|
||||
private final int entry_size;
|
||||
|
||||
private final int num_entries;
|
||||
|
||||
private final int max_entries;
|
||||
|
||||
private int empty[] = new int[4];
|
||||
|
||||
private int hints[] = new int[4];
|
||||
|
||||
private final int updating;
|
||||
|
||||
private int user[] = new int[5];
|
||||
|
||||
private final long allocation_map[];
|
||||
|
||||
public BlockFileHeader(InputStream is) throws IOException {
|
||||
|
||||
+32
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -30,34 +30,63 @@ import java.util.Map;
|
||||
public class CacheAddr {
|
||||
|
||||
private static final int EXTERNAL = 0;
|
||||
|
||||
private static final int RANKINGS = 1;
|
||||
|
||||
private static final int BLOCK_256 = 2;
|
||||
|
||||
private static final int BLOCK_1K = 3;
|
||||
|
||||
private static final int BLOCK_4K = 4;
|
||||
|
||||
private static final int BLOCK_FILES = 5;
|
||||
|
||||
private static final int BLOCK_ENTRIES = 6;
|
||||
|
||||
private static final int BLOCK_EVICTED = 7;
|
||||
|
||||
private static final String blockNames[] = new String[]{"EXTERNAL", "RANKINGS", "BLOCK_256", "BLOCK_1K", "BLOCK_4K", "BLOCK_FILES", "BLOCK_ENTRIES", "BLOCK_EVICTED"};
|
||||
|
||||
private static final int blockSizes[] = new int[]{0, 36, 256, 1024, 4096, 8, 104, 48};
|
||||
|
||||
private static final long kInitializedMask = 0x80000000L;
|
||||
|
||||
private static final long kFileTypeMask = 0x70000000L;
|
||||
|
||||
private static final int kFileTypeOffset = 28;
|
||||
|
||||
private static final long kReservedBitsMask = 0x0c000000L;
|
||||
|
||||
private static final long kNumBlocksMask = 0x03000000L;
|
||||
|
||||
private static final int kNumBlocksOffset = 24;
|
||||
|
||||
private static final long kFileSelectorMask = 0x00ff0000L;
|
||||
|
||||
private static final int FileSelectorOffset = 16;
|
||||
|
||||
private static final long kStartBlockMask = 0x0000FFFFL;
|
||||
|
||||
private static final long kFileNameMask = 0x0FFFFFFFL;
|
||||
|
||||
private final boolean initialized;
|
||||
|
||||
private final int fileType;
|
||||
|
||||
private int numBlocks;
|
||||
|
||||
private int fileSelector;
|
||||
|
||||
private int startBlock;
|
||||
|
||||
private int fileName;
|
||||
|
||||
private final long val;
|
||||
|
||||
private final File rootPath;
|
||||
|
||||
private final Map<Integer, RandomAccessFile> dataFiles;
|
||||
|
||||
private final File externalFilesDir;
|
||||
|
||||
public CacheAddr(InputStream is, File rootPath, Map<Integer, RandomAccessFile> dataFiles, File externalFilesDir) throws IOException {
|
||||
|
||||
+8
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -36,8 +36,11 @@ import java.util.logging.Logger;
|
||||
public class ChromeCache implements CacheImplementation {
|
||||
|
||||
private static ChromeCache instance;
|
||||
|
||||
private File tempDir;
|
||||
|
||||
private List<File> dataFiles;
|
||||
|
||||
private File indexFile;
|
||||
|
||||
private ChromeCache() {
|
||||
@@ -55,7 +58,9 @@ public class ChromeCache implements CacheImplementation {
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private boolean loaded = false;
|
||||
|
||||
private Index index;
|
||||
|
||||
@Override
|
||||
|
||||
+4
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,5 +23,6 @@ package com.jpexs.browsers.cache.chrome;
|
||||
public class EntryFlags {
|
||||
|
||||
public static final int PARENT_ENTRY = 1;
|
||||
|
||||
public static final int CHILD_ENTRY = 1 << 1;
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,6 +23,8 @@ package com.jpexs.browsers.cache.chrome;
|
||||
public class EntryState {
|
||||
|
||||
public static final int ENTRY_NORMAL = 0;
|
||||
|
||||
public static final int ENTRY_EVICTED = 1;
|
||||
|
||||
public static final int ENTRY_DOOMED = 2;
|
||||
}
|
||||
|
||||
+22
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -34,24 +34,43 @@ import java.util.logging.Logger;
|
||||
public class EntryStore extends CacheEntry {
|
||||
|
||||
public static final int ENTRY_NORMAL = 0;
|
||||
|
||||
public static final int ENTRY_EVICTED = 1; // The entry was recently evicted from the cache.
|
||||
|
||||
public static final int ENTRY_DOOMED = 2; // The entry was doomed
|
||||
|
||||
public static final int PARENT_ENTRY = 1; // This entry has children (sparse) entries.
|
||||
|
||||
public static final int CHILD_ENTRY = 1 << 1;
|
||||
|
||||
public long hash; // Full hash of the key.
|
||||
|
||||
public CacheAddr next; // Next entry with the same hash or bucket.
|
||||
|
||||
public CacheAddr rankings_node; // Rankings node for this entry.
|
||||
|
||||
public int reuse_count; // How often is this entry used.
|
||||
|
||||
public int refetch_count; // How often is this fetched from the net.
|
||||
|
||||
public int state; // Current state.
|
||||
|
||||
public long creation_time;
|
||||
|
||||
public int key_len;
|
||||
|
||||
public CacheAddr long_key; // Optional address of a long key.
|
||||
|
||||
public int data_size[] = new int[4]; // We can store up to 4 data streams for each
|
||||
|
||||
public CacheAddr data_addr[] = new CacheAddr[4]; // entry.
|
||||
|
||||
public long flags; // Any combination of EntryFlags.
|
||||
|
||||
public int pad[] = new int[4];
|
||||
|
||||
public long self_hash; // The hash of EntryStore up to this point.
|
||||
|
||||
public byte key[] = new byte[256 - 24 * 4]; // null terminated
|
||||
|
||||
public EntryStore(InputStream is, File rootDir, Map<Integer, RandomAccessFile> dataFiles, File externalFilesDir) throws IOException {
|
||||
|
||||
+23
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -28,44 +28,64 @@ import java.util.List;
|
||||
public class HttpResponseInfo {
|
||||
|
||||
public long flags;
|
||||
|
||||
public int version;
|
||||
|
||||
public long request_time;
|
||||
|
||||
public long response_time;
|
||||
|
||||
public long payload_size;
|
||||
|
||||
public List<String> headers;
|
||||
|
||||
// The version of the response info used when persisting response info.
|
||||
public static final int RESPONSE_INFO_VERSION = 3;
|
||||
|
||||
// The minimum version supported for deserializing response info.
|
||||
public static final int RESPONSE_INFO_MINIMUM_VERSION = 1;
|
||||
|
||||
// We reserve up to 8 bits for the version number.
|
||||
public static final int RESPONSE_INFO_VERSION_MASK = 0xFF;
|
||||
|
||||
// This bit is set if the response info has a cert at the end.
|
||||
// Version 1 serialized only the end-entity certificate, while subsequent
|
||||
// versions include the available certificate chain.
|
||||
public static final int RESPONSE_INFO_HAS_CERT = 1 << 8;
|
||||
|
||||
// This bit is set if the response info has a security-bits field (security
|
||||
// strength, in bits, of the SSL connection) at the end.
|
||||
public static final int RESPONSE_INFO_HAS_SECURITY_BITS = 1 << 9;
|
||||
|
||||
// This bit is set if the response info has a cert status at the end.
|
||||
public static final int RESPONSE_INFO_HAS_CERT_STATUS = 1 << 10;
|
||||
|
||||
// This bit is set if the response info has vary header data.
|
||||
public static final int RESPONSE_INFO_HAS_VARY_DATA = 1 << 11;
|
||||
|
||||
// This bit is set if the request was cancelled before completion.
|
||||
public static final int RESPONSE_INFO_TRUNCATED = 1 << 12;
|
||||
|
||||
// This bit is set if the response was received via SPDY.
|
||||
public static final int RESPONSE_INFO_WAS_SPDY = 1 << 13;
|
||||
|
||||
// This bit is set if the request has NPN negotiated.
|
||||
public static final int RESPONSE_INFO_WAS_NPN = 1 << 14;
|
||||
|
||||
// This bit is set if the request was fetched via an explicit proxy.
|
||||
public static final int RESPONSE_INFO_WAS_PROXY = 1 << 15;
|
||||
|
||||
// This bit is set if the response info has an SSL connection status field.
|
||||
// This contains the ciphersuite used to fetch the resource as well as the
|
||||
// protocol version, compression method and whether SSLv3 fallback was used.
|
||||
public static final int RESPONSE_INFO_HAS_SSL_CONNECTION_STATUS = 1 << 16;
|
||||
|
||||
// This bit is set if the response info has protocol version.
|
||||
public static final int RESPONSE_INFO_HAS_NPN_NEGOTIATED_PROTOCOL = 1 << 17;
|
||||
|
||||
// This bit is set if the response info has connection info.
|
||||
public static final int RESPONSE_INFO_HAS_CONNECTION_INFO = 1 << 18;
|
||||
|
||||
// This bit is set if the request has http authentication.
|
||||
public static final int RESPONSE_INFO_USE_HTTP_AUTHENTICATION = 1 << 19;
|
||||
|
||||
|
||||
+8
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -33,10 +33,15 @@ import java.util.Map;
|
||||
public class Index {
|
||||
|
||||
IndexHeader header;
|
||||
|
||||
CacheAddr table[];
|
||||
|
||||
public static final int kIndexTablesize = 0x10000;
|
||||
|
||||
public File rootDir;
|
||||
|
||||
private final Map<Integer, RandomAccessFile> dataFiles;
|
||||
|
||||
private final File externalFilesDir;
|
||||
|
||||
public void free() {
|
||||
|
||||
+15
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -29,17 +29,29 @@ import java.util.Map;
|
||||
public class IndexHeader {
|
||||
|
||||
long magic; //c3 ca 03 c1
|
||||
|
||||
long version; //01 00 02 00
|
||||
|
||||
int num_entries;
|
||||
|
||||
int num_bytes;
|
||||
|
||||
int last_file;
|
||||
|
||||
int this_id;
|
||||
|
||||
CacheAddr stats;
|
||||
|
||||
int table_len;
|
||||
|
||||
int crash;
|
||||
|
||||
int experiment;
|
||||
|
||||
long create_time;
|
||||
|
||||
int pad[] = new int[52];
|
||||
|
||||
LruData lru;
|
||||
|
||||
public IndexHeader(InputStream is, File rootDir, Map<Integer, RandomAccessFile> dataFiles, File externalFilesDir) throws IOException {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,6 +26,7 @@ import java.io.InputStream;
|
||||
public class IndexInputStream extends InputStream {
|
||||
|
||||
private final InputStream is;
|
||||
|
||||
public long pos = 0;
|
||||
|
||||
public long getPos() {
|
||||
|
||||
+11
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -29,13 +29,21 @@ import java.util.Map;
|
||||
public class LruData {
|
||||
|
||||
int pad1[] = new int[2];
|
||||
|
||||
int filled;
|
||||
|
||||
int sizes[] = new int[5];
|
||||
|
||||
CacheAddr heads[] = new CacheAddr[5];
|
||||
|
||||
CacheAddr tails[] = new CacheAddr[5];
|
||||
|
||||
CacheAddr transaction;
|
||||
|
||||
int operation;
|
||||
|
||||
int operation_list;
|
||||
|
||||
int pad2[] = new int[7];
|
||||
|
||||
public LruData(InputStream is, File rootDir, Map<Integer, RandomAccessFile> dataFiles, File externalFilesDir) throws IOException {
|
||||
|
||||
+9
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,10 +23,16 @@ package com.jpexs.browsers.cache.chrome;
|
||||
public class RankingsNode {
|
||||
|
||||
public long last_used;
|
||||
|
||||
public long last_modified;
|
||||
|
||||
CacheAddr next;
|
||||
|
||||
CacheAddr prev;
|
||||
|
||||
CacheAddr contents;
|
||||
|
||||
int dirty;
|
||||
|
||||
long self_hash;
|
||||
}
|
||||
|
||||
+10
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -32,12 +32,19 @@ import java.util.Map;
|
||||
public class CacheMap {
|
||||
|
||||
public long version;
|
||||
|
||||
public long datasize;
|
||||
|
||||
public long entryCount;
|
||||
|
||||
public long dirtyFlag;
|
||||
|
||||
public long recordCount;
|
||||
|
||||
public long evictionRank[];
|
||||
|
||||
public long bucketUsage[];
|
||||
|
||||
public List<MapBucket> mapBuckets;
|
||||
|
||||
public CacheMap(File file) throws IOException {
|
||||
|
||||
+5
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -44,7 +44,9 @@ public class FirefoxCache implements CacheImplementation {
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private boolean loaded = false;
|
||||
|
||||
private CacheMap map;
|
||||
|
||||
@Override
|
||||
|
||||
+21
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -31,22 +31,39 @@ import java.util.Map;
|
||||
public class Location {
|
||||
|
||||
public int locationSelector;
|
||||
|
||||
public int extraBlocks;
|
||||
|
||||
public long blockNumber;
|
||||
|
||||
public int fileGeneration;
|
||||
|
||||
public int fileSize;
|
||||
|
||||
public boolean isMetadata;
|
||||
|
||||
public long hash;
|
||||
|
||||
private final File rootDir;
|
||||
|
||||
public static final long eReservedMask = 0x4C000000L;
|
||||
|
||||
public static final long eLocationSelectorMask = 0x30000000L;
|
||||
|
||||
public static final int eLocationSelectorOffset = 28;
|
||||
|
||||
public static final long eExtraBlocksMask = 0x03000000L;
|
||||
|
||||
public static final int eExtraBlocksOffset = 24;
|
||||
|
||||
public static final long eBlockNumberMask = 0x00FFFFFFL;
|
||||
|
||||
public static final long eFileGenerationMask = 0x000000FFL;
|
||||
|
||||
public static final long eFileSizeMask = 0x00FFFF00L;
|
||||
|
||||
public static final int eFileSizeOffset = 8;
|
||||
|
||||
public static final long eFileReservedMask = 0x4F000000L;
|
||||
|
||||
public static int size_shift(int idx) {
|
||||
@@ -64,6 +81,7 @@ public class Location {
|
||||
#define BLOCK_SIZE_FOR_INDEX(idx) ((idx) ? (256 << SIZE_SHIFT(idx)) : 0)
|
||||
#define BITMAP_SIZE_FOR_INDEX(idx) ((idx) ? (131072 >> SIZE_SHIFT(idx)) : 0)
|
||||
*/
|
||||
|
||||
private final Map<Integer, RandomAccessFile> dataFiles;
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
|
||||
+7
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -33,9 +33,13 @@ import java.util.logging.Logger;
|
||||
public class MapBucket extends CacheEntry {
|
||||
|
||||
public long hash;
|
||||
|
||||
public long enviction;
|
||||
|
||||
public Location dataLocation;
|
||||
|
||||
public Location metadataLocation;
|
||||
|
||||
private MetaData metadata;
|
||||
|
||||
public MapBucket(InputStream is, File rootDir, Map<Integer, RandomAccessFile> dataFiles) throws IOException {
|
||||
|
||||
+14
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -28,16 +28,27 @@ import java.util.Map;
|
||||
public class MetaData {
|
||||
|
||||
public int majorVersion;
|
||||
|
||||
public int minorVersion;
|
||||
|
||||
public long location;
|
||||
|
||||
public long fetchCount;
|
||||
|
||||
public long firstFetchTime;
|
||||
|
||||
public long lastFetchTime;
|
||||
|
||||
public long expireTime;
|
||||
|
||||
public long dataSize;
|
||||
|
||||
public long requestSize;
|
||||
|
||||
public long infoSize;
|
||||
|
||||
public String request;
|
||||
|
||||
public Map<String, String> response;
|
||||
|
||||
public MetaData(InputStream is) throws IOException, IncompatibleVersionException {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -506,6 +506,7 @@ public class CommandLineArgumentParser {
|
||||
private static class Range {
|
||||
|
||||
public Integer min;
|
||||
|
||||
public Integer max;
|
||||
|
||||
public Range(Integer min, Integer max) {
|
||||
@@ -519,7 +520,6 @@ public class CommandLineArgumentParser {
|
||||
|
||||
return index >= minimum && index <= maximum;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class Selection {
|
||||
@@ -543,7 +543,6 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static Selection parseSelect(Queue<String> args) {
|
||||
@@ -1003,7 +1002,7 @@ public class CommandLineArgumentParser {
|
||||
System.out.println("Exporting XFL...");
|
||||
FLAVersion xflVersion = FLAVersion.fromString(formats.get("xfl"));
|
||||
if (xflVersion == null) {
|
||||
xflVersion = FLAVersion.CS6; //Defaults to CS6
|
||||
xflVersion = FLAVersion.CS6; //Defaults to CS6
|
||||
}
|
||||
exfile.exportXfl(handler, outDir.getAbsolutePath() + (exportFormats.length > 1 ? File.separator + "xfl" : ""), inFile.getName(), ApplicationInfo.APPLICATION_NAME, ApplicationInfo.applicationVerName, ApplicationInfo.version, Configuration.parallelSpeedUp.get(), xflVersion);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,7 +26,9 @@ import java.util.Scanner;
|
||||
public class ConsoleAbortRetryIgnoreHandler implements AbortRetryIgnoreHandler {
|
||||
|
||||
int errorCount = 0;
|
||||
|
||||
int errorMode;
|
||||
|
||||
int retryCount;
|
||||
|
||||
public ConsoleAbortRetryIgnoreHandler(int errorMode, int retryCount) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -47,6 +47,7 @@ public class AboutDialog extends AppDialog {
|
||||
"honfika",
|
||||
"+ others from GitHub and Google code"
|
||||
};
|
||||
|
||||
private static final String AUTHOR = "JPEXS";
|
||||
|
||||
public AboutDialog() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,6 +26,7 @@ import java.awt.event.ActionListener;
|
||||
public class ActionRedirector implements ActionListener {
|
||||
|
||||
ActionListener target;
|
||||
|
||||
String actionCommand;
|
||||
|
||||
public ActionRedirector(ActionListener target, String actionCommand) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -83,6 +83,7 @@ public class AdvancedSettingsDialog extends AppDialog implements ActionListener
|
||||
Class[] types = new Class[]{
|
||||
String.class, Object.class, String.class
|
||||
};
|
||||
|
||||
boolean[] canEdit = new boolean[]{
|
||||
false, true, false
|
||||
};
|
||||
@@ -277,7 +278,9 @@ public class AdvancedSettingsDialog extends AppDialog implements ActionListener
|
||||
}
|
||||
|
||||
private JButton cancelButton;
|
||||
|
||||
private JButton okButton;
|
||||
|
||||
private JButton resetButton;
|
||||
//private EachRowRendererEditor configurationTable;
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -25,6 +25,7 @@ import java.util.ResourceBundle;
|
||||
public class AppStrings {
|
||||
|
||||
private static Class resourceClass;
|
||||
|
||||
private static ResourceBundle resourceBundle;
|
||||
|
||||
public static void setResourceClass(Class cls) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -39,9 +39,13 @@ import javax.swing.border.BevelBorder;
|
||||
public final class BinaryPanel extends JPanel implements ComponentListener {
|
||||
|
||||
public HexView hexEditor = new HexView();
|
||||
|
||||
private byte[] data;
|
||||
|
||||
private JPanel swfInsidePanel;
|
||||
|
||||
private DefineBinaryDataTag binaryDataTag = null;
|
||||
|
||||
private final MainPanel mainPanel;
|
||||
|
||||
public BinaryPanel(final MainPanel mainPanel) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -39,8 +39,11 @@ import javax.swing.text.Document;
|
||||
public class DebugLogDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private final JTextArea logTextArea = new JTextArea();
|
||||
|
||||
private final String ACTION_CLOSE = "CLOSE";
|
||||
|
||||
private final String ACTION_CLEAR = "CLEAR";
|
||||
|
||||
private final Debugger debug;
|
||||
|
||||
public DebugLogDialog(Debugger debug) {
|
||||
@@ -104,5 +107,4 @@ public class DebugLogDialog extends AppDialog implements ActionListener {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -27,6 +27,7 @@ import javax.swing.table.TableCellRenderer;
|
||||
public class EachRowRendererEditor extends JTable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Class editingClass;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -59,12 +59,19 @@ public class ErrorLogFrame extends AppFrame {
|
||||
private static ErrorLogFrame instance;
|
||||
|
||||
private final JPanel logView = new JPanel();
|
||||
|
||||
private final JPanel logViewInner = new JPanel();
|
||||
|
||||
private final Handler handler;
|
||||
|
||||
private final ImageIcon expandIcon;
|
||||
|
||||
private final ImageIcon collapseIcon;
|
||||
|
||||
private ErrorState errorState = ErrorState.NO_ERROR;
|
||||
|
||||
private static final int MAX_LOG_ITEM_COUNT = 100;
|
||||
|
||||
private final AtomicInteger logItemCount = new AtomicInteger();
|
||||
|
||||
public Handler getHandler() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -114,6 +114,7 @@ public class ExportDialog extends AppDialog {
|
||||
};
|
||||
|
||||
private final JComboBox[] combos;
|
||||
|
||||
private JTextField zoomTextField = new JTextField();
|
||||
|
||||
public <E> E getValue(Class<E> option) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -58,20 +58,31 @@ import javax.swing.JPanel;
|
||||
public class FolderPreviewPanel extends JPanel {
|
||||
|
||||
private static ExecutorService executor;
|
||||
|
||||
private List<TreeItem> items;
|
||||
|
||||
private int selectedIndex = -1;
|
||||
|
||||
private boolean repaintQueued;
|
||||
|
||||
private int lastWidth;
|
||||
|
||||
private int lastHeight;
|
||||
|
||||
public Map<Integer, TreeItem> selectedItems = new HashMap<>();
|
||||
|
||||
private Cache<Integer, SerializableImage> cachedPreviews;
|
||||
|
||||
private static final int PREVIEW_SIZE = 150;
|
||||
|
||||
private static final int BORDER_SIZE = 5;
|
||||
|
||||
private static final int LABEL_HEIGHT = 20;
|
||||
|
||||
private static final int CELL_HEIGHT = 2 * BORDER_SIZE + PREVIEW_SIZE + LABEL_HEIGHT;
|
||||
|
||||
private static final int CELL_WIDTH = 2 * BORDER_SIZE + PREVIEW_SIZE;
|
||||
|
||||
private static final SerializableImage noImage = new SerializableImage(PREVIEW_SIZE, PREVIEW_SIZE, BufferedImage.TYPE_INT_ARGB);
|
||||
|
||||
static {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -59,21 +59,33 @@ import javax.swing.filechooser.FileFilter;
|
||||
public class FontEmbedDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private static final String ACTION_LOAD_FROM_DISK = "LOAD_FROM_DISK";
|
||||
|
||||
private static final int SAMPLE_MAX_LENGTH = 50;
|
||||
|
||||
private final JComboBox<FontFamily> familyNamesSelection;
|
||||
|
||||
private final JComboBox<FontFace> faceSelection;
|
||||
|
||||
private final JCheckBox[] rangeCheckboxes;
|
||||
|
||||
private final String rangeNames[];
|
||||
|
||||
private final JLabel[] rangeSamples;
|
||||
|
||||
private final JTextField individualCharsField;
|
||||
|
||||
private boolean result = false;
|
||||
|
||||
private JLabel individialSample;
|
||||
|
||||
private Font customFont;
|
||||
|
||||
private final JCheckBox allCheckbox;
|
||||
|
||||
private final JCheckBox updateTextsCheckbox;
|
||||
|
||||
public Font getSelectedFont() {
|
||||
@@ -121,6 +133,7 @@ public class FontEmbedDialog extends AppDialog implements ActionListener {
|
||||
}
|
||||
|
||||
private JRadioButton ttfFileRadio;
|
||||
|
||||
private JRadioButton installedRadio;
|
||||
|
||||
private void updateFaceSelection() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -70,5 +70,4 @@ public class FontFace implements Comparable<FontFace> {
|
||||
public int compareTo(FontFace o) {
|
||||
return font.getFontName().compareTo(o.font.getFontName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -27,6 +27,7 @@ import java.util.Objects;
|
||||
public class FontFamily implements Comparable<FontFamily> {
|
||||
|
||||
public String familyEn;
|
||||
|
||||
public String family;
|
||||
|
||||
public FontFamily(Font font) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -56,6 +56,7 @@ import layout.TableLayout;
|
||||
public class FontPanel extends javax.swing.JPanel {
|
||||
|
||||
private final MainPanel mainPanel;
|
||||
|
||||
private FontTag fontTag;
|
||||
|
||||
/**
|
||||
@@ -152,7 +153,7 @@ public class FontPanel extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
if (yestoall) {
|
||||
opt = 0; //yes
|
||||
opt = 0; //yes
|
||||
} else if (notoall) {
|
||||
opt = 1; //no
|
||||
} else {
|
||||
@@ -296,7 +297,7 @@ public class FontPanel extends javax.swing.JPanel {
|
||||
fontParamsPanel.add(fontNameIntagLabel, "1,0");
|
||||
|
||||
JLabel fontNameNameLabLabel = new JLabel();
|
||||
fontNameNameLabLabel.setText(AppStrings.translate("font.name")); // NOI18N
|
||||
fontNameNameLabLabel.setText(AppStrings.translate("font.name")); // NOI18N
|
||||
fontParamsPanel.add(fontNameNameLabLabel, "0,1,R");
|
||||
|
||||
fontDisplayNameScrollPane.setBorder(null);
|
||||
@@ -334,7 +335,7 @@ public class FontPanel extends javax.swing.JPanel {
|
||||
|
||||
fontParamsPanel.add(fontCopyrightScrollPane, "1,2");
|
||||
|
||||
jLabel4.setText(AppStrings.translate("font.isbold")); // NOI18N
|
||||
jLabel4.setText(AppStrings.translate("font.isbold")); // NOI18N
|
||||
fontParamsPanel.add(jLabel4, "0,3,R");
|
||||
|
||||
fontIsBoldCheckBox.setEnabled(false);
|
||||
@@ -354,7 +355,7 @@ public class FontPanel extends javax.swing.JPanel {
|
||||
fontAscentLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
|
||||
fontParamsPanel.add(fontAscentLabel, "1,5");
|
||||
|
||||
jLabel7.setText(AppStrings.translate("font.descent")); // NOI18N
|
||||
jLabel7.setText(AppStrings.translate("font.descent")); // NOI18N
|
||||
fontParamsPanel.add(jLabel7, "0,6,R");
|
||||
|
||||
fontDescentLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
|
||||
@@ -363,10 +364,10 @@ public class FontPanel extends javax.swing.JPanel {
|
||||
jLabel8.setText(AppStrings.translate("font.leading")); // NOI18N
|
||||
fontParamsPanel.add(jLabel8, "0,7,R");
|
||||
|
||||
fontLeadingLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
|
||||
fontLeadingLabel.setText(AppStrings.translate("value.unknown")); // NOI18N
|
||||
fontParamsPanel.add(fontLeadingLabel, "1,7");
|
||||
|
||||
jLabel9.setText(AppStrings.translate("font.characters")); // NOI18N
|
||||
jLabel9.setText(AppStrings.translate("font.characters")); // NOI18N
|
||||
fontParamsPanel.add(jLabel9, "0,8,R");
|
||||
|
||||
fontCharactersScrollPane.setBorder(null);
|
||||
@@ -662,29 +663,52 @@ public class FontPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
private javax.swing.JButton buttonCancel;
|
||||
private javax.swing.JButton buttonEdit;
|
||||
private javax.swing.JButton buttonPreviewFont;
|
||||
private javax.swing.JButton buttonSetAdvanceValues;
|
||||
private javax.swing.JButton buttonSave;
|
||||
private javax.swing.JTextField fontAddCharactersField;
|
||||
private javax.swing.JButton fontAddCharsButton;
|
||||
private javax.swing.JLabel fontAscentLabel;
|
||||
private javax.swing.JScrollPane fontCharactersScrollPane;
|
||||
private javax.swing.JTextArea fontCharactersTextArea;
|
||||
private javax.swing.JTextArea fontCopyrightTextArea;
|
||||
private javax.swing.JLabel fontDescentLabel;
|
||||
private javax.swing.JTextArea fontNameTextArea;
|
||||
private javax.swing.JButton fontEmbedButton;
|
||||
private javax.swing.JCheckBox fontIsBoldCheckBox;
|
||||
private javax.swing.JCheckBox fontIsItalicCheckBox;
|
||||
private javax.swing.JLabel fontLeadingLabel;
|
||||
private javax.swing.JLabel fontNameIntagLabel;
|
||||
private javax.swing.JComboBox<FontFamily> fontFamilyNameSelection;
|
||||
private javax.swing.JComboBox<FontFace> fontFaceSelection;
|
||||
private javax.swing.JLabel fontSourceLabel;
|
||||
private javax.swing.JPanel fontParamsPanel;
|
||||
private javax.swing.JPanel addCharsPanel;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JCheckBox updateTextsCheckBox;
|
||||
|
||||
private javax.swing.JButton buttonEdit;
|
||||
|
||||
private javax.swing.JButton buttonPreviewFont;
|
||||
|
||||
private javax.swing.JButton buttonSetAdvanceValues;
|
||||
|
||||
private javax.swing.JButton buttonSave;
|
||||
|
||||
private javax.swing.JTextField fontAddCharactersField;
|
||||
|
||||
private javax.swing.JButton fontAddCharsButton;
|
||||
|
||||
private javax.swing.JLabel fontAscentLabel;
|
||||
|
||||
private javax.swing.JScrollPane fontCharactersScrollPane;
|
||||
|
||||
private javax.swing.JTextArea fontCharactersTextArea;
|
||||
|
||||
private javax.swing.JTextArea fontCopyrightTextArea;
|
||||
|
||||
private javax.swing.JLabel fontDescentLabel;
|
||||
|
||||
private javax.swing.JTextArea fontNameTextArea;
|
||||
|
||||
private javax.swing.JButton fontEmbedButton;
|
||||
|
||||
private javax.swing.JCheckBox fontIsBoldCheckBox;
|
||||
|
||||
private javax.swing.JCheckBox fontIsItalicCheckBox;
|
||||
|
||||
private javax.swing.JLabel fontLeadingLabel;
|
||||
|
||||
private javax.swing.JLabel fontNameIntagLabel;
|
||||
|
||||
private javax.swing.JComboBox<FontFamily> fontFamilyNameSelection;
|
||||
|
||||
private javax.swing.JComboBox<FontFace> fontFaceSelection;
|
||||
|
||||
private javax.swing.JLabel fontSourceLabel;
|
||||
|
||||
private javax.swing.JPanel fontParamsPanel;
|
||||
|
||||
private javax.swing.JPanel addCharsPanel;
|
||||
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
|
||||
private javax.swing.JCheckBox updateTextsCheckBox;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -69,21 +69,35 @@ import javax.swing.SpringLayout;
|
||||
public class GenericTagPanel extends JPanel implements ChangeListener {
|
||||
|
||||
private final JEditorPane genericTagPropertiesEditorPane;
|
||||
|
||||
private final JPanel genericTagPropertiesEditPanel;
|
||||
|
||||
private final JScrollPane genericTagPropertiesEditorPaneScrollPanel;
|
||||
|
||||
private final JScrollPane genericTagPropertiesEditPanelScrollPanel;
|
||||
|
||||
private Tag tag;
|
||||
|
||||
private Tag editedTag;
|
||||
|
||||
private List<String> keys = new ArrayList<>();
|
||||
|
||||
private Map<String, GenericTagEditor> editors = new HashMap<>();
|
||||
|
||||
private Map<String, Component> labels = new HashMap<>();
|
||||
|
||||
private Map<String, Component> types = new HashMap<>();
|
||||
|
||||
private Map<String, List<Field>> fieldPaths = new HashMap<>();
|
||||
|
||||
private Map<String, List<Integer>> fieldIndices = new HashMap<>();
|
||||
|
||||
private HeaderLabel hdr;
|
||||
|
||||
private Set<String> addKeys = new HashSet<>();
|
||||
|
||||
private Map<String, Component> addButtons = new HashMap<>();
|
||||
|
||||
private Map<String, Component> removeButtons = new HashMap<>();
|
||||
|
||||
public GenericTagPanel() {
|
||||
@@ -174,7 +188,7 @@ public class GenericTagPanel extends JPanel implements ChangeListener {
|
||||
SpringUtilities.makeCompactGrid(genericTagPropertiesEditPanel,
|
||||
propCount, 3, //rows, cols
|
||||
6, 6, //initX, initY
|
||||
6, 6); //xPad, yPad
|
||||
6, 6); //xPad, yPad
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -83,6 +83,7 @@ import javax.swing.tree.TreePath;
|
||||
public class GenericTagTreePanel extends GenericTagPanel {
|
||||
|
||||
private JTree tree;
|
||||
|
||||
private Tag editedTag;
|
||||
|
||||
private class MyTree extends JTree {
|
||||
@@ -108,7 +109,9 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
private class MyTreeCellEditor extends AbstractCellEditor implements TreeCellEditor {
|
||||
|
||||
private GenericTagEditor editor = null;
|
||||
|
||||
private final JTree tree;
|
||||
|
||||
private FieldNode fnode;
|
||||
|
||||
public MyTreeCellEditor(JTree tree) {
|
||||
@@ -205,14 +208,13 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
/*List<FieldNode> depends = ((MyTreeModel) tree.getModel()).getDependentFields(fnode);
|
||||
boolean dep = false;
|
||||
if (!depends.isEmpty()) {
|
||||
dep = true;
|
||||
dep = true;
|
||||
} */
|
||||
editor.save();
|
||||
((MyTreeModel) tree.getModel()).vchanged(tree.getSelectionPath());
|
||||
refreshTree();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public GenericTagTreePanel() {
|
||||
@@ -350,7 +352,6 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
setBackgroundNonSelectionColor(Color.white);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -361,7 +362,9 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
private static class FieldNode extends DefaultMutableTreeNode {
|
||||
|
||||
private Object obj;
|
||||
|
||||
private Field field;
|
||||
|
||||
private int index;
|
||||
|
||||
public FieldNode(Object obj, Field field, int index) {
|
||||
@@ -486,8 +489,11 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
private static class MyTreeModel extends DefaultTreeModel {
|
||||
|
||||
private final Object mtroot;
|
||||
|
||||
private final List<TreeModelListener> listeners = new ArrayList<>();
|
||||
|
||||
private final Map<String, Object> nodeCache = new HashMap<>();
|
||||
|
||||
// it is much faster to store the reverse mappings, too
|
||||
private final Map<Object, String> nodeCacheReverse = new HashMap<>();
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -44,14 +44,23 @@ public class GraphDialog extends AppDialog {
|
||||
private class GraphPanel extends JPanel {
|
||||
|
||||
private static final int SPACE_VERTICAL = 16;
|
||||
|
||||
private static final int SPACE_HORIZONTAL = 10;
|
||||
|
||||
private static final int SPACE_BACKLINKS = 5;
|
||||
|
||||
private static final int BLOCK_WIDTH = 200;
|
||||
|
||||
private static final int BLOCK_HEIGHT = 20;
|
||||
|
||||
private final HashMap<GraphPart, Point> partPos = new HashMap<>();
|
||||
|
||||
private final Point size;
|
||||
|
||||
private int backLinksLeft = 0;
|
||||
|
||||
private int backLinksRight = 0;
|
||||
|
||||
private final GraphPart head;
|
||||
|
||||
public GraphPanel(Graph graph) throws InterruptedException {
|
||||
@@ -241,10 +250,15 @@ public class GraphDialog extends AppDialog {
|
||||
return w;
|
||||
}
|
||||
}
|
||||
|
||||
GraphPanel gp;
|
||||
|
||||
int scrollBarWidth;
|
||||
|
||||
int scrollBarHeight;
|
||||
|
||||
int frameWidthDiff;
|
||||
|
||||
int frameHeightDiff;
|
||||
|
||||
public GraphDialog(Window owner, Graph graph, String name) throws InterruptedException {
|
||||
@@ -277,7 +291,7 @@ public class GraphDialog extends AppDialog {
|
||||
Dimension screen = getToolkit().getScreenSize();
|
||||
Dimension dim = new Dimension(0, 0);
|
||||
Dimension panDim = gp.getPreferredSize();
|
||||
// add some magic constants
|
||||
// add some magic constants
|
||||
panDim = new Dimension(panDim.width + 3, panDim.height + 2);
|
||||
|
||||
boolean tooHigh = false;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -38,5 +38,4 @@ public class GuiAbortRetryIgnoreHandler implements AbortRetryIgnoreHandler {
|
||||
// there are no non-static field in this class, so return the original instance
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -29,13 +29,21 @@ import javax.swing.SpringLayout;
|
||||
public class HeaderInfoPanel extends JPanel {
|
||||
|
||||
private final JLabel signatureLabel = new JLabel();
|
||||
|
||||
private final JLabel compressionLabel = new JLabel();
|
||||
|
||||
private final JLabel gfxLabel = new JLabel();
|
||||
|
||||
private final JLabel versionLabel = new JLabel();
|
||||
|
||||
private final JLabel fileSizeLabel = new JLabel();
|
||||
|
||||
private final JLabel frameRateLabel = new JLabel();
|
||||
|
||||
private final JLabel frameCountLabel = new JLabel();
|
||||
|
||||
private final JLabel displayRectTwipsLabel = new JLabel();
|
||||
|
||||
private final JLabel displayRectPixelsLabel = new JLabel();
|
||||
|
||||
public HeaderInfoPanel() {
|
||||
@@ -103,5 +111,4 @@ public class HeaderInfoPanel extends JPanel {
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -73,27 +73,49 @@ import javax.swing.JPanel;
|
||||
public final class ImagePanel extends JPanel implements ActionListener, MediaDisplay {
|
||||
|
||||
private Timelined timelined;
|
||||
|
||||
private boolean stillFrame = false;
|
||||
|
||||
private Timer timer;
|
||||
|
||||
private int frame = -1;
|
||||
|
||||
private boolean zoomAvailable = false;
|
||||
|
||||
private int counter = 0;
|
||||
|
||||
private AtomicBoolean shouldDraw = new AtomicBoolean();
|
||||
|
||||
private SWF swf;
|
||||
|
||||
private boolean loaded;
|
||||
|
||||
private int mouseButton;
|
||||
|
||||
private final JLabel debugLabel = new JLabel("-");
|
||||
|
||||
private DepthState stateUnderCursor = null;
|
||||
|
||||
private MouseEvent lastMouseEvent = null;
|
||||
|
||||
private final List<SoundTagPlayer> soundPlayers = new ArrayList<>();
|
||||
|
||||
private final IconPanel iconPanel;
|
||||
|
||||
private int time = 0;
|
||||
|
||||
private int selectedDepth = -1;
|
||||
|
||||
private Zoom zoom = new Zoom();
|
||||
|
||||
private final Object delayObject = new Object();
|
||||
|
||||
private boolean drawReady;
|
||||
|
||||
private final int drawWaitLimit = 50; // ms
|
||||
|
||||
private TextTag textTag;
|
||||
|
||||
private TextTag newTextTag;
|
||||
|
||||
public synchronized void selectDepth(int depth) {
|
||||
@@ -108,7 +130,9 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
|
||||
private SerializableImage img;
|
||||
|
||||
private Rectangle rect = null;
|
||||
|
||||
private List<DepthState> dss;
|
||||
|
||||
private List<Shape> outlines;
|
||||
|
||||
public BufferedImage getLastImage() {
|
||||
@@ -837,6 +861,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
|
||||
shouldDraw.set(true);
|
||||
TimerTask task = new TimerTask() {
|
||||
public int counter = cnt;
|
||||
|
||||
private final AtomicBoolean first = shouldDraw;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,6 +23,7 @@ package com.jpexs.decompiler.flash.gui;
|
||||
public class Language {
|
||||
|
||||
public String code;
|
||||
|
||||
public String name;
|
||||
|
||||
public Language(String code, String name) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -58,16 +58,25 @@ import javax.swing.filechooser.FileFilter;
|
||||
public class LoadFromCacheFrame extends AppFrame implements ActionListener {
|
||||
|
||||
private static final String ACTION_OPEN = "OPEN";
|
||||
|
||||
private static final String ACTION_SAVE = "SAVE";
|
||||
|
||||
private static final String ACTION_REFRESH = "REFRESH";
|
||||
|
||||
private final JList<CacheEntry> list;
|
||||
|
||||
private final JTextField searchField;
|
||||
|
||||
private List<CacheImplementation> caches;
|
||||
|
||||
private List<CacheEntry> entries;
|
||||
|
||||
private final JProgressBar progressBar;
|
||||
|
||||
private final JButton saveButton;
|
||||
|
||||
private final JButton refreshButton;
|
||||
|
||||
private final JButton openButton;
|
||||
|
||||
public LoadFromCacheFrame() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -78,20 +78,33 @@ import javax.swing.table.TableRowSorter;
|
||||
public class LoadFromMemoryFrame extends AppFrame implements ActionListener {
|
||||
|
||||
private static final String ACTION_SELECT_PROCESS = "SELECTPROCESS";
|
||||
|
||||
private static final String ACTION_REFRESH_PROCESS_LIST = "REFRESHPROCESSLIST";
|
||||
|
||||
private static final String ACTION_OPEN_SWF = "OPENSWF";
|
||||
|
||||
private static final String ACTION_SAVE = "SAVE";
|
||||
|
||||
private MainFrame mainFrame;
|
||||
|
||||
private List<com.jpexs.process.Process> processlist;
|
||||
|
||||
private List<SwfInMemory> foundIs;
|
||||
|
||||
private List<com.jpexs.process.Process> selProcesses;
|
||||
|
||||
private JList<com.jpexs.process.Process> list;
|
||||
|
||||
private DefaultListModel<com.jpexs.process.Process> model;
|
||||
|
||||
private DefaultTableModel resTableModel;
|
||||
|
||||
private final JTable tableRes;
|
||||
|
||||
private final JLabel stateLabel;
|
||||
|
||||
private boolean processing = false;
|
||||
|
||||
private final JProgressBar progress;
|
||||
|
||||
private class SelectProcessWorker extends SwingWorker<List<SwfInMemory>, Object> {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -38,7 +38,9 @@ import javax.swing.SwingConstants;
|
||||
public class LoadingDialog extends AppDialog implements ImageObserver {
|
||||
|
||||
private final JLabel detailLabel;
|
||||
|
||||
private LoadingPanel loadingPanel;
|
||||
|
||||
JProgressBar progressBar = new JProgressBar(0, 100);
|
||||
|
||||
public void setDetail(String d) {
|
||||
@@ -98,7 +100,7 @@ public class LoadingDialog extends AppDialog implements ImageObserver {
|
||||
cnt.add(pan, BorderLayout.CENTER);
|
||||
//progressBar.setVisible(false);
|
||||
progressBar.setStringPainted(true);
|
||||
//progressBar.setVisible(false);
|
||||
//progressBar.setVisible(false);
|
||||
View.setWindowIcon(this);
|
||||
detailLabel.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -37,9 +37,13 @@ import javax.swing.JPanel;
|
||||
public class LoadingPanel extends JPanel {
|
||||
|
||||
BufferedImage lastImage;
|
||||
|
||||
int lastSize = 0;
|
||||
|
||||
Color col;
|
||||
|
||||
double rotation = 0;
|
||||
|
||||
Timer drawTimer;
|
||||
|
||||
public LoadingPanel(int width, int height) {
|
||||
@@ -135,5 +139,4 @@ public class LoadingPanel extends JPanel {
|
||||
g2.setTransform(t);
|
||||
g2.drawImage(lastImage, 0, 0, this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -32,6 +32,7 @@ import java.util.logging.LogRecord;
|
||||
public class LogFormatter extends Formatter {
|
||||
|
||||
private static final String lineSep = System.getProperty("line.separator");
|
||||
|
||||
private DateFormat dateFormat;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -108,20 +108,35 @@ import javax.swing.filechooser.FileFilter;
|
||||
public class Main {
|
||||
|
||||
public static ProxyFrame proxyFrame;
|
||||
|
||||
private static List<SWFSourceInfo> sourceInfos = new ArrayList<>();
|
||||
|
||||
public static LoadingDialog loadingDialog;
|
||||
|
||||
public static ModeFrame modeFrame;
|
||||
|
||||
private static boolean working = false;
|
||||
|
||||
private static TrayIcon trayIcon;
|
||||
|
||||
private static MenuItem stopMenuItem;
|
||||
|
||||
private static MainFrame mainFrame;
|
||||
|
||||
public static final int UPDATE_SYSTEM_MAJOR = 1;
|
||||
|
||||
public static final int UPDATE_SYSTEM_MINOR = 2;
|
||||
|
||||
public static LoadFromMemoryFrame loadFromMemoryFrame;
|
||||
|
||||
public static LoadFromCacheFrame loadFromCacheFrame;
|
||||
|
||||
private static final Logger logger = Logger.getLogger(Main.class.getName());
|
||||
|
||||
private static Debugger debugger;
|
||||
|
||||
public static DebugLogDialog debugDialog;
|
||||
|
||||
public static final String DEBUGGER_PACKAGE = "com.jpexs.decompiler.flash.debugger";
|
||||
|
||||
private static ABCContainerTag getDebuggerABCTag(SWF swf) {
|
||||
@@ -1447,6 +1462,7 @@ public class Main {
|
||||
Configuration.lastUpdatesCheckDate.set(Calendar.getInstance());
|
||||
return false;
|
||||
}
|
||||
|
||||
private static FileHandler fileTxt;
|
||||
|
||||
public static void clearLogFile() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -36,6 +36,7 @@ import javax.swing.JFrame;
|
||||
public final class MainFrameClassic extends AppFrame implements MainFrame {
|
||||
|
||||
private final MainPanel panel;
|
||||
|
||||
private final MainFrameMenu mainMenu;
|
||||
|
||||
public MainFrameClassic() {
|
||||
@@ -125,5 +126,4 @@ public final class MainFrameClassic extends AppFrame implements MainFrame {
|
||||
public Window getWindow() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -40,66 +40,119 @@ import javax.swing.JOptionPane;
|
||||
public class MainFrameClassicMenu extends MainFrameMenu implements ActionListener {
|
||||
|
||||
private static final String ACTION_RELOAD = "RELOAD";
|
||||
|
||||
private static final String ACTION_ADVANCED_SETTINGS = "ADVANCEDSETTINGS";
|
||||
|
||||
private static final String ACTION_LOAD_MEMORY = "LOADMEMORY";
|
||||
|
||||
private static final String ACTION_LOAD_CACHE = "LOADCACHE";
|
||||
|
||||
private static final String ACTION_GOTO_DOCUMENT_CLASS_ON_STARTUP = "GOTODOCUMENTCLASSONSTARTUP";
|
||||
|
||||
private static final String ACTION_AUTO_RENAME_IDENTIFIERS = "AUTORENAMEIDENTIFIERS";
|
||||
|
||||
private static final String ACTION_CACHE_ON_DISK = "CACHEONDISK";
|
||||
|
||||
private static final String ACTION_SET_LANGUAGE = "SETLANGUAGE";
|
||||
|
||||
private static final String ACTION_DISABLE_DECOMPILATION = "DISABLEDECOMPILATION";
|
||||
|
||||
private static final String ACTION_ASSOCIATE = "ASSOCIATE";
|
||||
|
||||
private static final String ACTION_GOTO_DOCUMENT_CLASS = "GOTODOCUMENTCLASS";
|
||||
|
||||
private static final String ACTION_PARALLEL_SPEED_UP = "PARALLELSPEEDUP";
|
||||
|
||||
private static final String ACTION_INTERNAL_VIEWER_SWITCH = "INTERNALVIEWERSWITCH";
|
||||
|
||||
private static final String ACTION_SEARCH = "SEARCH";
|
||||
|
||||
private static final String ACTION_AUTO_DEOBFUSCATE = "AUTODEOBFUSCATE";
|
||||
|
||||
private static final String ACTION_EXIT = "EXIT";
|
||||
|
||||
private static final String ACTION_RENAME_ONE_IDENTIFIER = "RENAMEONEIDENTIFIER";
|
||||
|
||||
private static final String ACTION_ABOUT = "ABOUT";
|
||||
|
||||
private static final String ACTION_SHOW_PROXY = "SHOWPROXY";
|
||||
|
||||
private static final String ACTION_SUB_LIMITER = "SUBLIMITER";
|
||||
|
||||
private static final String ACTION_SAVE = "SAVE";
|
||||
|
||||
private static final String ACTION_SAVE_AS = "SAVEAS";
|
||||
|
||||
private static final String ACTION_SAVE_AS_EXE = "SAVEASEXE";
|
||||
|
||||
private static final String ACTION_OPEN = "OPEN";
|
||||
|
||||
private static final String ACTION_EXPORT_FLA = "EXPORTFLA";
|
||||
|
||||
private static final String ACTION_EXPORT_SEL = "EXPORTSEL";
|
||||
|
||||
private static final String ACTION_EXPORT = "EXPORT";
|
||||
|
||||
private static final String ACTION_CHECK_UPDATES = "CHECKUPDATES";
|
||||
|
||||
private static final String ACTION_HELP_US = "HELPUS";
|
||||
|
||||
private static final String ACTION_HOMEPAGE = "HOMEPAGE";
|
||||
|
||||
private static final String ACTION_RESTORE_CONTROL_FLOW = "RESTORECONTROLFLOW";
|
||||
|
||||
private static final String ACTION_RESTORE_CONTROL_FLOW_ALL = "RESTORECONTROLFLOWALL";
|
||||
|
||||
private static final String ACTION_RENAME_IDENTIFIERS = "RENAMEIDENTIFIERS";
|
||||
|
||||
private static final String ACTION_DEOBFUSCATE = "DEOBFUSCATE";
|
||||
|
||||
private static final String ACTION_DEOBFUSCATE_ALL = "DEOBFUSCATEALL";
|
||||
|
||||
private static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS";
|
||||
|
||||
private static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED";
|
||||
|
||||
private final MainFrameClassic mainFrame;
|
||||
|
||||
private JCheckBoxMenuItem miAutoDeobfuscation;
|
||||
|
||||
private JCheckBoxMenuItem miInternalViewer;
|
||||
|
||||
private JCheckBoxMenuItem miParallelSpeedUp;
|
||||
|
||||
private JCheckBoxMenuItem miAssociate;
|
||||
|
||||
private JCheckBoxMenuItem miDecompile;
|
||||
|
||||
private JCheckBoxMenuItem miCacheDisk;
|
||||
|
||||
private JCheckBoxMenuItem miGotoMainClassOnStartup;
|
||||
|
||||
private JCheckBoxMenuItem miAutoRenameIdentifiers;
|
||||
|
||||
private JMenuItem saveCommandButton;
|
||||
|
||||
private JMenuItem saveasCommandButton;
|
||||
|
||||
private JMenuItem saveasexeCommandButton;
|
||||
|
||||
private JMenuItem exportAllCommandButton;
|
||||
|
||||
private JMenuItem exportFlaCommandButton;
|
||||
|
||||
private JMenuItem exportSelectionCommandButton;
|
||||
|
||||
private JMenuItem reloadCommandButton;
|
||||
|
||||
private JMenuItem renameInvalidCommandButton;
|
||||
|
||||
private JMenuItem globalRenameCommandButton;
|
||||
|
||||
private JMenuItem deobfuscationCommandButton;
|
||||
|
||||
private JMenuItem searchCommandButton;
|
||||
|
||||
private JMenuItem gotoDocumentClassCommandButton;
|
||||
|
||||
public MainFrameClassicMenu(MainFrameClassic mainFrame, boolean externalFlashPlayerUnavailable) {
|
||||
@@ -501,5 +554,4 @@ public class MainFrameClassicMenu extends MainFrameMenu implements ActionListene
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -46,6 +46,7 @@ import javax.swing.JOptionPane;
|
||||
public abstract class MainFrameMenu {
|
||||
|
||||
private final MainFrame mainFrame;
|
||||
|
||||
private SWF swf;
|
||||
|
||||
public abstract boolean isInternalFlashViewerSelected();
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -41,6 +41,7 @@ import org.pushingpixels.flamingo.internal.ui.ribbon.appmenu.JRibbonApplicationM
|
||||
public final class MainFrameRibbon extends AppRibbonFrame implements MainFrame {
|
||||
|
||||
private final MainPanel panel;
|
||||
|
||||
private final MainFrameMenu mainMenu;
|
||||
|
||||
public MainFrameRibbon() {
|
||||
@@ -147,5 +148,4 @@ public final class MainFrameRibbon extends AppRibbonFrame implements MainFrame {
|
||||
public Window getWindow() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -61,106 +61,195 @@ import org.pushingpixels.flamingo.internal.ui.ribbon.AbstractBandControlPanel;
|
||||
public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener {
|
||||
|
||||
private static final String ACTION_RELOAD = "RELOAD";
|
||||
|
||||
private static final String ACTION_ADVANCED_SETTINGS = "ADVANCEDSETTINGS";
|
||||
|
||||
private static final String ACTION_LOAD_MEMORY = "LOADMEMORY";
|
||||
|
||||
private static final String ACTION_LOAD_CACHE = "LOADCACHE";
|
||||
|
||||
private static final String ACTION_GOTO_DOCUMENT_CLASS_ON_STARTUP = "GOTODOCUMENTCLASSONSTARTUP";
|
||||
|
||||
private static final String ACTION_AUTO_RENAME_IDENTIFIERS = "AUTORENAMEIDENTIFIERS";
|
||||
|
||||
private static final String ACTION_CACHE_ON_DISK = "CACHEONDISK";
|
||||
|
||||
private static final String ACTION_SET_LANGUAGE = "SETLANGUAGE";
|
||||
|
||||
private static final String ACTION_DISABLE_DECOMPILATION = "DISABLEDECOMPILATION";
|
||||
|
||||
private static final String ACTION_ASSOCIATE = "ASSOCIATE";
|
||||
|
||||
private static final String ACTION_GOTO_DOCUMENT_CLASS = "GOTODOCUMENTCLASS";
|
||||
|
||||
private static final String ACTION_PARALLEL_SPEED_UP = "PARALLELSPEEDUP";
|
||||
|
||||
private static final String ACTION_INTERNAL_VIEWER_SWITCH = "INTERNALVIEWERSWITCH";
|
||||
|
||||
private static final String ACTION_SEARCH = "SEARCH";
|
||||
|
||||
private static final String ACTION_REPLACE = "REPLACE";
|
||||
|
||||
private static final String ACTION_TIMELINE = "TIMELINE";
|
||||
|
||||
private static final String ACTION_AUTO_DEOBFUSCATE = "AUTODEOBFUSCATE";
|
||||
|
||||
private static final String ACTION_EXIT = "EXIT";
|
||||
|
||||
private static final String ACTION_DEBUGGER_SWITCH = "DEBUGGER_SWITCH";
|
||||
|
||||
private static final String ACTION_DEBUGGER_REPLACE_TRACE = "DEBUGGER_REPLACE_TRACE";
|
||||
|
||||
private static final String ACTION_DEBUGGER_LOG = "DEBUGGER_LOG";
|
||||
|
||||
private static final String ACTION_RENAME_ONE_IDENTIFIER = "RENAMEONEIDENTIFIER";
|
||||
|
||||
private static final String ACTION_ABOUT = "ABOUT";
|
||||
|
||||
private static final String ACTION_SHOW_PROXY = "SHOWPROXY";
|
||||
|
||||
private static final String ACTION_SUB_LIMITER = "SUBLIMITER";
|
||||
|
||||
private static final String ACTION_SAVE = "SAVE";
|
||||
|
||||
private static final String ACTION_SAVE_AS = "SAVEAS";
|
||||
|
||||
private static final String ACTION_SAVE_AS_EXE = "SAVEASEXE";
|
||||
|
||||
private static final String ACTION_OPEN = "OPEN";
|
||||
|
||||
private static final String ACTION_CLOSE = "CLOSE";
|
||||
|
||||
private static final String ACTION_CLOSE_ALL = "CLOSEALL";
|
||||
|
||||
private static final String ACTION_EXPORT_FLA = "EXPORTFLA";
|
||||
|
||||
public static final String ACTION_EXPORT_SEL = "EXPORTSEL";
|
||||
|
||||
public static final String ACTION_EXPORT_JAVA_SOURCE = "EXPORTJAVASOURCE";
|
||||
|
||||
public static final String ACTION_EXPORT_SWF_XML = "EXPORTSWFXML";
|
||||
|
||||
public static final String ACTION_IMPORT_SWF_XML = "IMPORTSWFXML";
|
||||
|
||||
private static final String ACTION_EXPORT = "EXPORT";
|
||||
|
||||
private static final String ACTION_IMPORT_TEXT = "IMPORTTEXT";
|
||||
|
||||
private static final String ACTION_CHECK_UPDATES = "CHECKUPDATES";
|
||||
|
||||
private static final String ACTION_HELP_US = "HELPUS";
|
||||
|
||||
private static final String ACTION_HOMEPAGE = "HOMEPAGE";
|
||||
|
||||
private static final String ACTION_RESTORE_CONTROL_FLOW = "RESTORECONTROLFLOW";
|
||||
|
||||
private static final String ACTION_RESTORE_CONTROL_FLOW_ALL = "RESTORECONTROLFLOWALL";
|
||||
|
||||
private static final String ACTION_RENAME_IDENTIFIERS = "RENAMEIDENTIFIERS";
|
||||
|
||||
private static final String ACTION_DEOBFUSCATE = "DEOBFUSCATE";
|
||||
|
||||
private static final String ACTION_DEOBFUSCATE_ALL = "DEOBFUSCATEALL";
|
||||
|
||||
private static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS";
|
||||
|
||||
private static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED";
|
||||
|
||||
private static final String ACTION_CLEAR_RECENT_FILES = "CLEARRECENTFILES";
|
||||
|
||||
private static final String ACTION_CHECK_RESOURCES = "CHECKRESOURCES";
|
||||
|
||||
private static final String ACTION_VIEWMODE_RESOURCES = "VIEWMODERESOURCES";
|
||||
|
||||
private static final String ACTION_VIEWMODE_HEX_DUMP = "VIEWMODEHEXDUMP";
|
||||
|
||||
private static final String ACTION_DEOBFUSCATION_MODE_OLD = "DEOBFUSCATIONMODEOLD";
|
||||
|
||||
private static final String ACTION_DEOBFUSCATION_MODE_NEW = "DEOBFUSCATIONMODENEW";
|
||||
|
||||
private final MainFrameRibbon mainFrame;
|
||||
|
||||
private JCheckBox miAutoDeobfuscation;
|
||||
|
||||
private JCheckBox miInternalViewer;
|
||||
|
||||
private JCheckBox miParallelSpeedUp;
|
||||
|
||||
private JCheckBox miAssociate;
|
||||
|
||||
private JCheckBox miDecompile;
|
||||
|
||||
private JCheckBox miCacheDisk;
|
||||
|
||||
private JCheckBox miGotoMainClassOnStartup;
|
||||
|
||||
private JCheckBox miAutoRenameIdentifiers;
|
||||
|
||||
private JCommandButton saveCommandButton;
|
||||
|
||||
private JCommandButton saveasCommandButton;
|
||||
|
||||
private JCommandButton saveasexeCommandButton;
|
||||
|
||||
private JCommandButton exportAllCommandButton;
|
||||
|
||||
private JCommandButton exportFlaCommandButton;
|
||||
|
||||
private JCommandButton exportSelectionCommandButton;
|
||||
|
||||
private JCommandButton importTextCommandButton;
|
||||
|
||||
private JCommandToggleButton viewModeResourcesToggleButton;
|
||||
|
||||
private JCommandToggleButton viewModeHexToggleButton;
|
||||
|
||||
private JCommandToggleButton deobfuscationModeOldToggleButton;
|
||||
|
||||
private JCommandToggleButton deobfuscationModeNewToggleButton;
|
||||
|
||||
private JCommandButton reloadCommandButton;
|
||||
|
||||
private JCommandButton renameInvalidCommandButton;
|
||||
|
||||
private JCommandButton globalRenameCommandButton;
|
||||
|
||||
private JCommandButton deobfuscationCommandButton;
|
||||
|
||||
private JCommandButton searchCommandButton;
|
||||
|
||||
private JCommandButton replaceCommandButton;
|
||||
|
||||
private JCommandToggleButton timeLineToggleButton;
|
||||
|
||||
private CommandToggleButtonGroup timeLineToggleGroup;
|
||||
|
||||
private JCommandButton gotoDocumentClassCommandButton;
|
||||
|
||||
private JCommandButton clearRecentFilesCommandButton;
|
||||
|
||||
private JCommandToggleButton debuggerSwitchCommandButton;
|
||||
|
||||
private CommandToggleButtonGroup debuggerSwitchGroup;
|
||||
|
||||
private JCommandButton debuggerReplaceTraceCommandButton;
|
||||
|
||||
private JCommandButton debuggerLogCommandButton;
|
||||
|
||||
private CommandToggleButtonGroup viewModeToggleGroup;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary exportFlaMenu;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary exportAllMenu;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary exportSelMenu;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary saveFileMenu;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary saveAsFileMenu;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary closeFileMenu;
|
||||
|
||||
RibbonApplicationMenuEntryPrimary closeAllFilesMenu;
|
||||
|
||||
public MainFrameRibbonMenu(MainFrameRibbon mainFrame, JRibbon ribbon, boolean externalFlashPlayerUnavailable) {
|
||||
@@ -887,5 +976,4 @@ public class MainFrameRibbonMenu extends MainFrameMenu implements ActionListener
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -43,12 +43,17 @@ public class MainFrameStatusPanel extends JPanel implements ActionListener {
|
||||
private final MainPanel mainPanel;
|
||||
|
||||
private final LoadingPanel loadingPanel = new LoadingPanel(20, 20);
|
||||
|
||||
private final JLabel statusLabel = new JLabel("");
|
||||
|
||||
private final JButton cancelButton = new JButton();
|
||||
|
||||
private JButton errorNotificationButton;
|
||||
|
||||
private Icon currentIcon;
|
||||
|
||||
private Timer blinkTimer;
|
||||
|
||||
private int blinkPos;
|
||||
|
||||
private CancellableWorker currentWorker;
|
||||
@@ -184,5 +189,4 @@ public class MainFrameStatusPanel extends JPanel implements ActionListener {
|
||||
}, 500, 500);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -194,52 +194,97 @@ import javax.swing.tree.TreePath;
|
||||
public final class MainPanel extends JPanel implements ActionListener, TreeSelectionListener, SearchListener<TextTag>, Freed {
|
||||
|
||||
private final MainFrame mainFrame;
|
||||
|
||||
private final List<SWFList> swfs;
|
||||
|
||||
private ABCPanel abcPanel;
|
||||
|
||||
private ActionPanel actionPanel;
|
||||
|
||||
private final JPanel welcomePanel;
|
||||
|
||||
private final TimelineViewPanel timelineViewPanel;
|
||||
|
||||
private final MainFrameStatusPanel statusPanel;
|
||||
|
||||
private final MainFrameMenu mainMenu;
|
||||
|
||||
private final JProgressBar progressBar = new JProgressBar(0, 100);
|
||||
|
||||
private DeobfuscationDialog deobfuscationDialog;
|
||||
|
||||
public TagTree tagTree;
|
||||
|
||||
public DumpTree dumpTree;
|
||||
|
||||
private final FlashPlayerPanel flashPanel;
|
||||
|
||||
private final JPanel contentPanel;
|
||||
|
||||
private final JPanel displayPanel;
|
||||
|
||||
public FolderPreviewPanel folderPreviewPanel;
|
||||
|
||||
private boolean isWelcomeScreen = true;
|
||||
|
||||
private static final String CARDPREVIEWPANEL = "Preview card";
|
||||
|
||||
private static final String CARDFOLDERPREVIEWPANEL = "Folder preview card";
|
||||
|
||||
private static final String CARDEMPTYPANEL = "Empty card";
|
||||
|
||||
private static final String CARDDUMPVIEW = "Dump view";
|
||||
|
||||
private static final String CARDACTIONSCRIPTPANEL = "ActionScript card";
|
||||
|
||||
private static final String CARDACTIONSCRIPT3PANEL = "ActionScript3 card";
|
||||
|
||||
private static final String CARDHEADER = "Header card";
|
||||
|
||||
private static final String DETAILCARDAS3NAVIGATOR = "Traits list";
|
||||
|
||||
private static final String DETAILCARDEMPTYPANEL = "Empty card";
|
||||
|
||||
private static final String SPLIT_PANE1 = "SPLITPANE1";
|
||||
|
||||
private static final String WELCOME_PANEL = "WELCOMEPANEL";
|
||||
|
||||
private static final String TIMELINE_PANEL = "TIMELINEPANEL";
|
||||
|
||||
private final JSplitPane splitPane1;
|
||||
|
||||
private final JSplitPane splitPane2;
|
||||
|
||||
private boolean splitsInited = false;
|
||||
|
||||
private JPanel detailPanel;
|
||||
|
||||
private JTextField filterField = new MyTextField("");
|
||||
|
||||
private JPanel searchPanel;
|
||||
|
||||
private final PreviewPanel previewPanel;
|
||||
|
||||
private final HeaderInfoPanel headerPanel;
|
||||
|
||||
private DumpViewPanel dumpViewPanel;
|
||||
|
||||
private final JPanel treePanel;
|
||||
|
||||
private TreePanelMode treePanelMode;
|
||||
|
||||
private AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler();
|
||||
|
||||
private CancellableWorker setSourceWorker;
|
||||
|
||||
public TreeItem oldItem;
|
||||
|
||||
private SearchDialog searchDialog;
|
||||
|
||||
private SearchDialog replaceDialog;
|
||||
|
||||
public static final String ACTION_SELECT_BKCOLOR = "SELECTCOLOR";
|
||||
|
||||
public static final String ACTION_REPLACE = "REPLACE";
|
||||
|
||||
// play morph shape in 2 second(s)
|
||||
@@ -1487,6 +1532,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
|
||||
// "configuration items" for the current replace only
|
||||
private final ConfigurationItem<Boolean> showAgainImportError = new ConfigurationItem<>("showAgainImportError", true, true);
|
||||
|
||||
private final ConfigurationItem<Boolean> showAgainInvalidText = new ConfigurationItem<>("showAgainInvalidText", true, true);
|
||||
|
||||
private String getTextTagInfo(TextTag textTag) {
|
||||
@@ -1883,6 +1929,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
|
||||
// "configuration items" for the current replace only
|
||||
private final ConfigurationItem<Boolean> showAgainIgnoreMissingCharacters = new ConfigurationItem<>("showAgainIgnoreMissingCharacters", true, true);
|
||||
|
||||
private boolean ignoreMissingCharacters = false;
|
||||
|
||||
@Override
|
||||
@@ -2169,7 +2216,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
}
|
||||
|
||||
public static final int VIEW_RESOURCES = 0;
|
||||
|
||||
public static final int VIEW_DUMP = 1;
|
||||
|
||||
public static final int VIEW_TIMELINE = 2;
|
||||
|
||||
private int getCurrentView() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -34,11 +34,15 @@ import javax.swing.JLabel;
|
||||
public class ModeFrame extends AppFrame implements ActionListener {
|
||||
|
||||
private static final String ACTION_OPEN = "OPEN";
|
||||
|
||||
private static final String ACTION_PROXY = "PROXY";
|
||||
|
||||
private static final String ACTION_EXIT = "EXIT";
|
||||
|
||||
private final JButton openButton = new JButton(translate("button.open"));
|
||||
|
||||
private final JButton proxyButton = new JButton(translate("button.proxy"));
|
||||
|
||||
private final JButton exitButton = new JButton(translate("button.exit"));
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -90,5 +90,4 @@ public class MyCommandButtonUI extends SubstanceCommandButtonUI {
|
||||
};
|
||||
this.commandButton.addActionListener(disposePopupsActionListener);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -32,6 +32,7 @@ import org.pushingpixels.flamingo.internal.utils.FlamingoUtilities;
|
||||
public class MyResizableIcon implements Icon {
|
||||
|
||||
protected BufferedImage originalImage;
|
||||
|
||||
protected Map<String, BufferedImage> cachedImages = new HashMap<>();
|
||||
|
||||
public MyResizableIcon(BufferedImage originalImage) {
|
||||
@@ -41,7 +42,9 @@ public class MyResizableIcon implements Icon {
|
||||
}
|
||||
|
||||
protected int width;
|
||||
|
||||
protected int height;
|
||||
|
||||
protected BufferedImage image;
|
||||
|
||||
public void setDimension(Dimension dim) {
|
||||
@@ -91,5 +94,4 @@ public class MyResizableIcon implements Icon {
|
||||
public int getIconHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -45,8 +45,11 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
ActionPopupTransitionAwareUI {
|
||||
|
||||
private MyResizableIcon hoverIcon = null;
|
||||
|
||||
private MyResizableIcon clickIcon = null;
|
||||
|
||||
private MyResizableIcon normalIcon = null;
|
||||
|
||||
private final boolean buttonResized = false;
|
||||
|
||||
public MyResizableIcon getClickIcon() {
|
||||
@@ -64,6 +67,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
* Model change listener for ghost image effects.
|
||||
*/
|
||||
private GhostingListener substanceModelChangeListener;
|
||||
|
||||
/**
|
||||
* Tracker for visual state transitions.
|
||||
*/
|
||||
@@ -75,7 +79,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see org.jvnet.flamingo.common.ui.BasicCommandButtonUI#installListeners()
|
||||
*/
|
||||
@Override
|
||||
@@ -92,7 +96,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* org.jvnet.flamingo.common.ui.BasicCommandButtonUI#uninstallListeners()
|
||||
*/
|
||||
@@ -118,7 +122,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see javax.swing.plaf.basic.BasicButtonUI#paint(java.awt.Graphics,
|
||||
* javax.swing.JComponent)
|
||||
*/
|
||||
@@ -163,7 +167,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* org.jvnet.flamingo.common.ui.BasicCommandButtonUI#paintButtonIcon(java
|
||||
* .awt.Graphics, java.awt.Rectangle)
|
||||
@@ -182,7 +186,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* org.jvnet.flamingo.ribbon.ui.appmenu.BasicRibbonApplicationMenuButtonUI
|
||||
* #update(java.awt.Graphics, javax.swing.JComponent)
|
||||
@@ -194,7 +198,7 @@ public class MyRibbonApplicationMenuButtonUI extends BasicRibbonApplicationMenuB
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* org.jvnet.substance.SubstanceButtonUI#contains(javax.swing.JComponent,
|
||||
* int, int)
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -47,6 +47,7 @@ import javax.swing.UIManager;
|
||||
public class NewVersionDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private Version latestVersion;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -102,38 +102,52 @@ import javax.swing.SwingConstants;
|
||||
public class PreviewPanel extends JSplitPane implements ActionListener {
|
||||
|
||||
private static final String FLASH_VIEWER_CARD = "FLASHVIEWER";
|
||||
|
||||
private static final String DRAW_PREVIEW_CARD = "DRAWPREVIEW";
|
||||
|
||||
private static final String GENERIC_TAG_CARD = "GENERICTAG";
|
||||
|
||||
private static final String BINARY_TAG_CARD = "BINARYTAG";
|
||||
|
||||
private static final String CARDTEXTPANEL = "Text card";
|
||||
|
||||
private static final String CARDFONTPANEL = "Font card";
|
||||
|
||||
private static final String ACTION_EDIT_GENERIC_TAG = "EDITGENERICTAG";
|
||||
|
||||
private static final String ACTION_SAVE_GENERIC_TAG = "SAVEGENERICTAG";
|
||||
|
||||
private static final String ACTION_CANCEL_GENERIC_TAG = "CANCELGENERICTAG";
|
||||
|
||||
private static final String ACTION_PREV_FONTS = "PREVFONTS";
|
||||
|
||||
private static final String ACTION_NEXT_FONTS = "NEXTFONTS";
|
||||
|
||||
private final MainPanel mainPanel;
|
||||
|
||||
private final JPanel viewerCards;
|
||||
|
||||
private final FlashPlayerPanel flashPanel;
|
||||
|
||||
private File tempFile;
|
||||
|
||||
private ImagePanel imagePanel;
|
||||
|
||||
private PlayerControls imagePlayControls;
|
||||
|
||||
private MediaDisplay media;
|
||||
|
||||
private BinaryPanel binaryPanel;
|
||||
|
||||
private GenericTagPanel genericTagPanel;
|
||||
|
||||
private JPanel displayWithPreview;
|
||||
|
||||
// Image tag buttons
|
||||
private JButton replaceImageButton;
|
||||
|
||||
private JButton prevFontsButton;
|
||||
|
||||
private JButton nextFontsButton;
|
||||
|
||||
// Binary tag buttons
|
||||
@@ -141,12 +155,17 @@ public class PreviewPanel extends JSplitPane implements ActionListener {
|
||||
|
||||
// Generic tag buttons
|
||||
private JButton editButton;
|
||||
|
||||
private JButton saveButton;
|
||||
|
||||
private JButton cancelButton;
|
||||
|
||||
private JPanel parametersPanel;
|
||||
|
||||
private FontPanel fontPanel;
|
||||
|
||||
private int fontPageNum;
|
||||
|
||||
private TextPanel textPanel;
|
||||
|
||||
private boolean splitsInited;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -48,13 +48,19 @@ import jsyntaxpane.components.Markers;
|
||||
public class QuickFindPanel extends JPanel implements ActionListener {
|
||||
|
||||
public JTextField findTextField;
|
||||
|
||||
public JButton prevButton, nextButton;
|
||||
|
||||
public JCheckBox ignoreCaseCheckbox, regExpCheckbox, wrapCheckbox;
|
||||
|
||||
public JLabel statusLabel;
|
||||
|
||||
private final Markers.SimpleMarker marker = new Markers.SimpleMarker(Color.pink);
|
||||
|
||||
private WeakReference<JTextComponent> target;
|
||||
|
||||
private WeakReference<DocumentSearchData> dsd;
|
||||
|
||||
private int oldCaretPosition;
|
||||
|
||||
public QuickFindPanel() {
|
||||
@@ -235,7 +241,7 @@ public class QuickFindPanel extends JPanel implements ActionListener {
|
||||
/*
|
||||
@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -245,5 +251,4 @@ public class QuickFindPanel extends JPanel implements ActionListener {
|
||||
getParent().revalidate();
|
||||
getParent().repaint();
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -30,5 +30,4 @@ public class RecentFilesButton extends JCommandButton {
|
||||
public RecentFilesButton(String title, ResizableIcon icon) {
|
||||
super(title, icon);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -37,12 +37,17 @@ import javax.swing.JRadioButton;
|
||||
public class RenameDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private final JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber"));
|
||||
|
||||
private final JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword"));
|
||||
|
||||
private final JButton okButton = new JButton(translate("button.ok"));
|
||||
|
||||
private final JButton cancelButton = new JButton(translate("button.cancel"));
|
||||
|
||||
private boolean confirmed = false;
|
||||
|
||||
public RenameType getRenameType() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -34,7 +34,9 @@ import javax.swing.JRadioButton;
|
||||
public class ReplaceTraceDialog extends AppDialog {
|
||||
|
||||
private JRadioButton debugAlertRadio;
|
||||
|
||||
private JRadioButton debugConsoleRadio;
|
||||
|
||||
private JRadioButton debugSocketRadio;
|
||||
|
||||
private String value = null;
|
||||
@@ -120,5 +122,4 @@ public class ReplaceTraceDialog extends AppDialog {
|
||||
View.centerScreen(this);
|
||||
setValue(defaultVal);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -45,15 +45,23 @@ import javax.swing.JTextField;
|
||||
public class SearchDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
public JTextField searchField = new MyTextField();
|
||||
|
||||
public JTextField replaceField = new MyTextField();
|
||||
|
||||
public JCheckBox ignoreCaseCheckBox = new JCheckBox(translate("checkbox.ignorecase"));
|
||||
|
||||
public JCheckBox regexpCheckBox = new JCheckBox(translate("checkbox.regexp"));
|
||||
|
||||
public JCheckBox replaceInParametersCheckBox = new JCheckBox(translate("checkbox.replaceInParameters"));
|
||||
|
||||
public JRadioButton searchInASRadioButton = new JRadioButton(translate("checkbox.searchAS"));
|
||||
|
||||
public JRadioButton searchInTextsRadioButton = new JRadioButton(translate("checkbox.searchText"));
|
||||
|
||||
public boolean result = false;
|
||||
|
||||
public SearchDialog(Window owner, boolean replace) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -36,17 +36,25 @@ import jsyntaxpane.actions.DocumentSearchData;
|
||||
public class SearchPanel<E> extends JPanel implements ActionListener {
|
||||
|
||||
private static final String ACTION_SEARCH_PREV = "SEARCHPREV";
|
||||
|
||||
private static final String ACTION_SEARCH_NEXT = "SEARCHNEXT";
|
||||
|
||||
private static final String ACTION_SEARCH_CANCEL = "SEARCHCANCEL";
|
||||
|
||||
private final SearchListener<E> listener;
|
||||
|
||||
private final JLabel searchPos;
|
||||
|
||||
private int foundPos = 0;
|
||||
|
||||
private final JLabel searchForLabel;
|
||||
|
||||
private String searchFor;
|
||||
|
||||
private boolean searchIgnoreCase;
|
||||
|
||||
private boolean searchRegexp;
|
||||
|
||||
private List<E> found = new ArrayList<>();
|
||||
|
||||
public SearchPanel(LayoutManager lm, SearchListener<E> listener) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -40,13 +40,17 @@ import javax.swing.JScrollPane;
|
||||
public class SearchResultsDialog<E> extends AppDialog implements ActionListener {
|
||||
|
||||
private final JList<E> resultsList;
|
||||
|
||||
private final DefaultListModel<E> model;
|
||||
|
||||
private final SearchListener<E> listener;
|
||||
|
||||
private static final String ACTION_GOTO = "GOTO";
|
||||
|
||||
private static final String ACTION_CANCEL = "CLOSE";
|
||||
|
||||
private final JButton gotoButton = new JButton(translate("button.goto"));
|
||||
|
||||
private final JButton closeButton = new JButton(translate("button.close"));
|
||||
|
||||
public SearchResultsDialog(Window owner, String text, SearchListener<E> listener) {
|
||||
@@ -118,5 +122,4 @@ public class SearchResultsDialog<E> extends AppDialog implements ActionListener
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -39,10 +39,13 @@ import jsyntaxpane.DefaultSyntaxKit;
|
||||
public class SelectLanguageDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
JComboBox<Language> languageCombobox = new JComboBox<>();
|
||||
|
||||
public String languageCode = null;
|
||||
|
||||
public static final String[] languages = new String[]{"en", "ca", "cs", "zh", "de", "es", "fr", "hu", "nl", "pl", "pt", "pt-BR", "ru", "sv", "uk"};
|
||||
|
||||
public SelectLanguageDialog() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -48,9 +48,13 @@ public class SoundTagPlayer implements MediaDisplay {
|
||||
private final Clip clip;
|
||||
|
||||
private int loopCount;
|
||||
|
||||
private boolean paused = false;
|
||||
|
||||
private final Object playLock = new Object();
|
||||
|
||||
private final SoundTag tag;
|
||||
|
||||
private final List<PlayerListener> listeners = new ArrayList<>();
|
||||
|
||||
public void addListener(PlayerListener l) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,8 +26,11 @@ import java.util.ResourceBundle;
|
||||
public class SwfInMemory {
|
||||
|
||||
public ReReadableInputStream is;
|
||||
|
||||
public int version;
|
||||
|
||||
public long fileSize;
|
||||
|
||||
public com.jpexs.process.Process process;
|
||||
|
||||
public SwfInMemory(ReReadableInputStream is, int version, long fileSize, com.jpexs.process.Process process) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -44,14 +44,21 @@ import jsyntaxpane.DefaultSyntaxKit;
|
||||
public class TextPanel extends JPanel implements ActionListener {
|
||||
|
||||
private static final String ACTION_EDIT_TEXT = "EDITTEXT";
|
||||
|
||||
private static final String ACTION_CANCEL_TEXT = "CANCELTEXT";
|
||||
|
||||
private static final String ACTION_SAVE_TEXT = "SAVETEXT";
|
||||
|
||||
private final MainPanel mainPanel;
|
||||
|
||||
private final SearchPanel<TextTag> textSearchPanel;
|
||||
|
||||
private final LineMarkedEditorPane textValue;
|
||||
|
||||
private final JButton textSaveButton;
|
||||
|
||||
private final JButton textEditButton;
|
||||
|
||||
private final JButton textCancelButton;
|
||||
|
||||
public TextPanel(final MainPanel mainPanel) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -99,12 +99,15 @@ import org.pushingpixels.substance.internal.utils.SubstanceColorSchemeUtilities;
|
||||
public class View {
|
||||
|
||||
public static final Color DEFAULT_BACKGROUND_COLOR = new Color(217, 231, 250);
|
||||
|
||||
public static Color swfBackgroundColor = DEFAULT_BACKGROUND_COLOR;
|
||||
|
||||
private static final BufferedImage transparentTexture;
|
||||
|
||||
public static final TexturePaint transparentPaint;
|
||||
|
||||
private static final Color transparentColor1 = new Color(0x99, 0x99, 0x99);
|
||||
|
||||
private static final Color transparentColor2 = new Color(0x66, 0x66, 0x66);
|
||||
|
||||
static {
|
||||
@@ -160,10 +163,15 @@ public class View {
|
||||
private final FontSet fontSet = new FontSet() {
|
||||
|
||||
private FontUIResource controlFont;
|
||||
|
||||
private FontUIResource menuFont;
|
||||
|
||||
private FontUIResource titleFont;
|
||||
|
||||
private FontUIResource windowTitleFont;
|
||||
|
||||
private FontUIResource smallFont;
|
||||
|
||||
private FontUIResource messageFont;
|
||||
|
||||
@Override
|
||||
@@ -305,7 +313,9 @@ public class View {
|
||||
public static ImageIcon getIcon(String name) {
|
||||
return new ImageIcon(View.class.getClassLoader().getResource("com/jpexs/decompiler/flash/gui/graphics/" + name + ".png"));
|
||||
}
|
||||
|
||||
private static final KeyStroke escapeStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
|
||||
|
||||
private static final String dispatchWindowClosingActionMapKey = "com.jpexs.dispatch:WINDOW_CLOSING";
|
||||
|
||||
public static void installEscapeCloseOperation(final JDialog dialog) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -25,7 +25,9 @@ import javax.swing.event.ListDataListener;
|
||||
public class ABCComboBoxModel implements ComboBoxModel<ABCContainerTag> {
|
||||
|
||||
public List<ABCContainerTag> list;
|
||||
|
||||
public int itemIndex = 0;
|
||||
|
||||
public static final ABCContainerTag ROOT = new RootABCContainerTag();
|
||||
|
||||
public ABCComboBoxModel(List<ABCContainerTag> list) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -114,32 +114,53 @@ import jsyntaxpane.TokenType;
|
||||
public class ABCPanel extends JPanel implements ItemListener, ActionListener, SearchListener<ABCPanelSearchResult>, Freed {
|
||||
|
||||
private MainPanel mainPanel;
|
||||
|
||||
public TraitsList navigator;
|
||||
|
||||
public ABC abc;
|
||||
|
||||
public JComboBox<ABCContainerTag> abcComboBox;
|
||||
|
||||
public DecompiledEditorPane decompiledTextArea;
|
||||
|
||||
public JScrollPane decompiledScrollPane;
|
||||
|
||||
public JSplitPane splitPane;
|
||||
|
||||
//public JSplitPane splitPaneTreeVSNavigator;
|
||||
//public JSplitPane splitPaneTreeNavVSDecompiledDetail;
|
||||
private JTable constantTable;
|
||||
|
||||
public JComboBox<String> constantTypeList;
|
||||
|
||||
public JLabel asmLabel = new HeaderLabel(AppStrings.translate("panel.disassembled"));
|
||||
|
||||
public JLabel decLabel = new HeaderLabel(AppStrings.translate("panel.decompiled"));
|
||||
|
||||
public DetailPanel detailPanel;
|
||||
|
||||
public JPanel navPanel;
|
||||
|
||||
public JTabbedPane tabbedPane;
|
||||
|
||||
public SearchPanel<ABCPanelSearchResult> searchPanel;
|
||||
|
||||
private NewTraitDialog newTraitDialog;
|
||||
|
||||
public JLabel scriptNameLabel;
|
||||
|
||||
private static final String ACTION_SAVE_DECOMPILED = "SAVEDECOMPILED";
|
||||
|
||||
private static final String ACTION_EDIT_DECOMPILED = "EDITDECOMPILED";
|
||||
|
||||
private static final String ACTION_CANCEL_DECOMPILED = "CANCELDECOMPILED";
|
||||
|
||||
public JLabel experimentalLabel = new JLabel(AppStrings.translate("action.edit.experimental"));
|
||||
|
||||
public JButton editDecompiledButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
|
||||
|
||||
public JButton saveDecompiledButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
|
||||
|
||||
public JButton cancelDecompiledButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
|
||||
|
||||
private static final String ACTION_ADD_TRAIT = "ADDTRAIT";
|
||||
@@ -634,7 +655,6 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
|
||||
decompiledTextArea.setCursor(Cursor.getDefaultCursor());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
@@ -709,8 +729,11 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
|
||||
}
|
||||
|
||||
public String lastDecompiled = null;
|
||||
|
||||
public boolean directEditing = false;
|
||||
|
||||
private int detWidth = 0;
|
||||
|
||||
private int detsp = 0;
|
||||
|
||||
public void setDecompiledEditMode(boolean val) {
|
||||
@@ -807,7 +830,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
|
||||
decompiledTextArea.markError();
|
||||
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", ex.text).replace("%line%", Long.toString(ex.line)), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
} catch (IOException | InterruptedException ex) {
|
||||
//ignore
|
||||
//ignore
|
||||
}
|
||||
break;
|
||||
case ACTION_ADD_TRAIT:
|
||||
@@ -913,5 +936,4 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,11 +26,11 @@ import com.jpexs.decompiler.flash.abc.ScriptPack;
|
||||
public class ABCPanelSearchResult {
|
||||
|
||||
public ScriptPack scriptPack;
|
||||
|
||||
public ClassPath classPath;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return classPath.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -49,16 +49,27 @@ import javax.swing.event.CaretListener;
|
||||
public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretListener {
|
||||
|
||||
public ABC abc;
|
||||
|
||||
public int bodyIndex = -1;
|
||||
|
||||
private List<Highlighting> disassembledHilights = new ArrayList<>();
|
||||
|
||||
private List<Highlighting> specialHilights = new ArrayList<>();
|
||||
|
||||
private final DecompiledEditorPane decompiledEditor;
|
||||
|
||||
private boolean ignoreCarret = false;
|
||||
|
||||
private String name;
|
||||
|
||||
private HighlightedText textWithHex;
|
||||
|
||||
private HighlightedText textNoHex;
|
||||
|
||||
private HighlightedText textHexOnly;
|
||||
|
||||
private ScriptExportMode exportMode = ScriptExportMode.PCODE;
|
||||
|
||||
private Trait trait;
|
||||
|
||||
public ABCPanel getAbcPanel() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -36,8 +36,11 @@ import javax.swing.tree.TreePath;
|
||||
public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel {
|
||||
|
||||
private SWF swf;
|
||||
|
||||
private List<MyEntry<ClassPath, ScriptPack>> list;
|
||||
|
||||
private AS3Package root;
|
||||
|
||||
private final List<TreeModelListener> listeners = new ArrayList<>();
|
||||
|
||||
public List<MyEntry<ClassPath, ScriptPack>> getList() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -25,14 +25,23 @@ import javax.swing.event.ListDataListener;
|
||||
public class ConstantsListModel implements ListModel {
|
||||
|
||||
private final AVM2ConstantPool constants;
|
||||
|
||||
public static final int TYPE_UINT = 0;
|
||||
|
||||
public static final int TYPE_INT = 1;
|
||||
|
||||
public static final int TYPE_DOUBLE = 2;
|
||||
|
||||
public static final int TYPE_DECIMAL = 3;
|
||||
|
||||
public static final int TYPE_STRING = 4;
|
||||
|
||||
public static final int TYPE_NAMESPACE = 5;
|
||||
|
||||
public static final int TYPE_NAMESPACESET = 6;
|
||||
|
||||
public static final int TYPE_MULTINAME = 7;
|
||||
|
||||
private int type = TYPE_INT;
|
||||
|
||||
public ConstantsListModel(AVM2ConstantPool constants, int type) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -55,18 +55,31 @@ import jsyntaxpane.TokenType;
|
||||
public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretListener {
|
||||
|
||||
private List<Highlighting> highlights = new ArrayList<>();
|
||||
|
||||
private List<Highlighting> specialHighlights = new ArrayList<>();
|
||||
|
||||
private List<Highlighting> traitHighlights = new ArrayList<>();
|
||||
|
||||
private List<Highlighting> methodHighlights = new ArrayList<>();
|
||||
|
||||
private List<Highlighting> classHighlights = new ArrayList<>();
|
||||
|
||||
private Highlighting currentMethodHighlight;
|
||||
|
||||
private Highlighting currentTraitHighlight;
|
||||
|
||||
private ScriptPack script;
|
||||
|
||||
public int lastTraitIndex = 0;
|
||||
|
||||
public boolean ignoreCarret = false;
|
||||
|
||||
private boolean reset = false;
|
||||
|
||||
private final ABCPanel abcPanel;
|
||||
|
||||
private int classIndex = -1;
|
||||
|
||||
private boolean isStatic = false;
|
||||
|
||||
private final List<Runnable> scriptListeners = new ArrayList<>();
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -39,13 +39,19 @@ import javax.swing.JSlider;
|
||||
public class DeobfuscationDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
public JCheckBox processAllCheckbox = new JCheckBox(translate("processallclasses"));
|
||||
|
||||
public JSlider codeProcessingLevel;
|
||||
|
||||
public boolean ok = false;
|
||||
|
||||
public static final int LEVEL_REMOVE_DEAD_CODE = 1;
|
||||
|
||||
public static final int LEVEL_REMOVE_TRAPS = 2;
|
||||
|
||||
public static final int LEVEL_RESTORE_CONTROL_FLOW = 3;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -44,25 +44,43 @@ import javax.swing.border.BevelBorder;
|
||||
public class DetailPanel extends JPanel implements ActionListener {
|
||||
|
||||
private static final String ACTION_SAVE_DETAIL = "SAVEDETAIL";
|
||||
|
||||
private static final String ACTION_EDIT_DETAIL = "EDITDETAIL";
|
||||
|
||||
private static final String ACTION_CANCEL_DETAIL = "CANCELDETAIL";
|
||||
|
||||
public MethodTraitDetailPanel methodTraitPanel;
|
||||
|
||||
public JPanel unsupportedTraitPanel;
|
||||
|
||||
public SlotConstTraitDetailPanel slotConstTraitPanel;
|
||||
|
||||
public static final String METHOD_TRAIT_CARD = AppStrings.translate("abc.detail.methodtrait");
|
||||
|
||||
public static final String UNSUPPORTED_TRAIT_CARD = AppStrings.translate("abc.detail.unsupported");
|
||||
|
||||
public static final String SLOT_CONST_TRAIT_CARD = AppStrings.translate("abc.detail.slotconsttrait");
|
||||
|
||||
private final JPanel innerPanel;
|
||||
|
||||
public JButton saveButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
|
||||
|
||||
public JButton editButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
|
||||
|
||||
public JButton cancelButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
|
||||
|
||||
private final HashMap<String, JComponent> cardMap = new HashMap<>();
|
||||
|
||||
private String selectedCard;
|
||||
|
||||
private final JLabel selectedLabel;
|
||||
|
||||
private boolean editMode = false;
|
||||
|
||||
private final JPanel buttonsPanel;
|
||||
|
||||
private final ABCPanel abcPanel;
|
||||
|
||||
private final JLabel traitNameLabel;
|
||||
|
||||
public DetailPanel(ABCPanel abcPanel) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -28,7 +28,9 @@ import javax.swing.JList;
|
||||
public class IconListRenderer extends DefaultListCellRenderer {
|
||||
|
||||
private final Icon constIcon;
|
||||
|
||||
private final Icon functionIcon;
|
||||
|
||||
private final Icon variableIcon;
|
||||
|
||||
private Icon loadIcon(String path) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -54,7 +54,9 @@ import jsyntaxpane.actions.ActionUtils;
|
||||
public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHandler {
|
||||
|
||||
private static final int truncateLimit = 2 * 1024 * 1024;
|
||||
|
||||
private int lastLine = -1;
|
||||
|
||||
private boolean error = false;
|
||||
|
||||
public int getLine() {
|
||||
@@ -141,13 +143,17 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHan
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Token lastUnderlined = null;
|
||||
|
||||
private static final HighlightPainter underLinePainter = new UnderLinePainter(new Color(0, 0, 255));
|
||||
|
||||
private LinkHandler linkHandler = this;
|
||||
|
||||
private class LinkAdapter extends MouseAdapter implements KeyListener {
|
||||
|
||||
private Point lastPos = new Point(0, 0);
|
||||
|
||||
private boolean ctrlDown = false;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -41,12 +41,17 @@ import javax.swing.JToggleButton;
|
||||
public class MethodCodePanel extends JPanel implements ActionListener {
|
||||
|
||||
private static final String ACTION_GRAPH = "GRAPH";
|
||||
|
||||
private static final String ACTION_HEX = "HEX";
|
||||
|
||||
private static final String ACTION_HEX_ONLY = "HEXONLY";
|
||||
|
||||
private final ASMSourceEditorPane sourceTextArea;
|
||||
|
||||
public JPanel buttonsPanel;
|
||||
|
||||
private final JToggleButton hexButton;
|
||||
|
||||
private final JToggleButton hexOnlyButton;
|
||||
|
||||
public void focusEditor() {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -26,6 +26,7 @@ import javax.swing.JPanel;
|
||||
public class MethodTraitDetailPanel extends JPanel implements TraitDetail {
|
||||
|
||||
public MethodCodePanel methodCodePanel;
|
||||
|
||||
public ABCPanel abcPanel;
|
||||
|
||||
public MethodTraitDetailPanel(ABCPanel abcPanel) {
|
||||
@@ -48,6 +49,7 @@ public class MethodTraitDetailPanel extends JPanel implements TraitDetail {
|
||||
public void setEditMode(boolean val) {
|
||||
methodCodePanel.setEditMode(val);
|
||||
}
|
||||
|
||||
private boolean active = false;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -124,5 +124,4 @@ public class MyMarkers {
|
||||
markText(pane, matcher.start(), matcher.end(), marker);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -44,6 +44,7 @@ import javax.swing.event.AncestorListener;
|
||||
public class NewTraitDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final String ACTION_OK = "OK";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private static final int modifiers[] = new int[]{
|
||||
@@ -55,6 +56,7 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
|
||||
Namespace.KIND_EXPLICIT,
|
||||
Namespace.KIND_STATIC_PROTECTED
|
||||
};
|
||||
|
||||
private static final int types[] = new int[]{
|
||||
Trait.TRAIT_METHOD,
|
||||
Trait.TRAIT_GETTER,
|
||||
@@ -62,9 +64,13 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
|
||||
Trait.TRAIT_CONST,
|
||||
Trait.TRAIT_SLOT
|
||||
};
|
||||
|
||||
private final JComboBox<String> accessComboBox;
|
||||
|
||||
private final JComboBox<String> typeComboBox;
|
||||
|
||||
private final JCheckBox staticCheckbox;
|
||||
|
||||
private final JTextField nameField;
|
||||
|
||||
public boolean getStatic() {
|
||||
@@ -156,6 +162,7 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
|
||||
setVisible(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean result = false;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -48,5 +48,4 @@ public class RootABCContainerTag implements ABCContainerTag {
|
||||
public String toString() {
|
||||
return " - all - ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -47,10 +47,15 @@ import javax.swing.event.CaretListener;
|
||||
public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail {
|
||||
|
||||
public JEditorPane slotConstEditor;
|
||||
|
||||
private ABC abc;
|
||||
|
||||
private TraitSlotConst trait;
|
||||
|
||||
private boolean showWarning = false;
|
||||
|
||||
private List<Highlighting> specialHilights;
|
||||
|
||||
private boolean ignoreCaret = false;
|
||||
|
||||
public SlotConstTraitDetailPanel(final DecompiledEditorPane editor) {
|
||||
@@ -134,6 +139,7 @@ public class SlotConstTraitDetailPanel extends JPanel implements TraitDetail {
|
||||
}
|
||||
slotConstEditor.setEditable(val);
|
||||
}
|
||||
|
||||
private boolean active = false;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -31,8 +31,11 @@ import javax.swing.event.ListSelectionListener;
|
||||
public class TraitsList extends JList<Object> implements ListSelectionListener {
|
||||
|
||||
private ABC abc;
|
||||
|
||||
private int classIndex = -1;
|
||||
|
||||
private final ABCPanel abcPanel;
|
||||
|
||||
private boolean sorted = false;
|
||||
|
||||
public void setSorted(boolean sorted) {
|
||||
@@ -82,6 +85,7 @@ public class TraitsList extends JList<Object> implements ListSelectionListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int lastSelected = -1;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -36,12 +36,19 @@ import java.util.logging.Logger;
|
||||
public class TraitsListItem {
|
||||
|
||||
private final Type type;
|
||||
|
||||
private final boolean isStatic;
|
||||
|
||||
private final ABC abc;
|
||||
|
||||
private final int classIndex;
|
||||
|
||||
private final int index;
|
||||
|
||||
private final int scriptIndex;
|
||||
|
||||
public String STR_INSTANCE_INITIALIZER = AppStrings.translate("abc.traitslist.instanceinitializer");
|
||||
|
||||
public String STR_CLASS_INITIALIZER = AppStrings.translate("abc.traitslist.classinitializer");
|
||||
|
||||
public TraitsListItem(Type type, int index, boolean isStatic, ABC abc, int classIndex, int scriptIndex) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -27,8 +27,11 @@ import javax.swing.event.ListDataListener;
|
||||
public final class TraitsListModel implements ListModel<Object> {
|
||||
|
||||
private List<TraitsListItem> items;
|
||||
|
||||
private final ABC abc;
|
||||
|
||||
private final int classIndex;
|
||||
|
||||
private final int scriptIndex;
|
||||
|
||||
public void setSorted(boolean sorted) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -37,6 +37,7 @@ import jsyntaxpane.SyntaxDocument;
|
||||
public class UndoFixedEditorPane extends JEditorPane {
|
||||
|
||||
private static final Object setTextLock = new Object();
|
||||
|
||||
private String originalContentType;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -47,12 +47,17 @@ import javax.swing.JScrollPane;
|
||||
public class UsageFrame extends AppDialog implements ActionListener, MouseListener {
|
||||
|
||||
private static final String ACTION_GOTO = "GOTO";
|
||||
|
||||
private static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private final JButton gotoButton = new JButton(translate("button.goto"));
|
||||
|
||||
private final JButton cancelButton = new JButton(translate("button.cancel"));
|
||||
|
||||
private final JList usageList;
|
||||
|
||||
private final UsageListModel usageListModel;
|
||||
|
||||
private final ABCPanel abcPanel;
|
||||
|
||||
public UsageFrame(ABC abc, int multinameIndex, ABCPanel abcPanel, boolean definitions) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
|
||||
public class DecimalTableModel implements TableModel {
|
||||
|
||||
private final ABC abc;
|
||||
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class};
|
||||
|
||||
public DecimalTableModel(ABC abc) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
|
||||
public class DoubleTableModel implements TableModel {
|
||||
|
||||
private final ABC abc;
|
||||
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class};
|
||||
|
||||
public DoubleTableModel(ABC abc) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -23,7 +23,9 @@ import javax.swing.table.TableModel;
|
||||
public class IntTableModel implements TableModel {
|
||||
|
||||
private final ABC abc;
|
||||
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
|
||||
private static final Class[] classes = new Class[]{Long.class, Long.class};
|
||||
|
||||
public IntTableModel(ABC abc) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -24,7 +24,9 @@ import javax.swing.table.TableModel;
|
||||
public class MultinameTableModel implements TableModel {
|
||||
|
||||
private final ABC abc;
|
||||
|
||||
private static final String[] columnNames = new String[]{"Index", "Kind", "Name", "Namespace", "NamespaceSet"};
|
||||
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class, String.class, String.class, String.class};
|
||||
|
||||
public MultinameTableModel(ABC abc) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user