Better Looking Search Elements
This commit is contained in:
parent
c7dd1be0e6
commit
8c9fe299cc
|
@ -98,7 +98,7 @@ public class SearchBoxPane extends TranslatedVisibleComponent
|
|||
|
||||
typeBox.addItemListener(il);
|
||||
|
||||
typeBox.setSelectedItem(SearchType.Strings);
|
||||
typeBox.setSelectedItem(SearchType.STRINGS);
|
||||
il.itemStateChanged(null);
|
||||
|
||||
searchOpts.add(typeBox);
|
||||
|
@ -178,7 +178,7 @@ public class SearchBoxPane extends TranslatedVisibleComponent
|
|||
searchType = (SearchType) typeBox.getSelectedItem();
|
||||
final SearchRadius radius = (SearchRadius) searchRadiusBox.getSelectedItem();
|
||||
|
||||
if (radius == SearchRadius.All_Classes)
|
||||
if (radius == SearchRadius.ALL_CLASSES)
|
||||
{
|
||||
if (performSearchThread == null || performSearchThread.finished)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ public class SearchBoxPane extends TranslatedVisibleComponent
|
|||
BytecodeViewer.showMessage("You currently have a search performing in the background, please wait for that to finish.");
|
||||
}
|
||||
}
|
||||
else if (radius == SearchRadius.Current_Class)
|
||||
else if (radius == SearchRadius.CURRENT_CLASS)
|
||||
{
|
||||
final ResourceViewer cv = BytecodeViewer.getActiveResource();
|
||||
|
||||
|
|
|
@ -24,6 +24,19 @@ package the.bytecode.club.bytecodeviewer.gui.resourcesearch;
|
|||
*/
|
||||
public enum SearchRadius
|
||||
{
|
||||
All_Classes,
|
||||
Current_Class
|
||||
ALL_CLASSES("All Classes"),
|
||||
CURRENT_CLASS("Current Class");
|
||||
|
||||
private final String name;
|
||||
|
||||
SearchRadius(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ import the.bytecode.club.bytecodeviewer.searching.impl.*;
|
|||
*/
|
||||
public enum SearchType
|
||||
{
|
||||
Strings(new LDCSearch()),
|
||||
Regex(new RegexSearch()),
|
||||
MethodCall(new MethodCallSearch()),
|
||||
FieldCall(new FieldCallSearch()),
|
||||
MemberWithAnnotation(new MemberWithAnnotationSearch());
|
||||
STRINGS(new LDCSearch()),
|
||||
REGEX(new RegexSearch()),
|
||||
METHOD_CALL(new MethodCallSearch()),
|
||||
FIELD_CALL(new FieldCallSearch()),
|
||||
MEMBER_WITH_ANNOTATION(new MemberWithAnnotationSearch());
|
||||
|
||||
public final SearchPanel panel;
|
||||
|
||||
|
@ -39,4 +39,10 @@ public enum SearchType
|
|||
{
|
||||
this.panel = panel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return panel.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,12 @@ import java.util.Iterator;
|
|||
|
||||
public class FieldCallSearch extends MethodCallSearch
|
||||
{
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Field Call Search";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void search(ResourceContainer container, String resourceWorkingName, ClassNode node, boolean exact)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,12 @@ public class LDCSearch implements SearchPanel
|
|||
LAFTheme.registerThemeUpdate(searchText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "LDC Search";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getPanel()
|
||||
{
|
||||
|
|
|
@ -53,6 +53,12 @@ public class MemberWithAnnotationSearch implements SearchPanel
|
|||
LAFTheme.registerThemeUpdate(annotation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Members With Annotation Search";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getPanel()
|
||||
{
|
||||
|
|
|
@ -59,6 +59,12 @@ public class MethodCallSearch implements SearchPanel
|
|||
LAFTheme.registerThemeUpdate(mOwner, mName, mDesc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Method Call Search";
|
||||
}
|
||||
|
||||
public JPanel getPanel()
|
||||
{
|
||||
if (myPanel == null)
|
||||
|
|
|
@ -58,6 +58,12 @@ public class RegexSearch implements SearchPanel
|
|||
LAFTheme.registerThemeUpdate(searchText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Regex Search";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JPanel getPanel()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user