Class BytecodeDecompilerView


  • public class BytecodeDecompilerView
    extends java.lang.Object
    Class that creates GUI for attached VM.
    • Field Detail

      • bytecodeDecompilerPanel

        private javax.swing.JPanel bytecodeDecompilerPanel
      • splitPane

        private javax.swing.JSplitPane splitPane
      • classes

        private javax.swing.JPanel classes
      • classesToolBar

        private javax.swing.JPanel classesToolBar
      • reloadClassesButton

        private javax.swing.JButton reloadClassesButton
      • showInfoCheckBox

        private javax.swing.JCheckBox showInfoCheckBox
      • classesSortField

        private javax.swing.JTextField classesSortField
      • classesSortFieldColor

        private final java.awt.Color classesSortFieldColor
      • classesPanel

        private javax.swing.JPanel classesPanel
      • classesScrollPane

        private javax.swing.JScrollPane classesScrollPane
      • filteredClassesJList

        private javax.swing.JList<ClassInfo> filteredClassesJList
      • buffersPanel

        private javax.swing.JPanel buffersPanel
      • buffersToolBar

        private javax.swing.JPanel buffersToolBar
      • undoButton

        private javax.swing.JButton undoButton
      • redoButton

        private javax.swing.JButton redoButton
      • insertButton

        private javax.swing.JButton insertButton
      • detachButton

        private javax.swing.JButton detachButton
      • initClassButton

        private javax.swing.JButton initClassButton
      • overwriteButton

        private javax.swing.JButton overwriteButton
      • compileButton

        private javax.swing.JButton compileButton
      • compileAndUploadButton

        private javax.swing.JButton compileAndUploadButton
      • buffers

        private final javax.swing.JTabbedPane buffers
      • sourceBuffer

        private javax.swing.JPanel sourceBuffer
      • bytecodeScrollPane

        private org.fife.ui.rtextarea.RTextScrollPane bytecodeScrollPane
      • bytecodeSyntaxTextArea

        private org.fife.ui.rsyntaxtextarea.RSyntaxTextArea bytecodeSyntaxTextArea
      • binaryBuffer

        private javax.swing.JPanel binaryBuffer
      • bytesActionListener

        private java.awt.event.ActionListener bytesActionListener
      • classesActionListener

        private java.awt.event.ActionListener classesActionListener
      • initActionListener

        private java.awt.event.ActionListener initActionListener
      • loadedClasses

        private ClassInfo[] loadedClasses
      • lastDecompiledClass

        private java.lang.String lastDecompiledClass
      • lastFqn

        private java.lang.String lastFqn
      • searchContext

        private org.fife.ui.rtextarea.SearchContext searchContext
      • splitPaneFirstResize

        private boolean splitPaneFirstResize
      • shouldAttach

        private boolean shouldAttach
      • mainFrame

        private final javax.swing.JFrame mainFrame
      • detachedBytecodeFrame

        private javax.swing.JFrame detachedBytecodeFrame
      • CLASS_LIST_REGISTERED_KEY_CODES

        private static final java.util.Set<java.lang.Integer> CLASS_LIST_REGISTERED_KEY_CODES
      • PANEL_INSETS

        private static final java.awt.Insets PANEL_INSETS
      • DETACH_BUTTON_TEXT

        private static final java.lang.String DETACH_BUTTON_TEXT
        See Also:
        Constant Field Values
      • ATTACH_BUTTON_TEXT

        private static final java.lang.String ATTACH_BUTTON_TEXT
        See Also:
        Constant Field Values
    • Constructor Detail

      • BytecodeDecompilerView

        public BytecodeDecompilerView​(javax.swing.JFrame mainFrameReference)
    • Method Detail

      • getBytecodeDecompilerPanel

        public javax.swing.JPanel getBytecodeDecompilerPanel()
        Constructor creates the graphics and adds the action listeners.
        Returns:
        BytecodeDecompilerPanel
      • handleClassInfoSwitching

        private void handleClassInfoSwitching()
      • isSourceBufferVisible

        private boolean isSourceBufferVisible()
      • handleBuffersDetaching

        private void handleBuffersDetaching()
      • styleTooltip

        public static java.lang.String styleTooltip()
      • updateClassList

        private void updateClassList()
      • reloadClassList

        public void reloadClassList​(ClassInfo[] classesToReload)
        Sets the unfiltered class list array and invokes an update.
        Parameters:
        classesToReload - String[] classesToReload.
      • reloadTextField

        public void reloadTextField​(java.lang.String name,
                                    java.lang.String decompiledClass,
                                    byte[] source)
        Sets the decompiled code into JTextArea
        Parameters:
        decompiledClass - String of source code of decompiler class
      • setDecompiledClass

        private void setDecompiledClass​(java.lang.String name,
                                        java.lang.String data,
                                        byte[] source)
      • setClassesActionListener

        public void setClassesActionListener​(java.awt.event.ActionListener listener)
      • setInitActionListener

        public void setInitActionListener​(java.awt.event.ActionListener listener)
      • setBytesActionListener

        public void setBytesActionListener​(java.awt.event.ActionListener listener)
      • refreshComboBox

        public void refreshComboBox​(java.util.List<DecompilerWrapper> wrappers)
      • initialSearchBytecode

        private void initialSearchBytecode​(java.lang.String query,
                                           boolean isRegex,
                                           boolean matchesCase)
      • searchBytecode

        private void searchBytecode​(boolean forward)
      • deselectBytecodeSyntaxArea

        private void deselectBytecodeSyntaxArea()
      • showApiMenu

        private void showApiMenu​(java.awt.Point forcedLocation)
      • buttonSizeBasedOnTextField

        public static java.awt.Dimension buttonSizeBasedOnTextField​(javax.swing.JButton originalButton,
                                                                    javax.swing.JTextField referenceTextField)
      • classWorker

        private void classWorker()
      • bytesWorker

        private void bytesWorker​(java.lang.String name)
      • doShowClassInfo

        public boolean doShowClassInfo()