Class JSyntaxUtils

java.lang.Object
net.thevpc.jeep.editor.JSyntaxUtils

public class JSyntaxUtils extends Object
  • Field Details

  • Constructor Details

    • JSyntaxUtils

      public JSyntaxUtils()
  • Method Details

    • getSourceName

      public static String getSourceName(JTextComponent component)
    • setSourceName

      public static void setSourceName(JTextComponent component, String sourceName)
    • setText

      public static void setText(JTextComponent component, JTextSource source)
    • getSyntaxDocument

      public static JSyntaxDocument getSyntaxDocument(JTextComponent component)
      A helper function that will return the SyntaxDocument attached to the given text component. Return null if the document is not a SyntaxDocument, or if the text component is null
    • getLineCount

      public static int getLineCount(JTextComponent pane)
    • getLineNumber

      public static int getLineNumber(JTextComponent editor, int pos)
      Gets the Line Number at the give position of the editor component. The first line number is ZERO
      Returns:
      line number
    • getColumnNumber

      public static int getColumnNumber(JTextComponent editor, int pos)
      Gets the column number at given position of editor. The first column is ZERO
      Returns:
      the 0 based column number
    • getScreenBoundsForPoint

      public static Rectangle getScreenBoundsForPoint(int x, int y)