Codebase list jd-gui / 9f77ed9
Cleaning API emmanue1 5 years ago
33 changed file(s) with 139 addition(s) and 140 deletion(s). Raw diff Collapse all Expand all
1919 import java.util.Map;
2020
2121 public interface API {
22 public boolean openURI(URI uri);
22 boolean openURI(URI uri);
2323
24 public boolean openURI(int x, int y, Collection<Container.Entry> entries, String query, String fragment);
24 boolean openURI(int x, int y, Collection<Container.Entry> entries, String query, String fragment);
2525
26 public void addURI(URI uri);
26 void addURI(URI uri);
2727
28 public <T extends JComponent & UriGettable> void addPanel(String title, Icon icon, String tip, T component);
28 <T extends JComponent & UriGettable> void addPanel(String title, Icon icon, String tip, T component);
2929
30 public Collection<Action> getContextualActions(Container.Entry entry, String fragment);
30 Collection<Action> getContextualActions(Container.Entry entry, String fragment);
3131
32 public UriLoader getUriLoader(URI uri);
32 UriLoader getUriLoader(URI uri);
3333
34 public FileLoader getFileLoader(File file);
34 FileLoader getFileLoader(File file);
3535
36 public ContainerFactory getContainerFactory(Path rootPath);
36 ContainerFactory getContainerFactory(Path rootPath);
3737
38 public PanelFactory getMainPanelFactory(Container container);
38 PanelFactory getMainPanelFactory(Container container);
3939
40 public TreeNodeFactory getTreeNodeFactory(Container.Entry entry);
40 TreeNodeFactory getTreeNodeFactory(Container.Entry entry);
4141
42 public TypeFactory getTypeFactory(Container.Entry entry);
42 TypeFactory getTypeFactory(Container.Entry entry);
4343
44 public Indexer getIndexer(Container.Entry entry);
44 Indexer getIndexer(Container.Entry entry);
4545
46 public SourceSaver getSourceSaver(Container.Entry entry);
46 SourceSaver getSourceSaver(Container.Entry entry);
4747
48 public Map<String, String> getPreferences();
48 Map<String, String> getPreferences();
4949
50 public Collection<Indexes> getCollectionOfIndexes();
50 Collection<Indexes> getCollectionOfIndexes();
5151 }
99 import org.jd.gui.api.model.Container;
1010
1111 public interface ContainerEntryGettable {
12 public Container.Entry getEntry();
12 Container.Entry getEntry();
1313 }
77 package org.jd.gui.api.feature;
88
99 public interface ContentCopyable {
10 public void copy();
10 void copy();
1111 }
1010 import org.jd.gui.api.model.Indexes;
1111
1212 public interface ContentIndexable {
13 public Indexes index(API api);
13 Indexes index(API api);
1414 }
1111 import java.io.OutputStream;
1212
1313 public interface ContentSavable {
14 public String getFileName();
14 String getFileName();
1515
16 public void save(API api, OutputStream os);
16 void save(API api, OutputStream os);
1717 }
77 package org.jd.gui.api.feature;
88
99 public interface ContentSearchable {
10 public boolean highlightText(String text, boolean caseSensitive);
10 boolean highlightText(String text, boolean caseSensitive);
1111
12 public void findNext(String text, boolean caseSensitive);
12 void findNext(String text, boolean caseSensitive);
1313
14 public void findPrevious(String text, boolean caseSensitive);
14 void findPrevious(String text, boolean caseSensitive);
1515 }
77 package org.jd.gui.api.feature;
88
99 public interface ContentSelectable {
10 public void selectAll();
10 void selectAll();
1111 }
77 package org.jd.gui.api.feature;
88
99 public interface FocusedTypeGettable extends ContainerEntryGettable {
10 public String getFocusedTypeName();
10 String getFocusedTypeName();
1111 }
77 package org.jd.gui.api.feature;
88
99 public interface LineNumberNavigable {
10 public int getMaximumLineNumber();
10 int getMaximumLineNumber();
1111
12 public void goToLineNumber(int lineNumber);
12 void goToLineNumber(int lineNumber);
1313
14 public boolean checkLineNumber(int lineNumber);
14 boolean checkLineNumber(int lineNumber);
1515 }
99 import javax.swing.*;
1010
1111 public interface PageChangeListener {
12 public <T extends JComponent & UriGettable> void pageChanged(T page);
12 <T extends JComponent & UriGettable> void pageChanged(T page);
1313 }
77 package org.jd.gui.api.feature;
88
99 public interface PageChangeable {
10 public void addPageChangeListener(PageChangeListener listener);
10 void addPageChangeListener(PageChangeListener listener);
1111 }
77 package org.jd.gui.api.feature;
88
99 public interface PageClosable {
10 public boolean closePage();
10 boolean closePage();
1111 }
1111 import javax.swing.*;
1212
1313 public interface PageCreator {
14 public <T extends JComponent & UriGettable> T createPage(API api);
14 <T extends JComponent & UriGettable> T createPage(API api);
1515 }
99 import java.util.Map;
1010
1111 public interface PreferencesChangeListener {
12 public void preferencesChanged(Map<String, String> preferences);
12 void preferencesChanged(Map<String, String> preferences);
1313 }
1010 import java.nio.file.Path;
1111
1212 public interface SourcesSavable {
13 public String getSourceFileName();
13 String getSourceFileName();
1414
15 public int getFileCount();
15 int getFileCount();
1616
17 public void save(API api, Controller controller, Listener listener, Path path);
17 void save(API api, Controller controller, Listener listener, Path path);
1818
19 public interface Controller {
20 public boolean isCancelled();
19 interface Controller {
20 boolean isCancelled();
2121 }
2222
23 public interface Listener {
24 public void pathSaved(Path path);
23 interface Listener {
24 void pathSaved(Path path);
2525 }
2626 }
99 import org.jd.gui.api.API;
1010
1111 public interface TreeNodeExpandable {
12 public void populateTreeNode(API api);
12 void populateTreeNode(API api);
1313 }
99 import java.net.URI;
1010
1111 public interface UriGettable {
12 public URI getUri();
12 URI getUri();
1313 }
6161 * </ul>
6262 */
6363 public interface UriOpenable {
64 public boolean openUri(URI uri);
64 boolean openUri(URI uri);
6565 }
1111 import java.util.Collection;
1212
1313 public interface Container {
14 public String getType();
14 String getType();
1515
16 public Entry getRoot();
16 Entry getRoot();
1717
1818 /**
1919 * File or directory
2020 */
21 public interface Entry {
22 public Container getContainer();
21 interface Entry {
22 Container getContainer();
2323
24 public Entry getParent();
24 Entry getParent();
2525
26 public URI getUri();
26 URI getUri();
2727
28 public String getPath();
28 String getPath();
2929
30 public boolean isDirectory();
30 boolean isDirectory();
3131
32 public long length();
32 long length();
3333
34 public InputStream getInputStream();
34 InputStream getInputStream();
3535
36 public Collection<Entry> getChildren();
36 Collection<Entry> getChildren();
3737 }
3838 }
6363 * </ul>
6464 */
6565 public interface Indexes {
66 public void waitIndexers();
66 void waitIndexers();
6767
68 public Map<String, Collection> getIndex(String name);
68 Map<String, Collection> getIndex(String name);
6969 }
99 import javax.swing.*;
1010
1111 public interface TreeNodeData {
12 public String getLabel();
12 String getLabel();
1313
14 public String getTip();
14 String getTip();
1515
16 public Icon getIcon();
16 Icon getIcon();
1717
18 public Icon getOpenIcon();
18 Icon getOpenIcon();
1919 }
1010 import java.util.Collection;
1111
1212 public interface Type {
13 public final static int FLAG_PUBLIC = 1;
14 public final static int FLAG_PRIVATE = 2;
15 public final static int FLAG_PROTECTED = 4;
16 public final static int FLAG_STATIC = 8;
17 public final static int FLAG_FINAL = 16;
18 public final static int FLAG_VARARGS = 128;
19 public final static int FLAG_INTERFACE = 512;
20 public final static int FLAG_ABSTRACT = 1024;
21 public final static int FLAG_ANNOTATION = 8192;
22 public final static int FLAG_ENUM = 16384;
13 int FLAG_PUBLIC = 1;
14 int FLAG_PRIVATE = 2;
15 int FLAG_PROTECTED = 4;
16 int FLAG_STATIC = 8;
17 int FLAG_FINAL = 16;
18 int FLAG_VARARGS = 128;
19 int FLAG_INTERFACE = 512;
20 int FLAG_ABSTRACT = 1024;
21 int FLAG_ANNOTATION = 8192;
22 int FLAG_ENUM = 16384;
2323
24 public int getFlags();
24 int getFlags();
2525
26 public String getName();
26 String getName();
2727
28 public String getSuperName();
28 String getSuperName();
2929
30 public String getOuterName();
30 String getOuterName();
3131
32 public String getDisplayTypeName();
32 String getDisplayTypeName();
3333
34 public String getDisplayInnerTypeName();
34 String getDisplayInnerTypeName();
3535
36 public String getDisplayPackageName();
36 String getDisplayPackageName();
3737
38 public Icon getIcon();
38 Icon getIcon();
3939
40 public Collection<Type> getInnerTypes();
40 Collection<Type> getInnerTypes();
4141
42 public Collection<Field> getFields();
42 Collection<Field> getFields();
4343
44 public Collection<Method> getMethods();
44 Collection<Method> getMethods();
4545
46 public interface Field {
47 public int getFlags();
46 interface Field {
47 int getFlags();
4848
49 public String getName();
49 String getName();
5050
51 public String getDescriptor();
51 String getDescriptor();
5252
53 public String getDisplayName();
53 String getDisplayName();
5454
55 public Icon getIcon();
55 Icon getIcon();
5656 }
5757
58 public interface Method {
59 public int getFlags();
58 interface Method {
59 int getFlags();
6060
61 public String getName();
61 String getName();
6262
63 public String getDescriptor();
63 String getDescriptor();
6464
65 public String getDisplayName();
65 String getDisplayName();
6666
67 public Icon getIcon();
67 Icon getIcon();
6868 }
6969 }
1212 import java.nio.file.Path;
1313
1414 public interface ContainerFactory {
15 public String getType();
15 String getType();
1616
17 public boolean accept(API api, Path rootPath);
17 boolean accept(API api, Path rootPath);
1818
19 public Container make(API api, Container.Entry parentEntry, Path rootPath);
19 Container make(API api, Container.Entry parentEntry, Path rootPath);
2020 }
1313 import java.util.Collection;
1414
1515 public interface ContextualActionsFactory {
16
17 public static final String GROUP_NAME = "GroupNameKey";
16 String GROUP_NAME = "GroupNameKey";
1817
1918 /**
2019 * Build a collection of actions for 'entry' and 'fragment', grouped by GROUP_NAME and sorted by NAME. Null values
2322 * @param fragment @see jd.gui.api.feature.UriOpenable
2423 * @return a collection of actions
2524 */
26 public Collection<Action> make(API api, Container.Entry entry, String fragment);
25 Collection<Action> make(API api, Container.Entry entry, String fragment);
2726 }
1111 import java.io.File;
1212
1313 public interface FileLoader {
14 public String[] getExtensions();
14 String[] getExtensions();
1515
16 public String getDescription();
16 String getDescription();
1717
18 public boolean accept(API api, File file);
18 boolean accept(API api, File file);
1919
20 public boolean load(API api, File file);
20 boolean load(API api, File file);
2121 }
1313 import java.util.regex.Pattern;
1414
1515 public interface Indexer {
16 public String[] getSelectors();
16 String[] getSelectors();
1717
18 public Pattern getPathPattern();
18 Pattern getPathPattern();
1919
20 public void index(API api, Container.Entry entry, Indexes indexes);
20 void index(API api, Container.Entry entry, Indexes indexes);
2121 }
1313 import javax.swing.JComponent;
1414
1515 public interface PanelFactory {
16 public String[] getTypes();
16 String[] getTypes();
1717
18 public <T extends JComponent & UriGettable> T make(API api, Container container);
18 <T extends JComponent & UriGettable> T make(API api, Container container);
1919 }
99 import org.jd.gui.api.API;
1010
1111 public interface PasteHandler {
12 public boolean accept(Object obj);
12 boolean accept(Object obj);
1313
14 public void paste(API api, Object obj);
14 void paste(API api, Object obj);
1515 }
1010 import java.util.Map;
1111
1212 public interface PreferencesPanel {
13 public String getPreferencesGroupTitle();
13 String getPreferencesGroupTitle();
1414
15 public String getPreferencesPanelTitle();
15 String getPreferencesPanelTitle();
1616
17 public void init(Color errorBackgroundColor);
17 void init(Color errorBackgroundColor);
1818
19 public boolean isActivated();
19 boolean isActivated();
2020
21 public void loadPreferences(Map<String, String> preferences);
21 void loadPreferences(Map<String, String> preferences);
2222
23 public void savePreferences(Map<String, String> preferences);
23 void savePreferences(Map<String, String> preferences);
2424
25 public boolean arePreferencesValid();
25 boolean arePreferencesValid();
2626
27 public void addPreferencesChangeListener(PreferencesPanelChangeListener listener);
27 void addPreferencesChangeListener(PreferencesPanelChangeListener listener);
2828
29 public interface PreferencesPanelChangeListener {
30 public void preferencesPanelChanged(PreferencesPanel source);
29 interface PreferencesPanelChangeListener {
30 void preferencesPanelChanged(PreferencesPanel source);
3131 }
3232 }
1313 import java.util.regex.Pattern;
1414
1515 public interface SourceSaver {
16 public String[] getSelectors();
16 String[] getSelectors();
1717
18 public Pattern getPathPattern();
18 Pattern getPathPattern();
1919
20 public String getSourcePath(Container.Entry entry);
20 String getSourcePath(Container.Entry entry);
2121
22 public int getFileCount(API api, Container.Entry entry);
22 int getFileCount(API api, Container.Entry entry);
2323
2424 /**
2525 * Check parent path, build source file name, create NIO path and save the content.
2626 */
27 public void save(API api, Controller controller, Listener listener, Path rootPath, Container.Entry entry);
27 void save(API api, Controller controller, Listener listener, Path rootPath, Container.Entry entry);
2828
2929 /**
3030 * Save content:
3333 * <li>For directory, call 'save' for each children.</li>
3434 * </ul>
3535 */
36 public void saveContent(API api, Controller controller, Listener listener, Path rootPath, Path path, Container.Entry entry);
36 void saveContent(API api, Controller controller, Listener listener, Path rootPath, Path path, Container.Entry entry);
3737
38 public interface Controller {
39 public boolean isCancelled();
38 interface Controller {
39 boolean isCancelled();
4040 }
4141
42 public interface Listener {
43 public void pathSaved(Path path);
42 interface Listener {
43 void pathSaved(Path path);
4444 }
4545 }
1616 import java.util.regex.Pattern;
1717
1818 public interface TreeNodeFactory {
19 public String[] getSelectors();
19 String[] getSelectors();
2020
21 public Pattern getPathPattern();
21 Pattern getPathPattern();
2222
23 public <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry);
23 <T extends DefaultMutableTreeNode & ContainerEntryGettable & UriGettable> T make(API api, Container.Entry entry);
2424 }
1414 import java.util.regex.Pattern;
1515
1616 public interface TypeFactory {
17 public String[] getSelectors();
17 String[] getSelectors();
1818
19 public Pattern getPathPattern();
19 Pattern getPathPattern();
2020
2121 /**
2222 * @return all root types contains in 'entry'
2323 */
24 public Collection<Type> make(API api, Container.Entry entry);
24 Collection<Type> make(API api, Container.Entry entry);
2525
2626 /**
2727 * @param fragment @see jd.gui.api.feature.UriOpenable
2828 * @return if 'fragment' is null, return the main type in 'entry',
2929 * otherwise, return the type or sub-type matching with 'fragment'
3030 */
31 public Type make(API api, Container.Entry entry, String fragment);
31 Type make(API api, Container.Entry entry, String fragment);
3232 }
1111 import java.net.URI;
1212
1313 public interface UriLoader {
14 public String[] getSchemes();
14 String[] getSchemes();
1515
16 public boolean accept(API api, URI uri);
16 boolean accept(API api, URI uri);
1717
18 public boolean load(API api, URI uri);
18 boolean load(API api, URI uri);
1919 }