|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame edu.princeton.wordnet.client.browser.MainFrame
public class MainFrame
Browser main frame
Nested Class Summary | |
---|---|
private static class |
MainFrame.Code
Command codes |
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static java.lang.String |
HASWORDNETRENDERING
Listener property name |
private javax.swing.event.HyperlinkListener |
hyperlinkPressed
|
private static org.apache.log4j.Logger |
LOG
|
static boolean |
recurse
Querying option : recurse |
static java.lang.String |
RECURSE
Listener property name |
private static long |
serialVersionUID
Serial |
private java.awt.event.ActionListener |
tabRemoved
|
private java.lang.String[] |
theArgs
Command line arguments |
private javax.swing.JComboBox |
theEditor
Editor |
private java.awt.Component |
theHome
Main component |
private javax.swing.JLabel |
theIconStatus
Status icon container |
private javax.swing.JProgressBar |
theProgress
Status |
private java.util.Properties |
theSettings
Settings |
private javax.swing.JLabel |
theStatus
Status |
private javax.swing.JTabbedPane |
theTabbedPane
Tabbed pane |
static boolean |
withLinks
Querying option : want links |
static java.lang.String |
WITHLINKS
Listener property name |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, 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 |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MainFrame(java.lang.String[] theseArgs)
Constructor |
Method Summary | |
---|---|
private void |
collapse()
Collapse tree |
private boolean |
confirm(java.lang.String[] thisMessage)
Confirm |
private void |
connect()
Connect client |
private void |
execute(MainFrame.Code thisCode,
java.lang.Object thisSource)
Run command |
private void |
expand()
Expand tree |
private void |
exportDocument()
Export document |
private void |
exportDocumentXsl()
Export document |
private static java.io.File |
getFile(java.lang.String thisUrlString)
Get file from Url |
private java.util.Map<java.lang.String,java.lang.String> |
getTransformerParameters()
Get transformer parameters |
private void |
help()
Help with browser |
private void |
importDocument()
Import document |
private void |
importDocument(java.net.URL thisUrl)
Import document |
private void |
initialLookup()
Initial Lookup |
private void |
internalHelp()
Help as tab |
private void |
jndiLookup()
JNDI Lookup |
private void |
lookup()
Lookup |
void |
lookup(java.lang.String thisLookup)
Look up |
private void |
lookupLexDomains()
List LexDomains |
private void |
lookupLinks()
List Links |
private void |
lookupPos()
List POS |
private void |
lookupWeb()
Lookup web |
void |
lookupWeb(java.lang.String thisLookup)
Lookup through HTTP |
private java.awt.Component |
makeBrowserPane(java.net.URL thisUrl)
Make HTML pane |
private javax.swing.JButton |
makeButton(java.lang.String thisText,
java.lang.String thisTooltip,
java.lang.String thisImage,
MainFrame.Code thisCode)
Make button |
private SmartCheckBoxMenuItem |
makeCheckboxItem(java.lang.String thisText,
java.lang.String thisImage,
MainFrame.Code thisCommand,
int thisAcceleratorKey,
boolean thisState,
java.lang.String thisProperty)
Make menu item |
private java.awt.Component |
makeHome()
Make home pane |
private HtmlView |
makeHtmlView()
Make Html view |
private javax.swing.JMenuBar |
makeMenuBar()
Make menu bar |
private javax.swing.JMenuItem |
makeMenuItem(java.lang.String thisText,
java.lang.String thisImage,
MainFrame.Code thisCommand,
int thisAcceleratorKey)
Make menu item |
private SmartButton |
makeSmartButton(java.lang.String thisText,
java.lang.String thisTooltip,
java.lang.String thisImage,
MainFrame.Code thisCode,
java.lang.String thisProperty,
boolean thisState)
Make button |
private java.awt.Component |
makeStatusbar(java.awt.Component thisEastComponent,
java.awt.Component thisCenterComponent,
java.awt.Component thisWestComponent)
Make status bar |
private TextView |
makeTextView()
Make text view |
private javax.swing.JToolBar |
makeToolbar()
Make toolbar |
private java.lang.String |
mangle(java.lang.String thatString)
Mangle string |
private void |
optionRecurse(java.lang.Object thisSource)
Toggle Recurse |
private void |
optionWithLinks(java.lang.Object thisSource)
Toggle With links hook |
private void |
optionWordNetRenderer(java.lang.Object thisSource)
Toggle WordNet rendering in Dom tree view |
protected void |
processWindowEvent(java.awt.event.WindowEvent thisEvent)
|
private java.util.List<java.lang.String> |
readArgs()
Parse lookups from command line |
private void |
refresh()
Refresh |
private void |
report(java.lang.Throwable e)
Report |
private void |
tab(java.awt.Component thisComponent,
java.lang.String thisTitle,
java.lang.String thisToolTip)
Add tabbed component |
private void |
toXml()
Export document to XML view |
private void |
transformToFile(org.w3c.dom.Document thisDocument,
java.lang.String thisExportUrl,
java.lang.String thisXsltUrlString,
java.lang.String thisOutputFileUrl)
Transform to file |
private void |
transformToHtmlView(org.w3c.dom.Document thisDocument,
java.lang.String thisXsltUrlString,
java.lang.String thisWord)
Transform to view |
private void |
transformToView(org.w3c.dom.Document thisDocument,
java.lang.String thisExportUrl,
java.lang.String thisXsltUrlString,
java.lang.String thisWord)
Transform to view |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private static final long serialVersionUID
private static final org.apache.log4j.Logger LOG
private final java.lang.String[] theArgs
private java.util.Properties theSettings
private javax.swing.JTabbedPane theTabbedPane
private javax.swing.JComboBox theEditor
private final javax.swing.JLabel theIconStatus
private final javax.swing.JLabel theStatus
private final javax.swing.JProgressBar theProgress
private final java.awt.Component theHome
public static boolean withLinks
public static boolean recurse
public static final java.lang.String HASWORDNETRENDERING
public static final java.lang.String RECURSE
public static final java.lang.String WITHLINKS
private final java.awt.event.ActionListener tabRemoved
private final javax.swing.event.HyperlinkListener hyperlinkPressed
Constructor Detail |
---|
public MainFrame(java.lang.String[] theseArgs) throws java.io.IOException
theseArgs
- command line arguments
java.io.IOException
Method Detail |
---|
private java.awt.Component makeHome()
private javax.swing.JToolBar makeToolbar()
private javax.swing.JButton makeButton(java.lang.String thisText, java.lang.String thisTooltip, java.lang.String thisImage, MainFrame.Code thisCode)
thisText
- textthisTooltip
- tooltipthisImage
- imagethisCode
- exceution code
private SmartButton makeSmartButton(java.lang.String thisText, java.lang.String thisTooltip, java.lang.String thisImage, MainFrame.Code thisCode, java.lang.String thisProperty, boolean thisState)
thisText
- textthisTooltip
- tooltipthisImage
- image
private java.awt.Component makeStatusbar(java.awt.Component thisEastComponent, java.awt.Component thisCenterComponent, java.awt.Component thisWestComponent)
thisEastComponent
- east componentthisCenterComponent
- center componentthisWestComponent
- west component
private javax.swing.JMenuBar makeMenuBar()
private javax.swing.JMenuItem makeMenuItem(java.lang.String thisText, java.lang.String thisImage, MainFrame.Code thisCommand, int thisAcceleratorKey)
thisText
- textthisImage
- imagethisCommand
- command codethisAcceleratorKey
- accelerator key
private SmartCheckBoxMenuItem makeCheckboxItem(java.lang.String thisText, java.lang.String thisImage, MainFrame.Code thisCommand, int thisAcceleratorKey, boolean thisState, java.lang.String thisProperty)
thisText
- textthisImage
- imagethisCommand
- command codethisAcceleratorKey
- accelerator key
private java.awt.Component makeBrowserPane(java.net.URL thisUrl)
private void tab(java.awt.Component thisComponent, java.lang.String thisTitle, java.lang.String thisToolTip)
thisComponent
- thisTitle
- thisToolTip
- private TextView makeTextView()
private HtmlView makeHtmlView()
private void connect()
private void execute(MainFrame.Code thisCode, java.lang.Object thisSource)
thisCode
- command codeprivate void initialLookup()
private void lookup()
private void lookupWeb()
private void importDocument()
java.net.MalformedURLException
public void lookup(java.lang.String thisLookup)
Controller
lookup
in interface Controller
thisLookup
- word to look uppublic void lookupWeb(java.lang.String thisLookup)
thisLookup
- lookup targetprivate void lookupPos()
private void lookupLexDomains()
private void lookupLinks()
private void jndiLookup()
private void importDocument(java.net.URL thisUrl) throws java.lang.Exception
thisUrl
- document url
java.lang.Exception
private void toXml()
private void exportDocument()
private void exportDocumentXsl()
private void transformToView(org.w3c.dom.Document thisDocument, java.lang.String thisExportUrl, java.lang.String thisXsltUrlString, java.lang.String thisWord)
private void transformToHtmlView(org.w3c.dom.Document thisDocument, java.lang.String thisXsltUrlString, java.lang.String thisWord)
private void transformToFile(org.w3c.dom.Document thisDocument, java.lang.String thisExportUrl, java.lang.String thisXsltUrlString, java.lang.String thisOutputFileUrl)
private void refresh()
private void expand()
private void collapse()
private boolean confirm(java.lang.String[] thisMessage)
thisMessage
- message
private void report(java.lang.Throwable e)
e
- Throwableprivate static java.io.File getFile(java.lang.String thisUrlString)
thisUrlString
- url string
private java.util.Map<java.lang.String,java.lang.String> getTransformerParameters()
private java.lang.String mangle(java.lang.String thatString)
thatString
- string to mangle
private void optionWordNetRenderer(java.lang.Object thisSource)
private void optionWithLinks(java.lang.Object thisSource)
private void optionRecurse(java.lang.Object thisSource)
private void help()
private void internalHelp()
private java.util.List<java.lang.String> readArgs()
protected void processWindowEvent(java.awt.event.WindowEvent thisEvent)
processWindowEvent
in class javax.swing.JFrame
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |