adavid.util
Class Assistant

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--adavid.util.Assistant

public class Assistant
extends java.awt.Frame
implements java.awt.event.ItemListener, java.awt.event.ActionListener

Assistant 3.x : redesigned Assistant from version 2.4

See Also:
Serialized Form

Field Summary
static java.lang.String about
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String absentstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String accessstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String allmatchesstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String anystr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String AUTHOR
          version and final constants
static java.lang.String BUSY
           
static java.lang.String classInput
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String classstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String closemsg
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String confirmQuitMsg
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String CONSTRUCT
           
static java.lang.String constructLabel
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String debugstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String decompilerList
          the list of decompilers, please use Assistant.properties to change it resource name: decompilerList.name
static java.lang.String decompilerstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String disasstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String FIELDS
           
static java.lang.String fieldsLabel
          messages that can be redefined in a properties file and set by Bundle
static java.awt.Image FileA
          the icons to be drawn: initialized by Bundle
static java.awt.Image FileASelected
          the icons to be drawn: initialized by Bundle
static java.awt.Image FileI
          the icons to be drawn: initialized by Bundle
static java.awt.Image FileISelected
          the icons to be drawn: initialized by Bundle
static java.lang.String findmsg
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String forcedstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String help
          default help text, displayed when clicking the about button
static java.lang.String INFO
           
static java.awt.Color infoColor
          this can be customized in a properties file as well
static java.lang.String interfaces
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String invokepackviewer
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String iotitle
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String javastr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String jjstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String longstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String lookstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String matchesstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String METHODS
           
static java.lang.String methodsLabel
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String miscstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String modifstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String namestr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String noMsg
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String notfound
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String NOTHING
           
static java.lang.String oneclassstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String onehtmlstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String openstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String options
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String packstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String packstr2
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String path$icons
          the path of the default icons, so that Bundle finds them this can be overriden in a simple Assistant.properties file
static java.lang.String pleasestr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String presentstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String printstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String quitMsg
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String quitstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String searchFor
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String searchstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String shortstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String sortmstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String sortstr1
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String sortstr2
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String source
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String superClasses
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String typestr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String uncompstr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String updatePack
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String verbosestr
          messages that can be redefined in a properties file and set by Bundle
static java.lang.String VERSION
          version and final constants
static java.lang.Boolean WBLIT
          control WindowBlit feature of Swing 1.1.1
static java.lang.String yesMsg
          messages that can be redefined in a properties file and set by Bundle
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
protected Assistant()
          constructor: protected in case somebody wants to extend it
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          action listener: for the input field
 boolean checkSource()
          checks the current source
 void checkstreams()
          check the streams: stderr and stdout ; open a window if necessary
 void findSource(SortableConstructor construct)
          gets the source of the asked constructor
 void findSource(SortableMethod method)
          gets the source of the asked method
 int getSig()
           
 java.lang.String getSource(java.lang.Class theclass)
           
 void invalidateSource()
          invalidate the source
 void itemStateChanged(java.awt.event.ItemEvent e)
          item listener: show the right card (layout) when a mode is selected
static void main(java.lang.String[] args)
          the main program, pretty simple since all is done in the static initialization
protected  void processWindowEvent(java.awt.event.WindowEvent e)
          process window events: just close the window when asked I do not need all the stuff of a WindowListener just for this.
static void queryClass(java.lang.String name)
          sends a class name to the assistant This is not thread safe, it should not be called by concurrent applications.
 void quitFunction()
          quit function: ask for confirm before
 void selectClass()
          reselect the current class
 void selectClass(java.lang.Class wclass, boolean updateAll)
          select a class
 java.lang.Class[] tryCompletion(java.lang.String name)
          try completion
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, paramString, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
version and final constants

AUTHOR

public static final java.lang.String AUTHOR
version and final constants

NOTHING

public static final java.lang.String NOTHING

INFO

public static final java.lang.String INFO

BUSY

public static final java.lang.String BUSY

CONSTRUCT

