|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jpop.gui.PoplogDocBrowser
A GUI browser for poplog documentation
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static int |
DEFAULT_PORT
The default port the server should listen to |
static java.lang.String |
DEFAULT_SERVER
Name of default server |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PoplogDocBrowser(boolean startServer,
java.lang.String cacheDir)
Constructor for PoplogDocBrowser |
|
PoplogDocBrowser(boolean startServer,
java.lang.String cacheDir,
boolean floating)
Constructor for PoplogDocBrowser |
|
PoplogDocBrowser(java.lang.String serverName,
int port,
java.lang.String cacheDir)
Constructor for PoplogDocBrowser |
|
PoplogDocBrowser(java.lang.String serverName,
int port,
java.lang.String cacheDir,
boolean floating)
Constructor for PoplogDocBrowser |
Method Summary | |
void |
addTab(java.lang.String name,
java.io.BufferedReader document)
Adds a tab to the PoplogDocBrowser object |
void |
addWindowListener(java.awt.event.WindowListener wl)
Adds a window listener to the PoplogDocBrowser object |
void |
close()
close the server if open and perform any other cleanup necessary |
void |
closeButtonClicked(PoplogDocView pdv)
When the close button of a tab is clicked |
void |
commandButtonActionPerformed()
Sends the text in the text area to be parsed by the client unless it starts with '#', in which case it is assumed to be a request for info on the browser itself. |
void |
debug(java.lang.String msg)
Add a debugging message to the log window |
void |
displayException(java.lang.Exception e)
Show a dialog with the text of the exception |
void |
docAreaKeyTyped(PoplogDocView pdv,
java.awt.event.KeyEvent e)
When a key is typed in the text area of a PoplogDocView |
java.lang.String |
getCacheDir()
Gets the cache dir value of the PoplogDocBrowser object |
void |
getHelp()
Gets the help attribute of the PoplogDocBrowser object |
void |
getInfo()
Gets the info attribute of the PoplogDocBrowser object |
void |
getLicense()
Gets the license attribute of the PoplogDocBrowser object |
int |
getPort()
Gets the port value of the PoplogDocBrowser object |
java.lang.String |
getServerName()
Gets the server name value of the PoplogDocBrowser object |
void |
getVersion()
Gets the version attribute of the PoplogDocBrowser object |
void |
goToHistoryDown()
Moves the history one position down |
void |
goToHistoryEnd()
Moves the history to the end |
void |
goToHistoryStart()
Moves the history to the start |
void |
goToHistoryUp()
Moves the history one position up |
static void |
main(java.lang.String[] args)
The main program for the PoplogDocBrowser class |
protected void |
makeSplitPane()
This method makes the central split pane, if overriden then only the tree view will show |
void |
rootsTreeKeyTyped(java.awt.event.KeyEvent e)
Event handler for when a key is typed in the tree view |
void |
rootsTreeMouseDoubleClicked(int x,
int y)
Event handler for when a double click happens in the tree view |
void |
setCommandFieldText(java.lang.String s)
Sets the text in the command field |
void |
setList(java.lang.String name,
java.io.BufferedReader document)
Sets the list in the tree view |
void |
setStatusText(java.lang.String msg)
Sets the text in the bottom label to msg |
void |
setVisible(boolean b)
Sets the visible value of the PoplogDocBrowser object |
void |
treeSelectionMade(javax.swing.tree.DefaultMutableTreeNode node)
Handler for a selection made in the tree view |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_SERVER
Constructor Detail |
public PoplogDocBrowser(java.lang.String serverName, int port, java.lang.String cacheDir)
PoplogDocBrowser
serverName
- Name of the doc serverport
- port server listens tocacheDir
- Name of the directory where cache is to be stored or can be found. If null
no cache will be usedpublic PoplogDocBrowser(java.lang.String serverName, int port, java.lang.String cacheDir, boolean floating)
PoplogDocBrowser
serverName
- Name of the doc serverport
- port server listens tocacheDir
- Name of the directory where cache is to be stored or can be found. If null
no cache will be usedfloating
- true when the thing should be displayed in an internally managed JFramepublic PoplogDocBrowser(boolean startServer, java.lang.String cacheDir)
PoplogDocBrowser
startServer
- if true, the client starts a server locally and uses it to run queries
against. else it assumes the server is already running and accessible in the default
location (localhost:4567)cacheDir
- Name of the directory where cache is to be stored or can be foundIf null
no cache will be usedpublic PoplogDocBrowser(boolean startServer, java.lang.String cacheDir, boolean floating)
PoplogDocBrowser
startServer
- if true, the client starts a server locally and uses it to run queries
against. else it assumes the server is already running and accessible in the default
location (localhost:4567)cacheDir
- Name of the directory where cache is to be stored or can be foundIf null
no cache will be usedfloating
- true when the thing should be displayed in an internally managed JFrameMethod Detail |
public static void main(java.lang.String[] args)
PoplogDocBrowser
class
args
- The command line argumentspublic void setCommandFieldText(java.lang.String s)
s
- The new text for the command fieldpublic void setList(java.lang.String name, java.io.BufferedReader document)
name
- the name of the listdocument
- The document list to be added to the tree viewpublic void setStatusText(java.lang.String msg)
msg
- The new statusText valuepublic void setVisible(boolean b)
b
- The new visible valuepublic java.lang.String getServerName()
public int getPort()
public java.lang.String getCacheDir()
public void getHelp()
PoplogDocBrowser
object
public void getInfo()
PoplogDocBrowser
object
public void getLicense()
PoplogDocBrowser
object
public void getVersion()
PoplogDocBrowser
object
public void debug(java.lang.String msg)
msg
- public void addWindowListener(java.awt.event.WindowListener wl)
wl
- The windowListener to be added to the objectpublic void addTab(java.lang.String name, java.io.BufferedReader document)
PoplogDocBrowser
object
name
- the name of the documentdocument
- The document to be added to the tabs
public void close() throws java.io.IOException
java.io.IOException
- If we can't closepublic void closeButtonClicked(PoplogDocView pdv)
pdv
- The doc view to closepublic void commandButtonActionPerformed()
{HELP|REF|TEACH|DOC} [filename] -> poplog docs LIST [listname] -> doc lists ${HELP|VERSION|INFO|LICENSE} -> doc server help -> don't work?!?!?! *{HELP|VERSION|INFO|LICENSE} -> doc client help #{HELP|VERSION|INFO|LICENSE} -> doc browser help
public void displayException(java.lang.Exception e)
e
- the exception to displaypublic void docAreaKeyTyped(PoplogDocView pdv, java.awt.event.KeyEvent e)
pdv
- The PoplogDocView where the key was typede
- The key eventpublic void goToHistoryDown()
public void goToHistoryEnd()
public void goToHistoryStart()
public void goToHistoryUp()
public void rootsTreeKeyTyped(java.awt.event.KeyEvent e)
e
- The key eventpublic void rootsTreeMouseDoubleClicked(int x, int y)
x
- The x coordinate of the clicky
- The y coordinate of the clickpublic void treeSelectionMade(javax.swing.tree.DefaultMutableTreeNode node)
node
- The node that is now selectedprotected void makeSplitPane()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |