: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

org.zaval.lw
Interface TxtSelectionInfo

All Known Implementing Classes:
LwTextField

public interface TxtSelectionInfo

This interface helps the text render (LwTextRender) to paint selected text. The interface defines the following properties that are necessary to paint selected text:

  • Start selection row and column.
  • Last selection row and column.
  • Selection color.

To get selected text getSelectedText method should be used.


Method Summary
 java.awt.Color getBackground()
          Returns the color that is a background for this area.
 java.awt.Point getEndSelection()
          Returns the last selection row and column
 java.awt.Color getSelectColor()
          Returns the color that is used to render selected text background.
 java.lang.String getSelectedText()
          Returns the selected text.
 java.awt.Point getStartSelection()
          Returns the start selection row and column
 

Method Detail

getStartSelection

public java.awt.Point getStartSelection()
Returns the start selection row and column
Returns:
a start selection row and column. The result is represented using java.awt.Point class where x field is selection row and y field is selection column. Returns null as the result if no any text portion has been selected.

getEndSelection

public java.awt.Point getEndSelection()
Returns the last selection row and column
Returns:
a last selection row and column. The result is represented using java.awt.Point class where x field is selection row and y field is selection column. Returns null as the result if no any text portion has been selected.

getSelectedText

public java.lang.String getSelectedText()
Returns the selected text.
Returns:
a selected text. The method returns null if there is not selected text.

getSelectColor

public java.awt.Color getSelectColor()
Returns the color that is used to render selected text background.
Returns:
a color to render selected text background.

getBackground

public java.awt.Color getBackground()
Returns the color that is a background for this area.
Returns:
a background color.


: up