public static final java.lang.String CONSTRUCT

FIELDS

public static final java.lang.String FIELDS

METHODS

public static final java.lang.String METHODS

path$icons

public static java.lang.String path$icons
the path of the default icons, so that Bundle finds them this can be overriden in a simple Assistant.properties file

decompilerList

public static java.lang.String decompilerList
the list of decompilers, please use Assistant.properties to change it resource name: decompilerList.name

FileI

public static java.awt.Image FileI
the icons to be drawn: initialized by Bundle

FileISelected

public static java.awt.Image FileISelected
the icons to be drawn: initialized by Bundle

FileA

public static java.awt.Image FileA
the icons to be drawn: initialized by Bundle

FileASelected

public static java.awt.Image FileASelected
the icons to be drawn: initialized by Bundle

WBLIT

public static java.lang.Boolean WBLIT
control WindowBlit feature of Swing 1.1.1

confirmQuitMsg

public static java.lang.String confirmQuitMsg
messages that can be redefined in a properties file and set by Bundle

quitMsg

public static java.lang.String quitMsg
messages that can be redefined in a properties file and set by Bundle

yesMsg

public static java.lang.String yesMsg
messages that can be redefined in a properties file and set by Bundle

noMsg

public static java.lang.String noMsg
messages that can be redefined in a properties file and set by Bundle

classInput

public static java.lang.String classInput
messages that can be redefined in a properties file and set by Bundle

source

public static java.lang.String source
messages that can be redefined in a properties file and set by Bundle

options

public static java.lang.String options
messages that can be redefined in a properties file and set by Bundle

about

public static java.lang.String about
messages that can be redefined in a properties file and set by Bundle

constructLabel

public static java.lang.String constructLabel
messages that can be redefined in a properties file and set by Bundle

fieldsLabel

public static java.lang.String fieldsLabel
messages that can be redefined in a properties file and set by Bundle

methodsLabel

public static java.lang.String methodsLabel
messages that can be redefined in a properties file and set by Bundle

superClasses

public static java.lang.String superClasses
messages that can be redefined in a properties file and set by Bundle

interfaces

public static java.lang.String interfaces
messages that can be redefined in a properties file and set by Bundle

searchFor

public static java.lang.String searchFor
messages that can be redefined in a properties file and set by Bundle

forcedstr

public static java.lang.String forcedstr
messages that can be redefined in a properties file and set by Bundle

notfound

public static java.lang.String notfound
messages that can be redefined in a properties file and set by Bundle

iotitle

public static java.lang.String iotitle
messages that can be redefined in a properties file and set by Bundle

closemsg

public static java.lang.String closemsg
messages that can be redefined in a properties file and set by Bundle

findmsg

public static java.lang.String findmsg
messages that can be redefined in a properties file and set by Bundle

anystr

public static java.lang.String anystr
messages that can be redefined in a properties file and set by Bundle

namestr

public static java.lang.String namestr
messages that can be redefined in a properties file and set by Bundle

typestr

public static java.lang.String typestr
messages that can be redefined in a properties file and set by Bundle

shortstr

public static java.lang.String shortstr
messages that can be redefined in a properties file and set by Bundle

longstr

public static java.lang.String longstr
messages that can be redefined in a properties file and set by Bundle

accessstr

public static java.lang.String accessstr
messages that can be redefined in a properties file and set by Bundle

modifstr

public static java.lang.String modifstr
messages that can be redefined in a properties file and set by Bundle

presentstr

public static java.lang.String presentstr
messages that can be redefined in a properties file and set by Bundle

absentstr

public static java.lang.String absentstr
messages that can be redefined in a properties file and set by Bundle

javastr

public static java.lang.String javastr
messages that can be redefined in a properties file and set by Bundle

jjstr

public static java.lang.String jjstr
messages that can be redefined in a properties file and set by Bundle

uncompstr

public static java.lang.String uncompstr
messages that can be redefined in a properties file and set by Bundle

disasstr

