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
Modifier and TypeClassDescriptionstatic interface
static interface
protected static class
static final class
static enum
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ReaderArea.Announcement
protected ReaderArea.ClickHandler
protected final ClipboardTranslator
protected final ControlContext
protected Document
protected int
protected Iterator
protected Layout
protected final String
protected final RegionPoint
protected final ReaderArea.Transition
protected View
-
Constructor Summary
ConstructorDescriptionReaderArea
(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 boolean
charOfSentenceEnd
(char ch) protected static int
findEndOfSentence
(String text, int startFrom) boolean
Action[]
int
int
int
String[]
getLine
(int index) int
boolean
boolean
isEmpty()
protected String
protected boolean
onAltEnd
(InputEvent event) protected boolean
onAltHome
(InputEvent event) protected boolean
onAltLeft
(InputEvent event) protected boolean
onAltRight
(InputEvent event) boolean
onAreaQuery
(AreaQuery query) protected boolean
onClick()
boolean
onClipboardCopy
(int fromX, int fromY, int toX, int toY, boolean withDeleting) boolean
boolean
onDeleteRegion
(int fromX, int fromY, int toX, int toY) protected boolean
onEnd
(InputEvent event) protected boolean
protected boolean
onHome
(InputEvent event) boolean
onInputEvent
(InputEvent event) void
onListeningFinish
(ListenableArea.ListeningInfo listeningInfo) protected boolean
onMoveHotPoint
(MoveHotPointEvent event) protected boolean
onMoveLeft
(InputEvent event) protected boolean
onMoveRight
(InputEvent event) protected void
onNewRow
(boolean briefAnnouncement) protected boolean
onNextSentence
(InputEvent event) boolean
onSystemEvent
(SystemEvent event) protected boolean
onTransition
(InputEvent event, ReaderArea.Transition.Type type, boolean briefAnnouncement, Hint hintFailed) boolean
rebuildView
(int width) boolean
setCurrentRowIndex
(int index) void
setDocument
(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:
getLineCount
in interfaceLines
-
getLine
-
onInputEvent
- Specified by:
onInputEvent
in interfaceArea
-
onSystemEvent
- Specified by:
onSystemEvent
in interfaceArea
-
getAreaActions
- Specified by:
getAreaActions
in interfaceArea
-
onAreaQuery
- Specified by:
onAreaQuery
in interfaceArea
-
getHotPointX
public int getHotPointX()- Specified by:
getHotPointX
in interfaceArea
- Specified by:
getHotPointX
in interfaceHotPoint
-
getHotPointY
public int getHotPointY()- Specified by:
getHotPointY
in interfaceArea
- Specified by:
getHotPointY
in interfaceHotPoint
-
getAreaName
- Specified by:
getAreaName
in interfaceArea
-
onClipboardCopyAll
public boolean onClipboardCopyAll()- Specified by:
onClipboardCopyAll
in interfaceClipboardTranslator.Provider
-
onClipboardCopy
public boolean onClipboardCopy(int fromX, int fromY, int toX, int toY, boolean withDeleting) - Specified by:
onClipboardCopy
in interfaceClipboardTranslator.Provider
-
onDeleteRegion
public boolean onDeleteRegion(int fromX, int fromY, int toX, int toY) - Specified by:
onDeleteRegion
in interfaceClipboardTranslator.Provider
-
onListeningStart
- Specified by:
onListeningStart
in interfaceListenableArea
-
onListeningFinish
- Specified by:
onListeningFinish
in 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
-