|
Kafenio.editor 0.8.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
de.xeinfach.kafenio.KafenioPanel
Description: Main application class that creates a Java wysiwyg editor component
| 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 boolean |
documentConfirmed
|
| 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.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 | |
KafenioPanel(KafenioPanelConfigurationInterface iConfiguration)
Contructs a new KafenioPanel using the given configuration object. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
ActionListener method |
void |
changedUpdate(javax.swing.event.DocumentEvent de)
handles a DocumentEvent if the document was changed |
void |
detachFrame()
bridge method to detach the applet into a separate window and back. |
void |
dispose()
Convenience method for deallocating the app resources |
java.lang.String |
getAppName()
Convenience method for obtaining the application name |
int |
getCaretPosition()
|
KafenioPanelConfiguration |
getConfig()
|
static java.io.File |
getCurrentFile()
Convenience method for obtaining the current file handle |
java.lang.String |
getDocumentBody()
Convenience method for obtaining the document text contained within the BODY tags (a common request) |
boolean |
getDocumentConfirmed()
|
java.lang.String |
getDocumentText()
Convenience method for obtaining the document text |
ExtendedHTMLDocument |
getExtendedHtmlDoc()
|
ExtendedHTMLEditorKit |
getExtendedHtmlKit()
|
java.awt.Frame |
getFrame()
Convenience method for obtaining the application's Frame |
javax.swing.text.html.HTMLEditorKit |
getHTMLEditorKit()
|
javax.swing.JScrollPane |
getHTMLScrollPane()
Can be used for setting different preferred sizes |
javax.swing.JMenuBar |
getJMenuBar()
|
javax.swing.JToolBar |
getJToolBar1()
|
javax.swing.JToolBar |
getJToolBar2()
|
KafenioPanelActions |
getKafenioActions()
|
javax.swing.ImageIcon |
getKafenioIcon(java.lang.String iconName)
Convenience method for fetching icon images from jar file |
java.awt.Container |
getKafenioParent()
|
javax.swing.ImageIcon |
getMenuIcon(java.lang.String iconName)
returns an ImageIcon if isShowMenuIcons() returns true or null if false is returned. |
de.xeinfach.kafenio.KafenioPanel.RedoAction |
getRedoAction()
|
javax.swing.JTextPane |
getSourcePane()
Convenience method for obtaining the Source JTextPane |
javax.swing.JScrollPane |
getSrcScrollPane()
|
java.awt.datatransfer.Clipboard |
getSysClipboard()
|
java.util.Hashtable |
getTActions()
|
javax.swing.JTextPane |
getTextPane()
Convenience method for obtaining the WYSIWYG JTextPane |
java.lang.String |
getTranslation(java.lang.String stringToTranslate)
|
de.xeinfach.kafenio.KafenioPanel.UndoAction |
getUndoAction()
|
void |
handleDocumentChange(javax.swing.event.DocumentEvent de)
implementation for Document Handler methods |
java.lang.String |
insertFile()
Method for inserting a file (either image-file or a url) |
void |
insertListStyle(javax.swing.text.Element element)
inserts a list item into the document at "element"'s position. |
void |
insertUpdate(javax.swing.event.DocumentEvent de)
handles a DocumentEvent if a document was inserted |
void |
keyPressed(java.awt.event.KeyEvent e)
handles the given KeyEvent if key was pressed down (do nothing) |
void |
keyReleased(java.awt.event.KeyEvent e)
handles the given KeyEvent if key was released (do nothing) |
void |
keyTyped(java.awt.event.KeyEvent ke)
KeyListener method, handles the given KeyEvent |
void |
manageListElement(javax.swing.text.Element element)
Method that handles initial list insertion and deletion |
boolean |
postContent(java.lang.String contentToPost)
posts the content body either as plain-urlencoded ascii text or base64 encoded to a given server-URL |
boolean |
postContentBody()
posts the content body either as plain-urlencoded ascii text or base64 encoded to a given server-URL |
void |
purgeUndos()
Convenience method for clearing out the UndoManager |
void |
quitApp()
ask for confirmation if there are unsaved changes. |
void |
refreshOnUpdate()
Convenience method for refreshing and displaying changes |
void |
registerDocument(ExtendedHTMLDocument newHtmlDoc)
Method for setting a document as the current document for the text pane and re-registering the controls and settings for it |
void |
registerDocumentStyles()
Method for locating the available CSS style for the document and adding them to the styles selector |
void |
removeUpdate(javax.swing.event.DocumentEvent de)
handles a DocumentEvent if the document was removed |
void |
serializeIn()
Method for reading in a serialized document from a file |
void |
serializeOut(javax.swing.text.html.HTMLDocument doc)
Method for serializing the document out to a file |
protected void |
setAsConfirmedAndQuit()
quits without saving. |
void |
setCaretPosition(int newPositon)
sets the new caret position |
void |
setDocumentConfirmed(boolean documentConfirmed)
|
void |
setDocumentText(java.lang.String sText)
Convenience method for setting the document text contains hack around JDK bug 4799813 see http://developer.java.sun.com/developer/bugParade/bugs/4799813.html regression in 1.4.x, to be fixed in 1.5 When setting the text to be "& footext", it becomes "&footext" (space disappears) same ocurrs for "</a> &", it becomes "</a>&" (space disappears) with the hack it now does not occur anymore. |
void |
setKafenioParent(java.awt.Window newParent)
|
void |
toggleSourceWindow()
Convenience method for toggling source window visibility |
static java.lang.String[] |
tokenize(java.lang.String input)
This method is used to tokenize multi-value parameter fields given in the applet |
| 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, 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, 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, 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 boolean documentConfirmed
| Constructor Detail |
public KafenioPanel(KafenioPanelConfigurationInterface iConfiguration)
| Method Detail |
public javax.swing.JMenuBar getJMenuBar()
getJMenuBar in interface KafenioPanelInterfaceKafenioPanelInterface.getTActions()public javax.swing.JToolBar getJToolBar1()
getJToolBar1 in interface KafenioPanelInterfaceKafenioPanelInterface.getJToolBar1()public javax.swing.JToolBar getJToolBar2()
getJToolBar2 in interface KafenioPanelInterfaceKafenioPanelInterface.getJToolBar2()public void setDocumentConfirmed(boolean documentConfirmed)
setDocumentConfirmed in interface KafenioPanelInterfacedocumentConfirmed - true or false, default is false.public boolean getDocumentConfirmed()
getDocumentConfirmed in interface KafenioPanelInterfacepublic java.util.Hashtable getTActions()
getTActions in interface KafenioPanelInterfacepublic void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed in interface java.awt.event.ActionListenerae - an action event to handlepublic void detachFrame()
detachFrame in interface KafenioPanelInterfacepublic void keyTyped(java.awt.event.KeyEvent ke)
keyTyped in interface java.awt.event.KeyListenerke - a KeyEvent to handlepublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenere - a KeyEvent to handlepublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenere - a KeyEvent to handle
public void insertListStyle(javax.swing.text.Element element)
throws javax.swing.text.BadLocationException,
java.io.IOException
element - the element to add the list to
javax.swing.text.BadLocationException - is thrown if something went wrong during insertion
java.io.IOException - is thrown if an io exception occured.public void changedUpdate(javax.swing.event.DocumentEvent de)
changedUpdate in interface javax.swing.event.DocumentListenerde - DocumentEvent to handlepublic void insertUpdate(javax.swing.event.DocumentEvent de)
insertUpdate in interface javax.swing.event.DocumentListenerde - DocumentEvent to handlepublic void removeUpdate(javax.swing.event.DocumentEvent de)
removeUpdate in interface javax.swing.event.DocumentListenerde - DocumentEvent to handlepublic void handleDocumentChange(javax.swing.event.DocumentEvent de)
handleDocumentChange in interface KafenioPanelInterfacede - DocumentEvent to handlepublic void registerDocument(ExtendedHTMLDocument newHtmlDoc)
newHtmlDoc - new Html Document to register in the editor panepublic void registerDocumentStyles()
registerDocumentStyles in interface KafenioPanelInterfacepublic void manageListElement(javax.swing.text.Element element)
manageListElement in interface KafenioPanelInterfaceelement - list element to managepublic java.lang.String insertFile()
insertFile in interface KafenioPanelInterface
public void serializeOut(javax.swing.text.html.HTMLDocument doc)
throws java.io.IOException
serializeOut in interface KafenioPanelInterfacedoc - a HTMLDocument
java.io.IOException - an IOException
public void serializeIn()
throws java.io.IOException,
java.lang.ClassNotFoundException
serializeIn in interface KafenioPanelInterfacejava.io.IOException - an io exception
java.lang.ClassNotFoundException - is thrown if class was not found.public static java.lang.String[] tokenize(java.lang.String input)
input - The string to tokenize
public javax.swing.JScrollPane getHTMLScrollPane()
getHTMLScrollPane in interface KafenioPanelInterfaceKafenioPanelInterface.getHTMLScrollPane()public javax.swing.JScrollPane getSrcScrollPane()
getSrcScrollPane in interface KafenioPanelInterfaceKafenioPanelInterface.getSrcScrollPane()public javax.swing.JTextPane getTextPane()
getTextPane in interface KafenioPanelInterfacepublic javax.swing.JTextPane getSourcePane()
getSourcePane in interface KafenioPanelInterfacepublic java.awt.Frame getFrame()
getFrame in interface KafenioPanelInterfacepublic static java.io.File getCurrentFile()
public java.lang.String getAppName()
getAppName in interface KafenioPanelInterfacepublic java.lang.String getDocumentText()
getDocumentText in interface KafenioPanelInterfaceprotected void setAsConfirmedAndQuit()
public boolean postContentBody()
postContentBody in interface KafenioPanelInterfacepublic boolean postContent(java.lang.String contentToPost)
contentToPost - the content to post.
public java.lang.String getDocumentBody()
getDocumentBody in interface KafenioPanelInterfacepublic void setDocumentText(java.lang.String sText)
setDocumentText in interface KafenioPanelInterfacesText - the html-text of the documentpublic void purgeUndos()
purgeUndos in interface KafenioPanelInterfacepublic void refreshOnUpdate()
refreshOnUpdate in interface KafenioPanelInterfacepublic void dispose()
dispose in interface KafenioPanelInterfacepublic javax.swing.ImageIcon getKafenioIcon(java.lang.String iconName)
getKafenioIcon in interface KafenioPanelInterfaceiconName - name of the icon without "HK.gif" at the end
public javax.swing.ImageIcon getMenuIcon(java.lang.String iconName)
getMenuIcon in interface KafenioPanelInterfaceiconName - name of the icon without "HK.gif" at the end.
public void toggleSourceWindow()
toggleSourceWindow in interface KafenioPanelInterfacepublic ExtendedHTMLDocument getExtendedHtmlDoc()
public ExtendedHTMLEditorKit getExtendedHtmlKit()
public javax.swing.text.html.HTMLEditorKit getHTMLEditorKit()
getHTMLEditorKit in interface KafenioPanelInterfaceKafenioPanelInterface.getHTMLEditorKit()public int getCaretPosition()
getCaretPosition in interface KafenioPanelInterfacepublic void setCaretPosition(int newPositon)
setCaretPosition in interface KafenioPanelInterfacenewPositon - new position of the caret.public java.awt.Container getKafenioParent()
getKafenioParent in interface KafenioPanelInterfacepublic void setKafenioParent(java.awt.Window newParent)
setKafenioParent in interface KafenioPanelInterfacepublic de.xeinfach.kafenio.KafenioPanel.RedoAction getRedoAction()
public de.xeinfach.kafenio.KafenioPanel.UndoAction getUndoAction()
public java.awt.datatransfer.Clipboard getSysClipboard()
getSysClipboard in interface KafenioPanelInterfacepublic KafenioPanelConfiguration getConfig()
public java.lang.String getTranslation(java.lang.String stringToTranslate)
getTranslation in interface KafenioPanelInterfacestringToTranslate - the string that is to be translated.
public KafenioPanelActions getKafenioActions()
public void quitApp()
quitApp in interface KafenioPanelInterface
|
Kafenio.editor 0.8.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||