public static java.lang.String disasstr
messages that can be redefined in a properties file and set by Bundle

sortstr1

public static java.lang.String sortstr1
messages that can be redefined in a properties file and set by Bundle

sortmstr

public static java.lang.String sortmstr
messages that can be redefined in a properties file and set by Bundle

sortstr2

public static java.lang.String sortstr2
messages that can be redefined in a properties file and set by Bundle

printstr

public static java.lang.String printstr
messages that can be redefined in a properties file and set by Bundle

updatePack

public static java.lang.String updatePack
messages that can be redefined in a properties file and set by Bundle

allmatchesstr

public static java.lang.String allmatchesstr
messages that can be redefined in a properties file and set by Bundle

matchesstr

public static java.lang.String matchesstr
messages that can be redefined in a properties file and set by Bundle

miscstr

public static java.lang.String miscstr
messages that can be redefined in a properties file and set by Bundle

packstr

public static java.lang.String packstr
messages that can be redefined in a properties file and set by Bundle

quitstr

public static java.lang.String quitstr
messages that can be redefined in a properties file and set by Bundle

packstr2

public static java.lang.String packstr2
messages that can be redefined in a properties file and set by Bundle

classstr

public static java.lang.String classstr
messages that can be redefined in a properties file and set by Bundle

oneclassstr

public static java.lang.String oneclassstr
messages that can be redefined in a properties file and set by Bundle

pleasestr

public static java.lang.String pleasestr
messages that can be redefined in a properties file and set by Bundle

searchstr

public static java.lang.String searchstr
messages that can be redefined in a properties file and set by Bundle

invokepackviewer

public static java.lang.String invokepackviewer
messages that can be redefined in a properties file and set by Bundle

lookstr

public static java.lang.String lookstr
messages that can be redefined in a properties file and set by Bundle

decompilerstr

public static java.lang.String decompilerstr
messages that can be redefined in a properties file and set by Bundle

verbosestr

public static java.lang.String verbosestr
messages that can be redefined in a properties file and set by Bundle

debugstr

public static java.lang.String debugstr
messages that can be redefined in a properties file and set by Bundle

openstr

public static java.lang.String openstr
messages that can be redefined in a properties file and set by Bundle

onehtmlstr

public static java.lang.String onehtmlstr
messages that can be redefined in a properties file and set by Bundle

infoColor

public static java.awt.Color infoColor
this can be customized in a properties file as well

help

public static java.lang.String help
default help text, displayed when clicking the about button
Constructor Detail

Assistant

protected Assistant()
constructor: protected in case somebody wants to extend it
Method Detail

processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent e)
process window events: just close the window when asked I do not need all the stuff of a WindowListener just for this.
Overrides:
processWindowEvent in class java.awt.Window

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
item listener: show the right card (layout) when a mode is selected
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

selectClass

public void selectClass()
reselect the current class

getSig

public int getSig()
Returns:
the source order for JViewer

invalidateSource

public void invalidateSource()
invalidate the source

selectClass

public void selectClass(java.lang.Class wclass,
                        boolean updateAll)
select a class

findSource

public void findSource(SortableMethod method)
gets the source of the asked method

findSource

public void findSource(SortableConstructor construct)
gets the source of the asked constructor

getSource

public java.lang.String getSource(java.lang.Class theclass)
Parameters:
theclass - the class to find the source code
Returns:
the source of the request class if found

checkSource

public boolean checkSource()
checks the current source

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
action listener: for the input field
Specified by:
actionPerformed in interface java.awt.event.ActionListener

quitFunction

public void quitFunction()
quit function: ask for confirm before

queryClass

public static void queryClass(java.lang.String name)
sends a class name to the assistant This is not thread safe, it should not be called by concurrent applications.

tryCompletion

public java.lang.Class[] tryCompletion(java.lang.String name)
try completion

checkstreams

public void checkstreams()
check the streams: stderr and stdout ; open a window if necessary

main

public static void main(java.lang.String[] args)
the main program, pretty simple since all is done in the static initialization