javax.swing.text.html

Class HTML.Attribute

Enclosing Class:
HTML

public static final class HTML.Attribute
extends Object

Typesafe enumeration representing an HTML attribute.

Field Summary

static HTML.Attribute
ACTION
static HTML.Attribute
ALIGN
static HTML.Attribute
ALINK
static HTML.Attribute
ALT
static HTML.Attribute
ARCHIVE
static HTML.Attribute
BACKGROUND
static HTML.Attribute
BGCOLOR
static HTML.Attribute
BORDER
static HTML.Attribute
CELLPADDING
static HTML.Attribute
CELLSPACING
static HTML.Attribute
CHECKED
static HTML.Attribute
CLASS
static HTML.Attribute
CLASSID
static HTML.Attribute
CLEAR
static HTML.Attribute
CODE
static HTML.Attribute
CODEBASE
static HTML.Attribute
CODETYPE
static HTML.Attribute
COLOR
static HTML.Attribute
COLS
static HTML.Attribute
COLSPAN
static HTML.Attribute
COMMENT
static HTML.Attribute
COMPACT
static HTML.Attribute
CONTENT
static HTML.Attribute
COORDS
static HTML.Attribute
DATA
static HTML.Attribute
DECLARE
static HTML.Attribute
DIR
static HTML.Attribute
DUMMY
static HTML.Attribute
ENCTYPE
static HTML.Attribute
ENDTAG
static HTML.Attribute
FACE
static HTML.Attribute
FRAMEBORDER
static HTML.Attribute
HALIGN
static HTML.Attribute
HEIGHT
static HTML.Attribute
HREF
static HTML.Attribute
HSPACE
static HTML.Attribute
HTTPEQUIV
static HTML.Attribute
ID
static HTML.Attribute
ISMAP
static HTML.Attribute
LANG
static HTML.Attribute
LANGUAGE
static HTML.Attribute
LINK
static HTML.Attribute
LOWSRC
static HTML.Attribute
MARGINHEIGHT
static HTML.Attribute
MARGINWIDTH
static HTML.Attribute
MAXLENGTH
static HTML.Attribute
METHOD
static HTML.Attribute
MULTIPLE
static HTML.Attribute
N
static HTML.Attribute
NAME
static HTML.Attribute
NOHREF
static HTML.Attribute
NORESIZE
static HTML.Attribute
NOSHADE
static HTML.Attribute
NOWRAP
static HTML.Attribute
PROMPT
static HTML.Attribute
REL
static HTML.Attribute
REV
static HTML.Attribute
ROWS
static HTML.Attribute
ROWSPAN
static HTML.Attribute
SCROLLING
static HTML.Attribute
SELECTED
static HTML.Attribute
SHAPE
static HTML.Attribute
SHAPES
static HTML.Attribute
SIZE
static HTML.Attribute
SRC
static HTML.Attribute
STANDBY
static HTML.Attribute
START
static HTML.Attribute
STYLE
static HTML.Attribute
TARGET
static HTML.Attribute
TEXT
static HTML.Attribute
TITLE
static HTML.Attribute
TYPE
static HTML.Attribute
USEMAP
static HTML.Attribute
VALIGN
static HTML.Attribute
VALUE
static HTML.Attribute
VALUETYPE
static HTML.Attribute
VERSION
static HTML.Attribute
VLINK
static HTML.Attribute
VSPACE
static HTML.Attribute
WIDTH

Method Summary

String
toString()
Returns the string representation of this attribute.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

ACTION

public static final HTML.Attribute ACTION

ALIGN

public static final HTML.Attribute ALIGN

ALINK

public static final HTML.Attribute ALINK

ALT

public static final HTML.Attribute ALT

ARCHIVE

public static final HTML.Attribute ARCHIVE

BACKGROUND

public static final HTML.Attribute BACKGROUND
Usages and Demos :

View More Examples of BACKGROUND
   1:             if ((tag == HTML.Tag.A) && 
   2:                 (attrs.getAttribute(HTML.Attribute.HREF) != null))
   3:             {
   4:         ...
   5: 
   6:                 addProxiedConvertedAttribute( tag, HTML.Attribute.HREF, attrs);
   7: 
   8:         ...
   9:                         ) && 
  10:                         (attrs.getAttribute(HTML.Attribute.SRC) != null)
  11:                        ))
  12:         ...
  13:             } else if (((tag == HTML.Tag.BODY) ) && 
  14:                        (attrs.getAttribute(HTML.Attribute.BACKGROUND) != null))

