Java Swing UI Thread Event isLinefeedTag(HTML.Tag tag)

Here you can find the source of isLinefeedTag(HTML.Tag tag)

Description

is Linefeed Tag

License

Apache License

Declaration

private static boolean isLinefeedTag(HTML.Tag tag) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;
import java.util.List;

import javax.swing.text.html.HTML;

public class Main {
    private static boolean isLinefeedTag(HTML.Tag tag) {
        final List<HTML.Tag> breakers = new ArrayList<HTML.Tag>();
        breakers.add(HTML.Tag.DIV);
        breakers.add(HTML.Tag.H1);
        breakers.add(HTML.Tag.H2);
        breakers.add(HTML.Tag.H3);
        breakers.add(HTML.Tag.H4);
        breakers.add(HTML.Tag.H5);
        breakers.add(HTML.Tag.LI);
        breakers.add(HTML.Tag.P);
        breakers.add(HTML.Tag.PRE);
        breakers.add(HTML.Tag.TH);
        breakers.add(HTML.Tag.TR);
        return breakers.contains(tag);
    }/* w  w  w. java2  s .  c o  m*/
}

Related

  1. isEDT()
  2. isEDT()
  3. isEDT()
  4. isEventDispatchThread()
  5. isEventDispatchThread()
  6. onShowingChanged(final JComponent component, final Runnable callback)
  7. processOnSwingEventThread(Runnable todo, boolean wait)
  8. resultOfOnEventThread(final Callable task)
  9. runAndWaitOnEDT(Runnable r)