|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
edu.princeton.swing.PHighlightedTextArea.InternalTextArea
protected class PHighlightedTextArea.InternalTextArea
InternalTextArea is the subcomponent of PHighlightedTextArea which shows the editable program code.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
protected |
PHighlightedTextArea.InternalTextArea()
|
| Method Summary | |
|---|---|
boolean |
canCopy()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
boolean |
canCut()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
boolean |
canPaste()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
boolean |
canSelectAll()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
void |
copy()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
void |
cut()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
void |
doRender(char[] chars,
byte[] charStyles,
int charCount,
short[] lineOffsets,
int lineCount,
Object extraInfo)
Paints the TextArea using the protected data of the document. |
Dimension |
getPreferredScrollableViewportSize()
Implement scrollable to make the viewport's preferred size that of the InternalTextArea's. |
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
Implement scrollable to make the block increment a full page. |
boolean |
getScrollableTracksViewportHeight()
Implement scrollable to make the InternalTextArea's size the greater of its own size and its viewport's size. |
boolean |
getScrollableTracksViewportWidth()
Implement scrollable to make the InternalTextArea's size the greater of its own size and its viewport's size. |
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
Implement scrollable to make the unit increment a tenth of a page. |
boolean |
isFocusTraversable()
|
boolean |
isManagingFocus()
|
void |
paintComponent(Graphics g)
Override the paintComponent() function of JComponent. |
void |
paste()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
protected void |
processFocusEvent(FocusEvent e)
Intercept FocusEvents to notify the ClipboardTargetManager of the event. |
protected void |
processKeyEvent(KeyEvent e)
Intercept KeyEvents to perform the usual action. |
protected void |
processMouseEvent(MouseEvent e)
Intercept mouse clicks to perform the usual action. |
protected void |
processMouseMotionEvent(MouseEvent e)
Intercept mouse dragging to perform the usual action. |
void |
run()
Implement runnable to blink the caret. |
void |
selectAll()
Implement ClipboardTarget to pass clipboard requests to the JHighlghtedTextArea. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected PHighlightedTextArea.InternalTextArea()
| Method Detail |
|---|
public boolean isManagingFocus()
isManagingFocus in class JComponentJComponent.isManagingFocus()public boolean isFocusTraversable()
isFocusTraversable in class ComponentComponent.isFocusTraversable()public void paintComponent(Graphics g)
paintComponent in class JComponentpublic boolean canCut()
canCut in interface ClipboardTargetpublic void cut()
cut in interface ClipboardTargetpublic boolean canCopy()
canCopy in interface ClipboardTargetpublic void copy()
copy in interface ClipboardTargetpublic boolean canPaste()
canPaste in interface ClipboardTargetpublic void paste()
paste in interface ClipboardTargetpublic boolean canSelectAll()
canSelectAll in interface ClipboardTargetpublic void selectAll()
selectAll in interface ClipboardTarget
public void doRender(char[] chars,
byte[] charStyles,
int charCount,
short[] lineOffsets,
int lineCount,
Object extraInfo)
doRender in interface HighlightedDocumentRendererchars - The characters in the document.charStyles - The style index of each character in the document.charCount - The number of characters in the document.lineOffsets - The offsets of the first character of each line.lineCount - The number of lines in the document.extraInfo - The graphics object on which to paint.HighlightedDocument.allowRender(HighlightedDocumentRenderer, Object)public void run()
run in interface Runnablepublic Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface Scrollable
public int getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface Scrollable
public int getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
getScrollableBlockIncrement in interface Scrollablepublic boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth in interface Scrollablepublic boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight in interface Scrollableprotected void processFocusEvent(FocusEvent e)
processFocusEvent in class Componentprotected void processKeyEvent(KeyEvent e)
processKeyEvent in class JComponentprotected void processMouseEvent(MouseEvent e)
processMouseEvent in class JComponentprotected void processMouseMotionEvent(MouseEvent e)
processMouseMotionEvent in class JComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||