View Full Code Here

BGCOLOR

public static final HTML.Attribute BGCOLOR

BORDER

public static final HTML.Attribute BORDER

CELLPADDING

public static final HTML.Attribute CELLPADDING

CELLSPACING

public static final HTML.Attribute CELLSPACING

CHECKED

public static final HTML.Attribute CHECKED

CLASS

public static final HTML.Attribute CLASS
Usages and Demos :

View More Examples of CLASS
   1: public class SwingHTMLHandler extends ParserCallback {
   2:     Category log = Category.getInstance(SwingHTMLHandler.class);
   3: 
   4:         ...
   5:     protected void handleMetaTag(MutableAttributeSet attributes) {
   6:         Object nameObject = attributes.getAttribute(HTML.Attribute.NAME);
   7:         ...
   8:         Object valueObject = attributes.getAttribute(HTML.Attribute.VALUE);
   9: 
  10:         ...
  11: 
  12:         Object contentObject = attributes.getAttribute(HTML.Attribute.CONTENT);

View Full Code Here
   1:         }
   2:         Object val = as.getAttribute(HTML.Attribute.CLASS);
   3:         if(val != null && (val instanceof String))
   4:         ...
   5:                 {
   6:                     val = eas.getAttribute(HTML.Attribute.CLASS);
   7:                     if(val != null)
   8:                     {
   9:                         return (String)val;

View Full Code Here
   1:         }
   2:         Object val = as.getAttribute(HTML.Attribute.CLASS);
   3:         if(val != null && (val instanceof String))
   4:         ...
   5:                 {
   6:                     val = eas.getAttribute(HTML.Attribute.CLASS);
   7:                     if(val != null)
   8:                     {
   9:                         return (String)val;

View Full Code Here

CLASSID

public static final HTML.Attribute CLASSID

CLEAR

public static final HTML.Attribute CLEAR

CODE

public static final HTML.Attribute CODE

CODEBASE

public static final HTML.Attribute CODEBASE
Usages and Demos :

View More Examples of CODEBASE
   1:             if ((tag == HTML.Tag.A) && 
   2:                 (attrs.getAttribute(HTML.Attribute.HREF) != null))
   3:             {
   4:         ...
   5: 
   6:                 addProxiedConvertedAttribute( tag, HTML.Attribute.HREF, attrs);
   7: 
   8:         ...
   9:                         ) && 
  10:                         (attrs.getAttribute(HTML.Attribute.SRC) != null)
  11:                        ))
  12:         ...
  13:                 addConvertedAttribute( tag,
  14:                                        HTML.Attribute.CODEBASE,

View Full Code Here

CODETYPE

public static final HTML.Attribute CODETYPE

COLOR

public static final HTML.Attribute COLOR

COLS

public static final HTML.Attribute COLS

COLSPAN

public static final HTML.Attribute COLSPAN

COMMENT

public static final HTML.Attribute COMMENT

COMPACT

public static final HTML.Attribute COMPACT

CONTENT

public static final HTML.Attribute CONTENT

COORDS

public static final HTML.Attribute COORDS

DATA

public static final HTML.Attribute DATA

DECLARE

public static final HTML.Attribute DECLARE

DIR

public static final HTML.Attribute DIR

DUMMY

public static final HTML.Attribute DUMMY

ENCTYPE

public static final HTML.Attribute ENCTYPE

ENDTAG

public static final HTML.Attribute ENDTAG

FACE

public static final HTML.Attribute FACE

FRAMEBORDER

public static final HTML.Attribute FRAMEBORDER

HALIGN

public static final HTML.Attribute HALIGN

HEIGHT

public static final HTML.Attribute HEIGHT

HREF

public static final HTML.Attribute HREF
Usages and Demos :

View More Examples of HREF
   1:           System.out.println("\tSrc " +
   2:                      set.getAttribute(HTML.Attribute.SRC));
   3:           }
   4:         ...
   5:               System.out.println("\tSrc " +
   6:                      s.getAttribute(HTML.Attribute.HREF));
   7:           }
   8:           }
   9:       }

