swingwtx.swing.editorpanes
Class FakeBrowserEditorPane
java.lang.Object
swingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.text.JTextComponent
swingwtx.swing.editorpanes.FakeBrowserEditorPane
- All Implemented Interfaces:
- EditorPane, ImageObserver, MenuContainer
- public class FakeBrowserEditorPane
- extends JTextComponent
- implements EditorPane
An implementation of an editor pane that behaves like a browser,
but is implemented purely with SWT widgets. This is so that
on platforms without a browser, they can still see something.
At the moment, the HTML is just dumped to a text window - hopefully
someone will flesh this out, as I don't really have time at the minute.
| Fields inherited from class swingwtx.swing.text.JTextComponent |
caret, iRetVal, pCols, pEditable, pRows, pText, pWordWrap, retVal, selEnd, selStart, view |
| Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
| Fields inherited from class swingwt.awt.Component |
actionCommand, actionListeners, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListeners, componentName, consumeAvailableHeight, consumeAvailableWidth, focusable, focusListeners, graphicsConfig, inputMethodListeners, isUserSetFont, keyListeners, layoutModifier, LEFT_ALIGNMENT, LOCK, mouseListeners, mouseMotionListeners, mouseWheelListeners, parent, pBackground, pCursor, pDoubleBuffered, peer, pEnabled, pFont, pForeground, pLayoutData, pLocation, pMaxSize, pMinSize, pPrefSize, pSize, pToolTipText, pVisible, RIGHT_ALIGNMENT, swingWTDefaultActionEventAdapter, swingWTEventAdapter, TOP_ALIGNMENT |
| Methods inherited from class swingwtx.swing.text.JTextComponent |
addInputMethodListener, copy, cut, getCaret, paste, replaceSelection, select, selectAll, setCaret, setSelectedTextColor, setSelectionEnd, setSelectionStart |
| Methods inherited from class swingwtx.swing.JComponent |
add, add, add, add, add, addPropertyChangeListener, addPropertyChangeListener, checkInternalFrameChild, dispose, getAccessibleContext, getActionMap, getAutoscrolls, getBorder, getClientProperty, getInputMap, getInsets, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isValidateRoot, paint, paintBackground, paintChildren, paintComponent, paintImmediately, paintImmediately, putClientProperty, remove, remove, removePropertyChangeListener, removePropertyChangeListener, repaint, revalidate, scrollRectToVisible, setActionMap, setAutoscrolls, setBorder, setDoubleBuffered, setInputMap, setMargin, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled |
| Methods inherited from class swingwt.awt.Container |
addComponentToLayout, addContainerListener, debug_showContainmentTree, doAdd, doLayout, getComponent, getComponentCount, getComponentOrientation, getComponents, getComposite, getLayout, getMaximumSize, getMinimumSize, getParent, getPreferredSize, invalidate, minimumSize, preferredSize, processContainerEvent, processEvent, queuedValidate, removeAll, removeComponentFromCache, removeContainerListener, setLayout, setLayoutImpl, validate |
| Methods inherited from class swingwt.awt.Component |
add, addActionListener, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, componentOnlyDispose, computePreferredSize, contains, contains, createImage, createListenerArrayFromVector, createVolatileImage, dispatchEvent, getActionCommand, getAlignmentX, getAlignmentY, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getListeners, getLocation, getLocationOnScreen, getName, getPeer, getPeerSize, getSize, getSize, getToolkit, getToolTipText, getTreeLock, getWidth, getX, getY, grabFocus, hasFocus, hasSetFont, hide, imageUpdate, inside, isEnabled, isFocusable, isMinimumSizeSet, isShowing, isVisible, processActionEvent, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processTraverseEvent, registerActionEvents, registerComponentEvents, registerEvents, registerExtendedModifyEvents, registerFocusEvents, registerKeyEvents, registerModifyEvents, registerMouseEvents, registerPaintEvents, registerTraversalEvents, remove, removeActionListener, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, repaint, repaint, repaint, requestFocus, setActionCommand, setAlignmentX, setAlignmentY, setBackground, setBounds, setBounds, setCachedProperties, setComponentOrientation, setComponentRemoved, setCursor, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setHeight, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setToolTipText, setVisible, setWidth, show, transferFocus, transferFocusBackward, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
doc
protected Document doc
selectionColor
protected Color selectionColor
ppeer
protected org.eclipse.swt.custom.StyledText ppeer
retval
protected java.lang.Object retval
FakeBrowserEditorPane
public FakeBrowserEditorPane()
addHyperlinkListener
public void addHyperlinkListener(HyperlinkListener l)
- Specified by:
addHyperlinkListener in interface EditorPane
calculatePreferredSize
public Dimension calculatePreferredSize()
- Description copied from class:
Component
- Override in subclasses to return the preferred size for
a given (non-realised) component.
Note that you should use setSize() to whatever this routine
returns once called to prevent inconsistency with null
layout managers.
Also note that this is different from the computePreferredSize()
method, which is used for calculating the preferredSize of a
realised component (this one is for unrealised components)
- Specified by:
calculatePreferredSize in interface EditorPane- Overrides:
calculatePreferredSize in class Component
getCaretPosition
public int getCaretPosition()
- Specified by:
getCaretPosition in interface EditorPane- Overrides:
getCaretPosition in class JTextComponent
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType in interface EditorPane
getDocument
public Document getDocument()
- Specified by:
getDocument in interface EditorPane- Overrides:
getDocument in class JTextComponent
getEditorKit
public EditorKit getEditorKit()
- Specified by:
getEditorKit in interface EditorPane
getJComponent
public JComponent getJComponent()
- Specified by:
getJComponent in interface EditorPane
getSelectionColor
public Color getSelectionColor()
- Specified by:
getSelectionColor in interface EditorPane
getSelectionEnd
public int getSelectionEnd()
- Specified by:
getSelectionEnd in interface EditorPane- Overrides:
getSelectionEnd in class JTextComponent
getSelectionStart
public int getSelectionStart()
- Specified by:
getSelectionStart in interface EditorPane- Overrides:
getSelectionStart in class JTextComponent
getSWTPeer
public org.eclipse.swt.widgets.Control getSWTPeer()
- Description copied from class:
Component
- Returns the SWT peer
- Specified by:
getSWTPeer in interface EditorPane- Overrides:
getSWTPeer in class Component
getText
public java.lang.String getText()
- Specified by:
getText in interface EditorPane- Overrides:
getText in class JTextComponent
isEditable
public boolean isEditable()
- Specified by:
isEditable in interface EditorPane- Overrides:
isEditable in class JTextComponent
removeHyperlinkListener
public void removeHyperlinkListener(HyperlinkListener l)
- Specified by:
removeHyperlinkListener in interface EditorPane
setCaretPosition
public void setCaretPosition(int pos)
- Specified by:
setCaretPosition in interface EditorPane- Overrides:
setCaretPosition in class JTextComponent
setContentType
public void setContentType(java.lang.String contentType)
- Specified by:
setContentType in interface EditorPane
setDocument
public void setDocument(Document newdoc)
- Specified by:
setDocument in interface EditorPane- Overrides:
setDocument in class JTextComponent
setEditable
public void setEditable(boolean b)
- Specified by:
setEditable in interface EditorPane- Overrides:
setEditable in class JTextComponent
setEditorKit
public void setEditorKit(EditorKit k)
- Specified by:
setEditorKit in interface EditorPane
setPage
public void setPage(java.net.URL url)
throws java.io.IOException
- Specified by:
setPage in interface EditorPane
- Throws:
java.io.IOException
setPage
public void setPage(java.lang.String url)
throws java.io.IOException
- Specified by:
setPage in interface EditorPane
- Throws:
java.io.IOException
setSelectionColor
public void setSelectionColor(Color color)
- Description copied from class:
JTextComponent
- NOT IMPLEMENTED - Has no meaning in native plaf
- Specified by:
setSelectionColor in interface EditorPane- Overrides:
setSelectionColor in class JTextComponent
setSwingWTParent
public void setSwingWTParent(Container parent)
throws java.lang.Exception
- Description copied from class:
JTextComponent
- Once a parent component receives an "add" call for a child, this being
the child, this should be called to tell us to instantiate the peer
and load in any cached properties.
- Specified by:
setSwingWTParent in interface EditorPane- Overrides:
setSwingWTParent in class JTextComponent
- Throws:
java.lang.Exception
setText
public void setText(java.lang.String text)
- Specified by:
setText in interface EditorPane- Overrides:
setText in class JTextComponent