org.languagetool.gui
Class Tools

java.lang.Object
  extended by org.languagetool.gui.Tools

public class Tools
extends Object

GUI-related tools.

Author:
Daniel Naber

Method Summary
static String getContext(int fromPos, int toPos, String text)
          Deprecated. use ContextTools
static String getContext(int fromPos, int toPos, String fileContents, int contextSize)
          Deprecated. use ContextTools
static String getContext(int fromPos, int toPos, String fileContents, int contextSize, String markerStart, String markerEnd)
          Deprecated. use ContextTools
static String getContext(int fromPos, int toPos, String text, int contextSize, String markerStart, String markerEnd, boolean escapeHTML)
          Deprecated. use ContextTools
static String makeTexti18n(ResourceBundle messages, String key, Object... messageArguments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeTexti18n

public static String makeTexti18n(ResourceBundle messages,
                                  String key,
                                  Object... messageArguments)

getContext

public static String getContext(int fromPos,
                                int toPos,
                                String text)
Deprecated. use ContextTools

Get the default context (40 characters) of the given text range, highlighting the range with HTML.


getContext

public static String getContext(int fromPos,
                                int toPos,
                                String fileContents,
                                int contextSize)
Deprecated. use ContextTools

Get the context (contextSize characters) of the given text range, highlighting the range with HTML code.


getContext

public static String getContext(int fromPos,
                                int toPos,
                                String fileContents,
                                int contextSize,
                                String markerStart,
                                String markerEnd)
Deprecated. use ContextTools

Get the context (contextSize characters) of the given text range, highlighting the range with the given marker strings, not escaping HTML.


getContext

public static String getContext(int fromPos,
                                int toPos,
                                String text,
                                int contextSize,
                                String markerStart,
                                String markerEnd,
                                boolean escapeHTML)
Deprecated. use ContextTools

Get the context (contextSize characters) of the given text range, highlighting the range with the given marker strings.

Parameters:
fromPos - the start position of the error in characters
toPos - the end position of the error in characters
text - the text from which the context should be taken
contextSize - the size of the context in characters
markerStart - the string used to mark the beginning of the error
markerEnd - the string used to mark the end of the error
escapeHTML - whether HTML/XML characters should be escaped


Copyright © 2013. All Rights Reserved.