View Full Code Here
   1:                     linkAttr = (SimpleAttributeSet)o;
   2:                     o = linkAttr.getAttribute(HTML.Attribute.HREF);
   3:                     linkURL = (o == null) ? null : o.toString();
   4:         ...
   5:                 newLinkAttr.addAttributes(linkAttr.copyAttributes());
   6:                 newLinkAttr.addAttribute(HTML.Attribute.HREF, linkURL);
   7:                 
   8:                 MutableAttributeSet newAttr = new SimpleAttributeSet();
   9:                 newAttr.addAttributes(attr.copyAttributes());

View Full Code Here
   1:             {
   2:                 String href = (String)atts.getAttribute(HTML.Attribute.HREF);
   3:                 if ( href == null ) return;                        
   4:         ...
   5:             {
   6:                 String title = (String)atts.getAttribute(HTML.Attribute.TITLE);
   7:         ...
   8:                 String type = (String)atts.getAttribute(HTML.Attribute.TYPE);
   9:                 if ( title!=null && type!=null 
  10:         ...
  11:                 {
  12:                     mRssLink = (String)atts.getAttribute(HTML.Attribute.HREF);

View Full Code Here
   1:       if(elem.getName().equals(FRAME)) {
   2:           l = (String)set.getAttribute(HTML.Attribute.SRC);
   3:       }
   4:         ...
   5:           if(set == null) continue;
   6:           l = (String)set.getAttribute(HTML.Attribute.HREF);
   7:       }
   8: 
   9:       if(l != null) l = l.trim();

View Full Code Here
   1:             if ((tag == HTML.Tag.A) && 
   2:                 (attrs.getAttribute(HTML.Attribute.HREF) != null))
   3:             {
   4:         ...
   5: 
   6:                 addProxiedConvertedAttribute( tag, HTML.Attribute.HREF, attrs);
   7: 
   8:         ...
   9:                         ) && 
  10:                         (attrs.getAttribute(HTML.Attribute.SRC) != null)
  11:                        ))
  12:         ...
  13:                 addConvertedAttribute( tag,
  14:                                        HTML.Attribute.SRC, 

View Full Code Here

HSPACE

public static final HTML.Attribute HSPACE

HTTPEQUIV

public static final HTML.Attribute HTTPEQUIV

ID

public static final HTML.Attribute ID

ISMAP

public static final HTML.Attribute ISMAP

LANG

public static final HTML.Attribute LANG
Usages and Demos :

View More Examples of LANG
   1:         this.tag = tag;
   2:         this.lang = lang;
   3:         }
   4:         ...
   5:         SimpleAttributeSet sas = new SimpleAttributeSet();
   6:         sas.addAttribute(HTML.Attribute.COMMENT, new String(data));
   7:         addSpecialElement(HTML.Tag.COMMENT, sas);
   8:         ...
   9:         public void start(HTML.Tag t, MutableAttributeSet a) {
  10:         String lang = (String) a.getAttribute(HTML.Attribute.LANG);
  11:         if (lang == null) {
  12:         ...
  13:         blockOpen(t, attr);
  14:         String lang = (String) attr.getAttribute(HTML.Attribute.LANG);

View Full Code Here

LANGUAGE

public static final HTML.Attribute LANGUAGE

LINK

public static final HTML.Attribute LINK

LOWSRC

public static final HTML.Attribute LOWSRC

MARGINHEIGHT

public static final HTML.Attribute MARGINHEIGHT

MARGINWIDTH

public static final HTML.Attribute MARGINWIDTH

MAXLENGTH

public static final HTML.Attribute MAXLENGTH

METHOD

public static final HTML.Attribute METHOD

MULTIPLE

public static final HTML.Attribute MULTIPLE

N

public static final HTML.Attribute N

NAME

public static final HTML.Attribute NAME
Usages and Demos :

View More Examples of NAME
   1: import javax.swing.text.html.HTMLEditorKit;
   2: import javax.swing.text.html.HTML.Attribute;
   3: import javax.swing.text.html.HTML.Tag;
   4:         ...
   5:         if(mCanProcess && t.equals(Tag.PARAM)) {
   6:             if(a.isDefined(Attribute.NAME) && a.isDefined(Attribute.VALUE)) {
   7:         ...
   8:                 String name = (String)a.getAttribute(Attribute.NAME);
   9:                 String value = (String)a.getAttribute(Attribute.VALUE);

View Full Code Here
   1:     AttributeSet a = i.getAttributes();
   2:     String nm = (String) a.getAttribute(HTML.Attribute.NAME);
   3:     if ((nm != null) && nm.equals(ref)) {
   4:       text.select(i.getStartOffset(), i.getEndOffset());
   5:     }

View Full Code Here
   1:          if ("a".equalsIgnoreCase(tname)) {
   2:             Object aname = a.getAttribute(HTML.Attribute.NAME);
   3:             if (aname != null) {
   4:         ...
   5:         if ("meta".equalsIgnoreCase(tname)) {
   6:             Object name = a.getAttribute(HTML.Attribute.NAME);
   7:         ...
   8:             Object content = a.getAttribute(HTML.Attribute.CONTENT);

View Full Code Here
   1: import javax.swing.text.MutableAttributeSet;
   2: import javax.swing.text.html.HTML.Attribute;
   3: import javax.swing.text.html.HTML.Tag;
   4:         ...
   5:         if(t.equals(Tag.A)) {
   6:             if(a != null && a.isDefined(Attribute.NAME)) {
   7:                 if(mCollecting) {
   8:         ...
   9:                 }
  10:                 mAnchor = mPrefix+a.getAttribute(Attribute.NAME);
  11:                 if(mURLs.contains(mAnchor)) {

View Full Code Here
   1:             String href = (anchor != null) ? 
   2:                 (String) anchor.getAttribute(HTML.Attribute.HREF) 
   3:                 : null;
   4:         ...
   5:             debug ("addParameter AttributeSet=" + a);
   6:             String name = (String) a.getAttribute(HTML.Attribute.NAME);
   7:         ...
   8:             String value = (String) a.getAttribute(HTML.Attribute.VALUE);
   9:             if ((name != null) && (value != null)) {
  10:         ...
  11:         debug("attr: " + attr.copyAttributes());
  12:         String classname = (String) attr.getAttribute(HTML.Attribute.CLASSID);

View Full Code Here

NOHREF

public static final HTML.Attribute NOHREF

NORESIZE

public static final HTML.Attribute NORESIZE

NOSHADE

public static final HTML.Attribute NOSHADE

NOWRAP

public static final HTML.Attribute NOWRAP

PROMPT

public static final HTML.Attribute PROMPT

REL

public static final HTML.Attribute REL

REV

public static final HTML.Attribute REV

ROWS

public static final HTML.Attribute ROWS

ROWSPAN

public static final HTML.Attribute ROWSPAN

SCROLLING

public static final HTML.Attribute SCROLLING

SELECTED

public static final HTML.Attribute SELECTED

SHAPE

public static final HTML.Attribute SHAPE

SHAPES

public static final HTML.Attribute SHAPES

SIZE

public static final HTML.Attribute SIZE

SRC

public static final HTML.Attribute SRC
Usages and Demos :

View More Examples of SRC
   1:         if (tag.equals(HTML.Tag.A)) {
   2:             String href = (String) attributes.getAttribute(HTML.Attribute.HREF);
   3: 
   4:         ...
   5:         if (tag.equals(HTML.Tag.IMG)) {
   6:             String src = (String) attributes.getAttribute(HTML.Attribute.SRC);
   7: 
   8:         ...
   9:         if (tag.equals(HTML.Tag.LINK)) {
  10:             String href = (String) attributes.getAttribute(HTML.Attribute.HREF);

View Full Code Here
   1: 
   2:                 String src = (String) a.getAttribute(HTML.Attribute.SRC);
   3: 
   4:         ...
   5: 
   6:                 a.removeAttribute(HTML.Attribute.SRC);
   7: 
   8:         ...
   9:                 a.addAttribute(HTML.Attribute.SRC, src);

View Full Code Here
   1:       if(elem.getName().equals(FRAME)) {
   2:           l = (String)set.getAttribute(HTML.Attribute.SRC);
   3:       }
   4:         ...
   5:           if(set == null) continue;
   6:           l = (String)set.getAttribute(HTML.Attribute.HREF);
   7:       }
   8: 
   9:       if(l != null) l = l.trim();

View Full Code Here
   1:             if ((tag == HTML.Tag.A) && 
   2:                 (attrs.getAttribute(HTML.Attribute.HREF) != null))
   3:             {
   4:         ...
   5: 
   6:                 addProxiedConvertedAttribute( tag, HTML.Attribute.HREF, attrs);
   7: 
   8:         ...
   9:                         ) && 
  10:                         (attrs.getAttribute(HTML.Attribute.SRC) != null)
  11:                        ))
  12:         ...
  13:                 addConvertedAttribute( tag,
  14:                                        HTML.Attribute.SRC, 

View Full Code Here

STANDBY

public static final HTML.Attribute STANDBY

START

public static final HTML.Attribute START

STYLE

public static final HTML.Attribute STYLE

TARGET

public static final HTML.Attribute TARGET
Usages and Demos :

View More Examples of TARGET
   1:                 String type = (String)( element.getAttributes().
   2:                                         getAttribute(HTML.Attribute.TYPE));
   3:                 return view;
   4:         ...
   5:                 if( element.getAttributes().
   6:                                 getAttribute(HTML.Attribute.ENDTAG) == null)
   7:                 {
   8:         ...
   9:             String action =
  10:                         (String)attributes.getAttribute(HTML.Attribute.ACTION);
  11:             String method =
  12:         ...
  13:                         target = (String) tagAttributes.getAttribute(
  14:                                                     HTML.Attribute.TARGET);

View Full Code Here

TEXT

public static final HTML.Attribute TEXT

TITLE

public static final HTML.Attribute TITLE
Usages and Demos :

View More Examples of TITLE
   1:             {
   2:                 String href = (String)atts.getAttribute(HTML.Attribute.HREF);
   3:                 if ( href == null ) return;                        
   4:         ...
   5:             {
   6:                 String title = (String)atts.getAttribute(HTML.Attribute.TITLE);
   7:         ...
   8:                 String type = (String)atts.getAttribute(HTML.Attribute.TYPE);
   9:                 if ( title!=null && type!=null 
  10:         ...
  11:                 {
  12:                     mRssLink = (String)atts.getAttribute(HTML.Attribute.HREF);

View Full Code Here

TYPE

public static final HTML.Attribute TYPE
Usages and Demos :

View More Examples of TYPE
   1:             {
   2:                 String href = (String)atts.getAttribute(HTML.Attribute.HREF);
   3:                 if ( href == null ) return;                        
   4:         ...
   5:             {
   6:                 String title = (String)atts.getAttribute(HTML.Attribute.TITLE);
   7:         ...
   8:                 String type = (String)atts.getAttribute(HTML.Attribute.TYPE);
   9:                 if ( title!=null && type!=null 
  10:         ...
  11:                 {
  12:                     mRssLink = (String)atts.getAttribute(HTML.Attribute.HREF);

View Full Code Here

USEMAP

public static final HTML.Attribute USEMAP

VALIGN

public static final HTML.Attribute VALIGN

VALUE

public static final HTML.Attribute VALUE
Usages and Demos :

View More Examples of VALUE
   1: import javax.swing.text.html.HTMLEditorKit;
   2: import javax.swing.text.html.HTML.Attribute;
   3: import javax.swing.text.html.HTML.Tag;
   4:         ...
   5:         if(mCanProcess && t.equals(Tag.PARAM)) {
   6:             if(a.isDefined(Attribute.NAME) && a.isDefined(Attribute.VALUE)) {
   7:                 String name = (String)a.getAttribute(Attribute.NAME);
   8:         ...
   9:                 String value = (String)a.getAttribute(Attribute.VALUE);
  10:                 if(ATTR_VALUE_LOCAL.equalsIgnoreCase(name)) {

View Full Code Here
   1:             String href = (anchor != null) ? 
   2:                 (String) anchor.getAttribute(HTML.Attribute.HREF) 
   3:                 : null;
   4:         ...
   5:             debug ("addParameter AttributeSet=" + a);
   6:             String name = (String) a.getAttribute(HTML.Attribute.NAME);
   7:         ...
   8:             String value = (String) a.getAttribute(HTML.Attribute.VALUE);
   9:             if ((name != null) && (value != null)) {
  10:         ...
  11:         debug("attr: " + attr.copyAttributes());
  12:         String classname = (String) attr.getAttribute(HTML.Attribute.CLASSID);

View Full Code Here
   1:     protected void handleMetaTag(MutableAttributeSet attributes) {
   2:         Object nameObject = attributes.getAttribute(HTML.Attribute.NAME);
   3:         ...
   4:         Object valueObject = attributes.getAttribute(HTML.Attribute.VALUE);
   5: 
   6:         ...
   7: 
   8:         Object contentObject = attributes.getAttribute(HTML.Attribute.CONTENT);
   9:         if ((nameObject != null) && (contentObject != null)) {
  10:         ...
  11:     protected void handleLuceneStartTag(HTML.Tag tag, MutableAttributeSet attributes) {
  12:         Object valueObject = attributes.getAttribute(HTML.Attribute.CLASS);

View Full Code Here

VALUETYPE

public static final HTML.Attribute VALUETYPE

VERSION

public static final HTML.Attribute VERSION

VLINK

public static final HTML.Attribute VLINK

VSPACE

public static final HTML.Attribute VSPACE
Usages and Demos :

View More Examples of VSPACE
   1:             }
   2:             String iconName = getAttr(HTML.Attribute.SRC);
   3:             if (iconName == null) return;
   4:         ...
   5: 
   6:         border = getLocalAttr(HTML.Attribute.BORDER);
   7:         ...
   8:         hspace = getLocalAttr(HTML.Attribute.HSPACE);
   9:         ...
  10:         vspace = getLocalAttr(HTML.Attribute.VSPACE);

View Full Code Here

WIDTH

public static final HTML.Attribute WIDTH
Usages and Demos :

View More Examples of WIDTH
   1:             {
   2:                 String src = (String)fElement.getAttributes().getAttribute(HTML.Attribute.SRC);
   3:                 src = processSrcPath(src);
   4:         ...
   5: 
   6:             height = getIntAttr(HTML.Attribute.HEIGHT, -1);
   7:             customHeight = (height > 0);
   8:         ...
   9: 
  10:             width = getIntAttr(HTML.Attribute.WIDTH, -1);
  11:             customWidth = (width > 0);
  12:         ...
  13:     {
  14:         String src = (String)fElement.getAttributes().getAttribute(HTML.Attribute.SRC);

View Full Code Here
   1:             {
   2:                 String src = (String)fElement.getAttributes().getAttribute(HTML.Attribute.SRC);
   3:                 src = processSrcPath(src);
   4:         ...
   5: 
   6:             height = getIntAttr(HTML.Attribute.HEIGHT, -1);
   7:             customHeight = (height > 0);
   8:         ...
   9: 
  10:             width = getIntAttr(HTML.Attribute.WIDTH, -1);
  11:             customWidth = (width > 0);
  12:         ...
  13:     {
  14:         String src = (String)fElement.getAttributes().getAttribute(HTML.Attribute.SRC);

View Full Code Here
   1:     
   2:                         height = getIntAttr(HTML.Attribute.HEIGHT,-1);
   3:                         customHeight = (height>0);
   4:         ...
   5:                             height = DEFAULT_HEIGHT;
   6:                         width = getIntAttr(HTML.Attribute.WIDTH,-1);
   7:                         customWidth = (width>0);
   8:         ...
   9:         String src =
  10:           (String) this.fElement.getAttributes().getAttribute(HTML.Attribute.SRC);
  11:         return src.toLowerCase().startsWith("file") ||
  12:         ...
  13:         if (anchorAttr != null) {
  14:             return anchorAttr.isDefined(HTML.Attribute.HREF);

View Full Code Here

Method Details

toString

public String toString()
Returns the string representation of this attribute.
Overrides:
toString in interface Object
Returns:
the string representation of this attribute