Kafenio.editor 0.8.5

de.xeinfach.kafenio.component
Class HTMLUtilities

java.lang.Object
  extended byde.xeinfach.kafenio.component.HTMLUtilities

public class HTMLUtilities
extends java.lang.Object

Description: HTMLUtilities - Special Utility Functions For Kafenio Copyright (C) 2003 Rafael Cieplinski, modified by Howard Kistler

Author:
Copyright (C) 2003 Rafael Cieplinski, modified by Howard Kistler, Karsten Pawlik

Constructor Summary
HTMLUtilities(KafenioPanel newParent)
          creates a new HTMLUtilities Object using the given value.
 
Method Summary
 boolean checkParentsTag(javax.swing.text.html.HTML.Tag tag)
          Method to check if the given tag is in the hierarchy above the current position or not.
 void delete()
           
 javax.swing.text.html.HTML.Tag getHTMLTag(javax.swing.text.Element elem)
          liefert den entsprechenden HTML.Tag zum Element zurück
 javax.swing.text.Element getListItemParent()
           
 java.lang.String[] getUniString(int strings)
           
 void insertListElement(java.lang.String content)
          This method adds the given content as a list element.
 javax.swing.text.SimpleAttributeSet removeAttribute(javax.swing.text.SimpleAttributeSet sourceAS, javax.swing.text.SimpleAttributeSet removeAS)
           
 javax.swing.text.SimpleAttributeSet removeAttributeByKey(javax.swing.text.SimpleAttributeSet sourceAS, java.lang.String removeKey)
           
 void removeTag(javax.swing.text.Element element, boolean closingTag)
          Method to remove the given element using stringmanipulation in the source-pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLUtilities

public HTMLUtilities(KafenioPanel newParent)
creates a new HTMLUtilities Object using the given value.

Parameters:
newParent - a reference to an instance of the KafenioPanel class.
Method Detail

insertListElement

public void insertListElement(java.lang.String content)
This method adds the given content as a list element.

Parameters:
content - content to add to list

removeTag

public void removeTag(javax.swing.text.Element element,
                      boolean closingTag)
Method to remove the given element using stringmanipulation in the source-pane.
its an alternative method for removeElement in ExtendedHTMLDocument.
if closingTag is true, an end-tag for the given element is expected.

Parameters:
element - an element
closingTag - a closing tag

checkParentsTag

public boolean checkParentsTag(javax.swing.text.html.HTML.Tag tag)
Method to check if the given tag is in the hierarchy above the current position or not.

Parameters:
tag - HTML.Tag to search for.
Returns:
returns true or false.

getListItemParent

public javax.swing.text.Element getListItemParent()
Returns:
Diese Methoden geben das erste gefundende dem übergebenen tags entsprechende Element zurück

removeAttributeByKey

public javax.swing.text.SimpleAttributeSet removeAttributeByKey(javax.swing.text.SimpleAttributeSet sourceAS,
                                                                java.lang.String removeKey)
Parameters:
sourceAS - source AttributeSet
removeKey - remove key from attributeset
Returns:
Diese Methode entfernt Attribute aus dem SimpleAttributeSet, gemäß den übergebenen Werten, und gibt das Ergebnis als SimpleAttributeSet zurück

removeAttribute

public javax.swing.text.SimpleAttributeSet removeAttribute(javax.swing.text.SimpleAttributeSet sourceAS,
                                                           javax.swing.text.SimpleAttributeSet removeAS)
Parameters:
sourceAS - source AttributeSet
removeAS - AttributeSet to remove
Returns:
Diese Methode entfernt Attribute aus dem SimpleAttributeSet, gemäß den übergebenen Werten, und gibt das Ergebnis als SimpleAttributeSet zurück

getHTMLTag

public javax.swing.text.html.HTML.Tag getHTMLTag(javax.swing.text.Element elem)
liefert den entsprechenden HTML.Tag zum Element zurück

Parameters:
elem - element to get html tag for
Returns:
returns the element's HTML tag

getUniString

public java.lang.String[] getUniString(int strings)
Parameters:
strings - number of strings to get.
Returns:
returns an array of strings

delete

public void delete()
            throws javax.swing.text.BadLocationException,
                   java.io.IOException
Throws:
javax.swing.text.BadLocationException - an exception
java.io.IOException - an exception

Kafenio.editor 0.8.5

Copyright © 2003-2004 by Karsten Pawlik. All Rights Reserved. Published under the Lesser General Public License (LGPL)