public class DefaultSwingScriptLoggerArea extends javax.swing.JPanel implements SwingScriptLogger
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected StylableSizableArea |
area
The area.
|
protected javax.swing.JProgressBar |
progressBar
The progress bar. it is null by default.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCLEAR_KEY, OK_KEY, PRINT_KEY, SEARCH_KEY| Constructor and Description |
|---|
DefaultSwingScriptLoggerArea()
Constructor.
|
DefaultSwingScriptLoggerArea(boolean hasProgressBar,
boolean hasTools)
Constructor.
|
DefaultSwingScriptLoggerArea(boolean hasProgressBar,
boolean hasTools,
int rows,
int cols)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptNullObjectLinks(boolean accept)
Specifies if the logger must accept objects which generate null links from
LinkIndexConverter.getLinkFromObject(java.lang.Object). |
void |
append(java.lang.String text)
Append a line of text in the message area, with a default color.
|
void |
append(java.lang.String txt,
java.lang.String htmlColor)
Append a line of text in the message area, with a specific color.
|
void |
appendError(java.lang.String txt)
Append a line of text in the message area, colored in red (for errors).
|
void |
appendLink(java.lang.String txt,
java.lang.String linkID)
Append a hyperlinked line of text in the message area, with a default color.
|
void |
appendLink(java.lang.String txt,
java.lang.String linkID,
java.lang.String htmlColor)
Append a hyperlinked line of text in the message area, with a specific color.
|
void |
appendLinks(java.lang.String txt,
java.util.List<java.lang.String> linkIDs,
java.lang.String htmlColor)
Append a hyperlinked line of text in the message area, with a specified color.
|
void |
appendObjectLink(HyperlinkElement element)
Append a hyperlinked line of text in the message area, with a default color.
|
void |
appendObjectLink(HyperlinkElement element,
java.lang.String htmlColor)
Append a hyperlinked line of text in the message area, with a specific color.
|
void |
appendObjectLinks(java.lang.String txt,
java.util.List<HyperlinkElement> links,
java.lang.String htmlColor)
Append a hyperlinked line of text in the message area, with a specified color.
|
void |
appendObjectLinks(java.lang.String txt,
java.lang.String htmlColor,
HyperlinkElement... links)
Append a hyperlinked line of text in the message area, with a specified color.
|
void |
clear()
Clear the content of the logger
|
void |
clearTab()
Clear the current value of the tab for the text.
|
protected void |
doPrint()
Print the content of the panel as html.
|
protected void |
doPrintImpl(java.io.File file)
Perform the html printing.
|
ScriptLoggerHyperLinkListener |
getHyperLinkListener()
Return the listener which will be fired when an hyperlink is visited.
|
java.util.List<java.lang.String> |
getLines()
Return the list of currently logger lines.
|
LinkIndexConverter |
getLinkIndexConverter()
Return class which will convert Objects to and from link indexes.
|
protected java.io.File |
getPrintDirectory()
Return the default directory to use for printing the area content.
|
java.lang.String |
getTab()
Return the tab that can be usage for a text content.
|
protected java.lang.String |
getTabImpl()
Return the tab.
|
protected void |
initializeHTMLContent(int rows,
int cols)
Initialize the HTML content.
|
protected void |
initializeTextArea()
Initialize the text area.
|
void |
registerHyperLinkListener(ScriptLoggerHyperLinkListener hyperlinkListener)
Set the listener which will be fired when an hyperlink is visited.
|
void |
registerLinkIndexConverter(LinkIndexConverter converter)
Register the class which will convert Objects to and from link indexes.
|
void |
setProgress(float value)
Set the value of the progress bar.
|
void |
setTab(int tabs)
Set the current value for of the tab for the text.
|
protected void |
visitHyperLink(java.lang.String linkDesc)
Visit an hyperlink.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoGetLabel, getLabelappendArrayLinks, appendColorArrayLinks, appendError, appendLinks, appendObjectLinks, appendObjectLinks, appendStackTrace, finishedScript, newLine, setLoggerTitle, setStatusMessageprotected javax.swing.JProgressBar progressBar
protected StylableSizableArea area
public DefaultSwingScriptLoggerArea()
public DefaultSwingScriptLoggerArea(boolean hasProgressBar,
boolean hasTools)
hasProgressBar - true if there must be a progress barhasTools - true if tools must be integrated in the areapublic DefaultSwingScriptLoggerArea(boolean hasProgressBar,
boolean hasTools,
int rows,
int cols)
hasProgressBar - true if there must be a progress barhasTools - true if tools must be integrated in the arearows - the number of rows of the logger areacols - the number of columns of the logger areapublic void acceptNullObjectLinks(boolean accept)
LinkIndexConverter.getLinkFromObject(java.lang.Object).acceptNullObjectLinks in interface ScriptLoggeraccept - true if the logger must accept objects which generate null linkspublic java.util.List<java.lang.String> getLines()
protected void initializeHTMLContent(int rows,
int cols)
rows - the number of rows of the logger areacols - the number of columns of the logger areapublic void clear()
clear in interface ScriptLoggerpublic void registerLinkIndexConverter(LinkIndexConverter converter)
registerLinkIndexConverter in interface ScriptLoggerconverter - the link index converterpublic LinkIndexConverter getLinkIndexConverter()
public void registerHyperLinkListener(ScriptLoggerHyperLinkListener hyperlinkListener)
registerHyperLinkListener in interface ScriptLoggerhyperlinkListener - the listenerpublic ScriptLoggerHyperLinkListener getHyperLinkListener()
protected void initializeTextArea()
protected void visitHyperLink(java.lang.String linkDesc)
linkDesc - the hyperlink descriptionpublic void append(java.lang.String text)
append in interface ScriptLoggertext - the textpublic void append(java.lang.String txt,
java.lang.String htmlColor)
append in interface ScriptLoggertxt - the texthtmlColor - the HTML color to use for the textpublic void appendLink(java.lang.String txt,
java.lang.String linkID)
appendLink in interface ScriptLoggertxt - the textlinkID - the hyperlink IDpublic void appendLink(java.lang.String txt,
java.lang.String linkID,
java.lang.String htmlColor)
appendLink in interface ScriptLoggertxt - the textlinkID - the hyperlink IDhtmlColor - the HTML color to use for the textpublic void appendLinks(java.lang.String txt,
java.util.List<java.lang.String> linkIDs,
java.lang.String htmlColor)
appendLinks in interface ScriptLoggertxt - the textlinkIDs - the hyperlinks IDshtmlColor - the colorpublic void appendObjectLink(HyperlinkElement element)
appendObjectLink in interface ScriptLoggerelement - the hyperlink elementpublic void appendObjectLink(HyperlinkElement element, java.lang.String htmlColor)
appendObjectLink in interface ScriptLoggerelement - the hyperlink elementhtmlColor - the HTML color to use for the textpublic void appendObjectLinks(java.lang.String txt,
java.lang.String htmlColor,
HyperlinkElement... links)
appendObjectLinks in interface ScriptLoggertxt - the textlinks - the hyperlinks ObjectshtmlColor - the colorpublic void appendObjectLinks(java.lang.String txt,
java.util.List<HyperlinkElement> links,
java.lang.String htmlColor)
appendObjectLinks in interface ScriptLoggertxt - the textlinks - the hyperlinks ObjectshtmlColor - the colorpublic void appendError(java.lang.String txt)
appendError in interface ScriptLoggertxt - the textpublic void clearTab()
clearTab in interface ScriptLoggerprotected java.lang.String getTabImpl()
public java.lang.String getTab()
getTab in interface ScriptLoggerpublic void setTab(int tabs)
tabssetTab in interface ScriptLoggertabs - the current value for of the tab for the textpublic void setProgress(float value)
setProgress in interface ScriptLoggervalue - the valueprotected java.io.File getPrintDirectory()
protected void doPrint()
protected void doPrintImpl(java.io.File file)
throws java.io.IOException
file - the file where to put the html contentjava.io.IOException - if an IOException is thrownCopyright © 2019-2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence