|
||||||||||
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 javax.swing.JComponent javax.swing.JPanel com.isti.util.gui.ViewHTMLPanel
Class ViewHTMLPanel implements a simple HTML viewer panel (capable of viewing HTML files that reside in a 'jar' archive).
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 | |
protected java.net.URL |
currentUrlObj
|
protected boolean |
dialogClosedFlag
|
protected javax.swing.JEditorPane |
editorPaneObj
|
protected java.util.Vector |
historyVec
|
protected IstiDialogPopup |
hostDialogObj
|
protected LaunchBrowser |
launchBrowserObj
|
protected javax.swing.JTextField |
locationTextFieldObj
|
protected java.net.URL |
originalUrlObj
|
static CallBackStringFlag |
REMLINK_NOACTION_CALLBACK
Constructor parameter for disabling launch-brower on remote link. |
protected CallBackStringFlag |
remoteLinkCallBackObj
|
protected javax.swing.JScrollPane |
scrollPaneObj
|
protected java.lang.Object |
userInputValueObj
|
protected int |
xSize
|
protected int |
ySize
|
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.Container |
|
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 | |
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
boolean locationBarFlag)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
CallBackStringFlag remoteLinkCallBackObj)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
CallBackStringFlag remoteLinkCallBackObj,
boolean locationBarFlag)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
java.lang.String initialRefStr)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
java.lang.String initialRefStr,
boolean locationBarFlag)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
java.lang.String initialRefStr,
CallBackStringFlag remoteLinkCallBackObj)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
boolean backButtonFlag,
boolean launchButtonFlag,
java.lang.String initialRefStr,
CallBackStringFlag remoteLinkCallBackObj,
boolean locationBarFlag)
Creates a simple HTML viewer panel. |
|
ViewHTMLPanel(java.net.URL urlObj,
int xSize,
int ySize,
LaunchBrowser launchBrowserObj,
java.lang.String initialRefStr)
Creates a simple HTML viewer panel. |
Method Summary | |
void |
clearHistory()
Clears the history buffer used by the "Back" button. |
void |
closeDialog()
Closes the dialog object hosting this panel. |
protected boolean |
doLaunchBrowser(java.net.URL targetUrlObj)
Launches a web browser pointing to the given page. |
boolean |
doSetPage(java.net.URL urlObj)
Sets the URL of the currently viewed page. |
boolean |
doSetPage(java.net.URL urlObj,
boolean historyFlag)
Sets the URL of the currently viewed page. |
boolean |
getDialogClosedFlag()
Returns the dialog-closed flag. |
javax.swing.JDialog |
getHostDialog()
Returns the 'JDialog' object that is hosting this panel. |
java.lang.Object |
getInputValue()
Returns the value the user has input in response to the 'showInDialog()' display. |
boolean |
isVisible()
Overridden version that only returns 'true' if the dialog object hosting this panel is visible. |
void |
requestFocus()
Overridden version that also requests focus onto the dialog object the hosts the panel (if currently visible). |
void |
resetViewer()
Clears the history buffer used by the "Back" button and resets the page back to the original URL. |
void |
setDialogVisible(boolean flgVal)
Sets the visibility of this panel and the dialog object hosting this panel. |
boolean |
setPage(java.net.URL urlObj)
Sets the URL of the currently viewed page. |
boolean |
setPage(java.net.URL urlObj,
boolean historyFlag)
Sets the URL of the currently viewed page. |
boolean |
setPageRef(java.lang.String refStr)
Sets the viewed page to a reference (or anchor) on the current page. |
void |
showInDialog(java.awt.Component parentComponent,
java.lang.String titleStr)
Shows this 'ViewHTMLPanel' in a modal dialog window with a close button. |
void |
showInDialog(java.awt.Component parentComponent,
java.lang.String titleStr,
boolean modalFlag)
Shows this 'ViewHTMLPanel' in a dialog window with a close button. |
java.lang.Object |
showInDialog(java.awt.Component parentComponent,
java.lang.String titleStr,
boolean modalFlag,
java.lang.Object button1Obj)
Shows this 'ViewHTMLPanel' in a dialog window with the given button object (if not given then a "Close" button will be used). |
java.lang.Object |
showInDialog(java.awt.Component parentComponent,
java.lang.String titleStr,
boolean modalFlag,
java.lang.Object button1Obj,
java.lang.Object button2Obj)
Shows this 'ViewHTMLPanel' in a dialog window with the given button objects (if none are given then a "Close" button will be used). |
boolean |
showMessageText(java.lang.String msgStr)
Displays the given text message in the viewer panel. |
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, 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, setVisible, 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, 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 |
protected final javax.swing.JEditorPane editorPaneObj
protected final javax.swing.JScrollPane scrollPaneObj
protected final java.util.Vector historyVec
protected final int xSize
protected final int ySize
protected final CallBackStringFlag remoteLinkCallBackObj
protected final javax.swing.JTextField locationTextFieldObj
protected final java.net.URL originalUrlObj
protected java.net.URL currentUrlObj
protected LaunchBrowser launchBrowserObj
protected IstiDialogPopup hostDialogObj
protected java.lang.Object userInputValueObj
protected boolean dialogClosedFlag
public static final CallBackStringFlag REMLINK_NOACTION_CALLBACK
Constructor Detail |
public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, java.lang.String initialRefStr, CallBackStringFlag remoteLinkCallBackObj, boolean locationBarFlag)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.initialRefStr
- the initial reference (anchor) to display on
the given URL, or null for none.remoteLinkCallBackObj
- a 'CallBackStringFlag' object whose
method will be called when a remote or non-HTML link is clicked on,
'REMLINK_NOACTION_CALLBACK' for no action, or null to launch a
browser to show the link (default).locationBarFlag
- true to show location bar; false to not
(default).public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, java.lang.String initialRefStr, CallBackStringFlag remoteLinkCallBackObj)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.initialRefStr
- the initial reference (anchor) to display on
the given URL, or null for none.remoteLinkCallBackObj
- a 'CallBackStringFlag' object whose
method will be called when a remote or non-HTML link is clicked on,
'REMLINK_NOACTION_CALLBACK' for no action, or null to launch a
browser to show the link (default).public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, java.lang.String initialRefStr)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.initialRefStr
- the initial reference (anchor) to display on
the given URL, or null for none.public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, java.lang.String initialRefStr, boolean locationBarFlag)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.initialRefStr
- the initial reference (anchor) to display on
the given URL, or null for none.locationBarFlag
- true to show location bar; false to not
(default).public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, boolean locationBarFlag)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.locationBarFlag
- true to show location bar; false to not
(default).public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, CallBackStringFlag remoteLinkCallBackObj, boolean locationBarFlag)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.remoteLinkCallBackObj
- a 'CallBackStringFlag' object whose
method will be called when a remote or non-HTML link is clicked on,
'REMLINK_NOACTION_CALLBACK' for no action, or null to launch a
browser to show the link (default).locationBarFlag
- true to show location bar; false to not
(default).public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, boolean backButtonFlag, boolean launchButtonFlag, CallBackStringFlag remoteLinkCallBackObj)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.backButtonFlag
- true to show "Back" button.launchButtonFlag
- true to show "Launch Browser" button.remoteLinkCallBackObj
- a 'CallBackStringFlag' object whose
method will be called when a remote or non-HTML link is clicked on,
'REMLINK_NOACTION_CALLBACK' for no action, or null to launch a
browser to show the link (default).public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj, java.lang.String initialRefStr)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.initialRefStr
- the initial reference (anchor) to display on
the given URL, or null for none.public ViewHTMLPanel(java.net.URL urlObj, int xSize, int ySize, LaunchBrowser launchBrowserObj)
urlObj
- the initial URL to display, or null for none.xSize
- the X size for the panel.ySize
- the Y size for the panel.launchBrowserObj
- an existing 'LaunchBrowser' object, or
null to have this class create its own.Method Detail |
public java.lang.Object showInDialog(java.awt.Component parentComponent, java.lang.String titleStr, boolean modalFlag, java.lang.Object button1Obj, java.lang.Object button2Obj)
parentComponent
- the parent component for the dialog.titleStr
- the title string for the dialog.modalFlag
- true for a modal dialog, false for a modeless dialog
(that allows other windows to be active at the same time).button1Obj
- first button object to use (can be a button
component or a string), or null for none.button2Obj
- second button object to use (can be a button
component or a string), or null for none.
public java.lang.Object showInDialog(java.awt.Component parentComponent, java.lang.String titleStr, boolean modalFlag, java.lang.Object button1Obj)
parentComponent
- the parent component for the dialog.titleStr
- the title string for the dialog.modalFlag
- true for a modal dialog, false for a modeless dialog
(that allows other windows to be active at the same time).button1Obj
- first button object to use (can be a button
component or a string), or null for none.
public void showInDialog(java.awt.Component parentComponent, java.lang.String titleStr, boolean modalFlag)
parentComponent
- the parent component for the dialog.titleStr
- the title string for the dialog.modalFlag
- true for a modal dialog, false for a modeless dialog
(that allows other windows to be active at the same time).public void showInDialog(java.awt.Component parentComponent, java.lang.String titleStr)
parentComponent
- the parent component for the dialog.titleStr
- the title string for the dialog.public void closeDialog()
public final boolean setPage(java.net.URL urlObj, boolean historyFlag)
urlObj
- URL of page to display.historyFlag
- true to save new URL to history Vector.
public boolean setPage(java.net.URL urlObj)
urlObj
- URL of page to display.
public final boolean doSetPage(java.net.URL urlObj, boolean historyFlag)
urlObj
- URL of page to display.historyFlag
- true to save new URL to history Vector.
public final boolean doSetPage(java.net.URL urlObj)
urlObj
- URL of page to display.
public boolean setPageRef(java.lang.String refStr)
refStr
- the reference (or anchor) to be viewed.
public boolean showMessageText(java.lang.String msgStr)
msgStr
- message text to display.
public void clearHistory()
public void resetViewer()
protected boolean doLaunchBrowser(java.net.URL targetUrlObj)
targetUrlObj
- the URL object for the page.
public void requestFocus()
public void setDialogVisible(boolean flgVal)
flgVal
- true for visible.public boolean isVisible()
public javax.swing.JDialog getHostDialog()
public java.lang.Object getInputValue()
public boolean getDialogClosedFlag()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |