Package org.luwrain.controls.reader
Class ReaderArea
java.lang.Object
org.luwrain.controls.reader.ReaderArea
- All Implemented Interfaces:
ClipboardTranslator.Provider,Area,HotPoint,Lines,ListenableArea
public class ReaderArea
extends Object
implements Area, ListenableArea, ClipboardTranslator.Provider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfaceprotected static classstatic final classstatic enumstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ReaderArea.Announcementprotected ReaderArea.ClickHandlerprotected final ClipboardTranslatorprotected final ControlContextprotected Documentprotected intprotected Iteratorprotected Layoutprotected final Stringprotected final RegionPointprotected final ReaderArea.Transitionprotected View -
Constructor Summary
ConstructorsConstructorDescriptionReaderArea(ControlContext context, ReaderArea.Announcement announcement) ReaderArea(ControlContext context, ReaderArea.Announcement announcement, Document document, int width) ReaderArea(ReaderArea.Params params) -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancharOfSentenceEnd(char ch) protected static intfindEndOfSentence(String text, int startFrom) booleanAction[]intintintString[]getLine(int index) intbooleanbooleanisEmpty()protected Stringprotected booleanonAltEnd(InputEvent event) protected booleanonAltHome(InputEvent event) protected booleanonAltLeft(InputEvent event) protected booleanonAltRight(InputEvent event) booleanonAreaQuery(AreaQuery query) protected booleanonClick()booleanonClipboardCopy(int fromX, int fromY, int toX, int toY, boolean withDeleting) booleanbooleanonDeleteRegion(int fromX, int fromY, int toX, int toY) protected booleanonEnd(InputEvent event) protected booleanprotected booleanonHome(InputEvent event) booleanonInputEvent(InputEvent event) voidonListeningFinish(ListenableArea.ListeningInfo listeningInfo) protected booleanonMoveHotPoint(MoveHotPointEvent event) protected booleanonMoveLeft(InputEvent event) protected booleanonMoveRight(InputEvent event) protected voidonNewRow(boolean briefAnnouncement) protected booleanonNextSentence(InputEvent event) booleanonSystemEvent(SystemEvent event) protected booleanonTransition(InputEvent event, ReaderArea.Transition.Type type, boolean briefAnnouncement, Hint hintFailed) booleanrebuildView(int width) booleansetCurrentRowIndex(int index) voidsetDocument(Document document, int width) protected String
-
Field Details
-
context
-
regionPoint
-
clipboardTranslator
-
name
-
announcement
-
transition
-
clickHandler
-
document
-
view
-
layout
-
iterator
-
hotPointX
protected int hotPointX
-
-
Constructor Details
-
ReaderArea
-
ReaderArea
public ReaderArea(ControlContext context, ReaderArea.Announcement announcement, Document document, int width) -
ReaderArea
-
-
Method Details
-
setDocument
-
hasDocument
public boolean hasDocument() -
isEmpty
public boolean isEmpty() -
getDocument
-
getDocTitle
-
getDocUrl
-
getDocUniRef
-
getCurrentRun
-
findRun
-
getCurrentRowIndex
public int getCurrentRowIndex() -
setCurrentRowIndex
public boolean setCurrentRowIndex(int index) -
getHtmlIds
-
rebuildView
public boolean rebuildView(int width) -
getLineCount
public int getLineCount()- Specified by:
getLineCountin interfaceLines
-
getLine
-
onInputEvent
- Specified by:
onInputEventin interfaceArea
-
onSystemEvent
- Specified by:
onSystemEventin interfaceArea
-
getAreaActions
- Specified by:
getAreaActionsin interfaceArea
-
onAreaQuery
- Specified by:
onAreaQueryin interfaceArea
-
getHotPointX
public int getHotPointX()- Specified by:
getHotPointXin interfaceArea- Specified by:
getHotPointXin interfaceHotPoint
-
getHotPointY
public int getHotPointY()- Specified by:
getHotPointYin interfaceArea- Specified by:
getHotPointYin interfaceHotPoint
-
getAreaName
- Specified by:
getAreaNamein interfaceArea
-
onClipboardCopyAll
public boolean onClipboardCopyAll()- Specified by:
onClipboardCopyAllin interfaceClipboardTranslator.Provider
-
onClipboardCopy
public boolean onClipboardCopy(int fromX, int fromY, int toX, int toY, boolean withDeleting) - Specified by:
onClipboardCopyin interfaceClipboardTranslator.Provider
-
onDeleteRegion
public boolean onDeleteRegion(int fromX, int fromY, int toX, int toY) - Specified by:
onDeleteRegionin interfaceClipboardTranslator.Provider
-
onListeningStart
- Specified by:
onListeningStartin interfaceListenableArea
-
onListeningFinish
- Specified by:
onListeningFinishin interfaceListenableArea
-
onMoveHotPoint
-
onClick
protected boolean onClick() -
onTransition
protected boolean onTransition(InputEvent event, ReaderArea.Transition.Type type, boolean briefAnnouncement, Hint hintFailed) -
onAltEnd
-
onAltHome
-
onNextSentence
-
onMoveLeft
-
onMoveRight
-
onAltLeft
-
onAltRight
-
onHome
-
onEnd
-
onFindNextHref
protected boolean onFindNextHref() -
onNewRow
protected void onNewRow(boolean briefAnnouncement) -
noContentStr
-
findEndOfSentence
-
charOfSentenceEnd
protected static boolean charOfSentenceEnd(char ch) -
textUntil
-