|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | 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 | +--org.newsml.toolkit.explorer.ExplorerFrame
Application for viewing a NewsML package interactively.
This class sets up a frame containing a menu bar with commands
linked to an ExplorerPanel
. It is a nearly complete
application, but requires that a DOMFactory
be provided, usually in the
application's static main method, so that it can create
DOM trees (and thus, NewsML packages) from URL strings.
ExplorerPanel
, Serialized FormFields inherited from class javax.swing.JFrame |
EXIT_ON_CLOSE |
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 |
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 | |
ExplorerFrame(NewsMLFactory factory)
Create a new, empty frame with the default title. |
|
ExplorerFrame(NewsML newsml,
NewsMLFactory factory)
Create a new frame exploring the NewsML package provided. |
|
ExplorerFrame(java.lang.String title,
NewsMLFactory factory)
Create a new, empty frame with the specified title. |
|
ExplorerFrame(java.lang.String title,
NewsML newsml,
NewsMLFactory factory)
Create a new frame with an explicit title and NewsML package. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handle an action for the file menu. |
ExplorerPanel |
getExplorerPanel()
Get the current explorer panel for this application. |
NewsMLFactory |
getNewsMLFactory()
Get the current NewsMLFactory. |
java.awt.Dimension |
getPreferredSize()
Get the preferred size for this window. |
void |
readNewsML(java.io.File file)
Load a NewsML package. |
void |
readNewsML(java.lang.String url)
Load a NewsML package. |
void |
setExplorerPanel(ExplorerPanel explorerPanel)
Change the explorer panel. |
void |
setNewsMLFactory(NewsMLFactory factory)
Set a new NewsMLFactory. |
void |
setPreferredSize(java.awt.Dimension preferredSize)
Set the preferred size for this window. |
Methods inherited from class javax.swing.JFrame |
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update |
Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle |
Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, removeWindowListener, setCursor, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setFont, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Constructor Detail |
public ExplorerFrame(NewsMLFactory factory)
DOMFactory
- A factory for create a DOM tree from a URL.public ExplorerFrame(java.lang.String title, NewsMLFactory factory)
title
- The title for the frame.DOMFactory
- A factory for create a DOM tree from a URL.public ExplorerFrame(NewsML newsml, NewsMLFactory factory)
newsml
- The NewsML package to explore.DOMFactory
- A factory for create a DOM tree from a URL.public ExplorerFrame(java.lang.String title, NewsML newsml, NewsMLFactory factory)
title
- The title for the frame.newsml
- The NewsML package to explore.DOMFactory
- A factory for create a DOM tree from a URL.Method Detail |
public NewsMLFactory getNewsMLFactory()
public void setNewsMLFactory(NewsMLFactory factory)
domFactory
- The new NewsML factory.public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Container
public void setPreferredSize(java.awt.Dimension preferredSize)
preferredSize
- The new preferred size for the window.public ExplorerPanel getExplorerPanel()
public void setExplorerPanel(ExplorerPanel explorerPanel)
explorerPanel
- The new explorer panel.public void readNewsML(java.io.File file)
file
- The new file to load.public void readNewsML(java.lang.String url)
url
- The new URL to load.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
command
- The action command for the menu item.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |