Package com.zerog.ia.api.pub.controls
Class IATextPane
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- com.zerog.ia.api.pub.controls.IAControl
-
- com.zerog.ia.api.pub.controls.IATextPane
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
public class IATextPane extends IAControl
The IATextPane class exposes the InstallAnywhere internal text pane, supports Multiline content, URL and high DPI.
Example of use:
IATextPane textPane = new IATextPane();
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.zerog.ia.api.pub.controls.IAControl
BIDI_BASED_ON_LOCALE, BIDI_LEFT_TO_RIGHT, BIDI_RIGHT_TO_LEFT
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description IATextPane()
Constructor of the IATextPane class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHyperlinkListener(javax.swing.event.HyperlinkListener listener)
Adds a hyperlink listener for the component.void
addKeyListener(java.awt.event.KeyListener listener)
Adds a KeyListener for the component.java.awt.Color
getBackground()
Gets the background color of this component.java.lang.String
getComponentID()
Gets the component ID of the component.java.awt.Font
getFont()
Gets the font of this component.java.awt.Color
getForeground()
Gets the foreground color of this component.javax.swing.text.StyledDocument
getStyledDocument()
Fetches the model associated with the editor.java.lang.String
getText()
Gets the text of this Component.void
removeHyperlinkListener(javax.swing.event.HyperlinkListener listener)
Removes a hyperlink listener.void
removeKeyListener(java.awt.event.KeyListener listener)
Removes a KeyListener.void
setBackground(java.awt.Color color)
Sets the background color of this component.void
setComponentID(java.lang.String component_id)
Sets the component ID for the component.void
setContentType(java.lang.String type)
Sets the type of content that this component handles, will be non editable when html type is set.void
setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this component should be editable.void
setFont(java.awt.Font font)
Sets the font for this component.void
setFontScaled(java.awt.Font font)
Sets the font for this component which scale in high DPI.void
setForeground(java.awt.Color color)
Sets the foreground color of this component.void
setOpensExternalLinksInBrowser(boolean allow)
Set property to open external links in browser.void
setPage(java.net.URL url)
Sets the current URL being displayed.void
setStyledDocument(javax.swing.text.StyledDocument doc)
Associates the editor with a text document.void
setText(java.lang.String text)
Sets the text of this Component.void
setToolTipText(java.lang.String toolTipText)
Sets tool tip for the component.-
Methods inherited from class com.zerog.ia.api.pub.controls.IAControl
getBidiOrientation, setBidiOrientation, setComponent
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
-
Methods inherited from class java.awt.Container
add, 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, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Method Detail
-
setEditable
public void setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this component should be editable.- Parameters:
editable
- the boolean to be set
-
setContentType
public void setContentType(java.lang.String type)
Sets the type of content that this component handles, will be non editable when html type is set.- Parameters:
type
- the non-null content type
-
setFontScaled
public void setFontScaled(java.awt.Font font)
Sets the font for this component which scale in high DPI.- Parameters:
font
- the desired font
-
setOpensExternalLinksInBrowser
public void setOpensExternalLinksInBrowser(boolean allow)
Set property to open external links in browser.- Parameters:
allow
- if true, will allow opening external links in browser
-
addHyperlinkListener
public void addHyperlinkListener(javax.swing.event.HyperlinkListener listener)
Adds a hyperlink listener for the component.- Parameters:
listener
- the listener
-
removeHyperlinkListener
public void removeHyperlinkListener(javax.swing.event.HyperlinkListener listener)
Removes a hyperlink listener.- Parameters:
listener
- the listener
-
setStyledDocument
public void setStyledDocument(javax.swing.text.StyledDocument doc)
Associates the editor with a text document.- Parameters:
doc
- the document to display
-
getStyledDocument
public javax.swing.text.StyledDocument getStyledDocument()
Fetches the model associated with the editor.- Returns:
- the model
-
setBackground
public void setBackground(java.awt.Color color)
Sets the background color of this component.- Overrides:
setBackground
in classjavax.swing.JComponent
- Parameters:
color
- the desired background color
-
getBackground
public java.awt.Color getBackground()
Gets the background color of this component.- Overrides:
getBackground
in classjava.awt.Component
- Returns:
- the background color
-
setForeground
public void setForeground(java.awt.Color color)
Sets the foreground color of this component.- Overrides:
setForeground
in classjavax.swing.JComponent
- Parameters:
color
- the desired foreground color
-
getForeground
public java.awt.Color getForeground()
Gets the foreground color of this component.- Overrides:
getForeground
in classjava.awt.Component
- Returns:
- the foreground color
-
setFont
public void setFont(java.awt.Font font)
Sets the font for this component.- Overrides:
setFont
in classjavax.swing.JComponent
- Parameters:
font
- the desired Font for this component
-
getFont
public java.awt.Font getFont()
Gets the font of this component.- Specified by:
getFont
in interfacejava.awt.MenuContainer
- Overrides:
getFont
in classjava.awt.Component
- Returns:
- the font
-
setPage
public void setPage(java.net.URL url)
Sets the current URL being displayed.- Parameters:
url
- the URL for display
-
setText
public void setText(java.lang.String text)
Sets the text of this Component.- Parameters:
text
- the new text to be displayed
-
getText
public java.lang.String getText()
Gets the text of this Component.- Returns:
- the text
-
addKeyListener
public void addKeyListener(java.awt.event.KeyListener listener)
Adds a KeyListener for the component.- Overrides:
addKeyListener
in classjava.awt.Component
- Parameters:
listener
- the key listener
-
removeKeyListener
public void removeKeyListener(java.awt.event.KeyListener listener)
Removes a KeyListener.- Overrides:
removeKeyListener
in classjava.awt.Component
- Parameters:
listener
- the key listener
-
getComponentID
public java.lang.String getComponentID()
Gets the component ID of the component.- Returns:
- the ID
-
setComponentID
public void setComponentID(java.lang.String component_id)
Sets the component ID for the component.- Parameters:
component_id
- the ID
-
setToolTipText
public void setToolTipText(java.lang.String toolTipText)
Sets tool tip for the component.- Overrides:
setToolTipText
in classjavax.swing.JComponent
- Parameters:
toolTipText
- the desired tool tip text
-
-