public class GBufferedTextArea extends GContainer implements ActionListener, GDisplay, GListener, GTextAreaInterface
Index | Class | Item | Constraint |
0 | GEntryInt | currentPageEntry | 0, 0, 0 =>
"newline , split 7 , alignx Right" 0, 0, 1 => (null) 0, 1 => "gapleft 4 , gapright 4 , gaptop 4 , gapbottom 4 , wmin 50 , wmax 50" |
1 | GLabel | totalPageNumberLabel | "gapleft 4 , gapright 4 , gaptop 4 , gapbottom 4 , wmin 50" |
2 | GButton | prevPageButton | (null) |
3 | GButton | nextPageButton | (null) |
4 | GToggleButton | realtimeButtton | (null) |
5 | GTextArea | textArea | "newline , pushx , pushy , growx , growy" |
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GBufferedTextArea()
Constructor.
|
GBufferedTextArea(int refreshPeriodMs,
int linesPerPage)
Constructor.
|
GBufferedTextArea(int refreshPeriodMs,
int linesPerPage,
File outputFile)
Constructor.
|
GBufferedTextArea(String widgetId)
Constructor.
|
GBufferedTextArea(String widgetId,
int refreshPeriodMs,
int linesPerPage)
Constructor.
|
GBufferedTextArea(String widgetId,
int refreshPeriodMs,
int linesPerPage,
File outputFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
after(GEvent e)
Called after the event is processed.
|
void |
appendLine(String line)
Adds the text to the text area with adding a carriage return at the end.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
generic()
The prototype of the generic function that shall exist in all the descendants.
|
long |
getCurrentDiskPageLine()
getter mCurrentDiskPageLine
|
long |
getCurrentPageBeginOffset()
getter mCurrentPageBeginOffset
|
JTextArea |
getJTextArea()
Get the JTextArea associated with the component.
|
List<String> |
getLineBuffer()
getter m_lineBuffer
|
int |
getLinesPerPage()
getter m_linesPerPage
|
long |
getLinesPerPageWithOverlap()
getter m_linesPerPageWithOverlap
|
RandomAccessFile |
getOutputBufferedWriter()
getter mOutputBufferedWriter
|
File |
getOutputFile()
getter mOutputFile
|
long |
getPageOverlapLines()
getter m_pageOverlapLines
|
int |
getPrevCurrentPage()
getter mPrevCurrentPage
|
long |
getPrevPageBeginOffset()
setter mPrevPageBeginOffset
|
Timer |
getRefreshTimer()
getter mRefreshTimer
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
boolean |
isRefreshTextArea()
getter mRefreshTextArea
|
void |
reset()
Called when the element is to be reset, so it can perform the actions required to return to inital
state.
|
void |
setCurrentDiskPageLine(long currentDiskPageLine)
setter mCurrentDiskPageLine
|
void |
setCurrentPageBeginOffset(long currentPageBeginOffset)
setter mCurrentPageBeginOffset
|
void |
setCursorPositionAtBottom(boolean flag)
Set if the cursor shall be always at the bottom.
|
protected void |
setDefaultConstraints()
Set default constraints.
|
void |
setEditable(boolean b)
Sets the specified boolean to indicate whether or not this TextComponent should be editable.
|
void |
setLines(int linesPerPage,
int overlap)
setter to changes the lines & the overlap
|
void |
setLineWrap(boolean flag)
Sets the specified boolean to indicate whether the lines are wrapped in the widget or not.
|
void |
setPrevCurrentPage(int prevCurrentPage)
setter mPrevCurrentPage
|
void |
setPrevPageBeginOffset(long prevPageBeginOffset)
setter mPrevPageBeginOffset
|
void |
setRefreshTextArea(boolean refreshTextArea)
setter mRefreshTextArea
|
void |
setToolTipText(String text)
Set the tooltip of the GBufferedTextArea.
|
put
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GBufferedTextArea()
public GBufferedTextArea(int refreshPeriodMs, int linesPerPage)
refreshPeriodMs
- delay of refreshing of the text area in milliseconds.linesPerPage
- numbero of lines per text area page.public GBufferedTextArea(int refreshPeriodMs, int linesPerPage, File outputFile)
refreshPeriodMs
- delay of refreshing of the text area in milliseconds.linesPerPage
- numbero of lines per text area page.outputFile
- output file where the text area will also be written.public GBufferedTextArea(String widgetId)
widgetId
- widget identifier.public GBufferedTextArea(String widgetId, int refreshPeriodMs, int linesPerPage)
widgetId
- widget identifier.refreshPeriodMs
- delay of refreshing of the text area in milliseconds.linesPerPage
- numbero of lines per text area page.public GBufferedTextArea(String widgetId, int refreshPeriodMs, int linesPerPage, File outputFile)
widgetId
- widget identifier.refreshPeriodMs
- delay of refreshing of the text area in milliseconds.linesPerPage
- numbero of lines per text area page.outputFile
- output file where the text area will also be written.public long getLinesPerPageWithOverlap()
public long getCurrentDiskPageLine()
public void setCurrentDiskPageLine(long currentDiskPageLine)
currentDiskPageLine
- value to setpublic long getPrevPageBeginOffset()
public void setPrevPageBeginOffset(long prevPageBeginOffset)
prevPageBeginOffset
- value to setpublic long getCurrentPageBeginOffset()
public void setCurrentPageBeginOffset(long currentPageBeginOffset)
currentPageBeginOffset
- value to setpublic boolean isRefreshTextArea()
public void setRefreshTextArea(boolean refreshTextArea)
refreshTextArea
- boolean valuepublic int getPrevCurrentPage()
public void setPrevCurrentPage(int prevCurrentPage)
prevCurrentPage
- value to setpublic List<String> getLineBuffer()
public int getLinesPerPage()
public void setLines(int linesPerPage, int overlap) throws GBufferedTextAreaFileException
linesPerPage
- lines to setoverlap
- is the overlap to display linesGBufferedTextAreaFileException
- exception with outputBufferedWriterpublic long getPageOverlapLines()
public Timer getRefreshTimer()
public RandomAccessFile getOutputBufferedWriter()
public File getOutputFile()
protected final void setDefaultConstraints()
GComponent
setDefaultConstraints
in class GComponent
public void setLineWrap(boolean flag)
setLineWrap
in interface GTextAreaInterface
flag
- true if the lines shall be wrapped, false otherwise.public void setToolTipText(String text)
setToolTipText
in class GComponent
text
- Text to be used in the tooltip.public void appendLine(String line) throws GBufferedTextAreaFileException
appendLine
in interface GTextAreaInterface
line
- to be appended to the text area.GBufferedTextAreaFileException
- if the line can not be written to the file.public final void reset() throws GBufferedTextAreaFileException
reset
in interface GTextAreaInterface
GBufferedTextAreaFileException
- in case of failing to clear the file buffer.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void display() throws GException
display
in interface GDisplay
GException
- in case of problem while reading the value from file.public void generic() throws GException
generic
in class GContainer
GException
- In case of problem.public void before(GEvent e) throws GException
before
in interface GListener
e
- event to processed.GException
- in case there is a problem managing the event.public void after(GEvent e) throws GException
after
in interface GListener
e
- processed event.GException
- in case there is a problem managing the event.public GComponent getSubComponent(int position) throws GComponentException
getSubComponent
in class GComponent
position
- position of the requested component.GComponentException
- in case the position argument is invalid.public JTextArea getJTextArea()
getJTextArea
in interface GTextAreaInterface
public void setEditable(boolean b)
setEditable
in interface GTextAreaInterface
b
- the boolean to be setpublic void setCursorPositionAtBottom(boolean flag)
setCursorPositionAtBottom
in interface GTextAreaInterface
flag
- true it the cursor shall always be at the bottom of the text view, false otherwise.Copyright © 2024. All rights reserved.