public class TextListView extends TextView implements ListModelListener
TextListView class implements a view of a MVC model for
the text list. The model of the MVC model is a TextListModel
object and the controller of the MVC model is a
TextListController object.TextListModel,
TextListController,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected TextListController |
controller |
protected boolean |
lineSelectionVisible |
protected TextListModel |
model |
protected VDashedBorder |
visibleBorder |
protected TextPositionInfo |
visiblePosition |
_visibleBegin, _visibleEnd, DEFAULT_BACKGROUND, DEFAULT_FOREGROUND, DEFAULT_SELECTION_BACKGROUND, DEFAULT_SELECTION_FOREGROUND, layout, lineWrap, offset, scrolledDown, scrolledLeft, scrolledRight, scrolledUp, scrollListeners, selectionBackground, selectionForeground, selectionShowing, selectionVisibleDefaultToolkit, doubleBuffered, focusTraversable, offscreenBuffer, toolTip| コンストラクタと説明 |
|---|
TextListView(TextListModel textListModel)
Constructs a text list view with the specified text list model.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addNotify()
Notifies this view that it has been added to a container.
|
protected TextLayout |
createTextLayout()
Creates a
TextLayout object. |
TextListController |
getController()
Returns the controller of this view.
|
protected int |
getLineIndexNearby(TextPositionInfo posInfo,
int textIndex)
Returns the line index for the specified text index nearby the specified
text position.
|
protected int |
getLineIndexNearby(TextPositionInfo posInfo,
java.awt.Point point)
Returns the line index for the specified point nearby the specified
text position.
|
TextListModel |
getModel()
Returns the model of this view.
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this view.
|
RichText |
getRichText()
Returns the
RichText object being viewed. |
protected int[] |
getSelectedForPaint()
Returns the selected indices for the paint operation.
|
protected TextPositionInfo |
getTextPositionAtLineBegin(int lineIndex)
Returns the text position at the beginning of the line.
|
protected int |
getVisibleIndex()
Returns the visible index.
|
protected TextPositionInfo |
getVisiblePosition()
Returns the visible text position.
|
protected void |
hideSelection()
Hides the selection.
|
boolean |
isLineSelectionVisible()
Tests if the line selection is visible.
|
void |
listModelChanged(ListModelEvent event)
Invoked when the list model has been changed.
|
protected boolean |
needsToRedrawSelection()
Tests if the selection is needed to be redrawn.
|
protected void |
paint(java.awt.Graphics g,
TextPositionInfo begin,
TextPositionInfo end)
Paints this view with the specified range.
|
protected void |
paintAfterReplaced(TextLayoutChange change)
Paints this view after the text list model has been replaced.
|
protected void |
paintLine(int lineIndex,
boolean select)
Paints the line at the specified index with the flag indicating that
the line is selected.
|
protected void |
resetLocationOfText()
Resets the location of the layout text.
|
void |
setController(TextListController controller)
Sets the controller of this view.
|
void |
setFont(java.awt.Font f)
Sets the font of this view.
|
void |
setLineSelectionVisible(boolean b)
Makes the line selection visible.
|
protected void |
setTextLayout(TextLayout layout)
Sets the
TextLayout object of this view. |
protected void |
setVisibleIndex(int index)
Sets the visible index.
|
protected void |
setVisiblePosition(TextPositionInfo posInfo)
Sets the visible text position.
|
protected void |
showSelection()
Shows the selection.
|
protected void |
toggleVisibleRectangle()
Shows or hides the visible rectangle.
|
protected void |
updateAfterReplaced(TextListModelEvent event)
Updates this view after the text list model has been replaced.
|
addScrollListener, getColumns, getHBlockIncrement, getHMaximum, getHMinimum, getHUnitIncrement, getHValue, getHVisibleAmount, getLineWrap, getLocationOfText, getMinimumSize, getPreferredHeight, getPreferredSize, getPreferredWidth, getRows, getScrollXTo, getScrollYTo, getSelectionBackground, getSelectionForeground, getTextLineAt, getTextPositionAt, getTextPositionAt, getTextPositionNearby, getTextPositionNearby, getTextPositionNextTo, getTextPositionPrevTo, getVBlockIncrement, getVisibleBegin, getVisibleEnd, getVMaximum, getVMinimum, getVUnitIncrement, getVValue, getVVisibleAmount, isFocusTraversable, isSelectionVisible, layoutResized, notifyScrollListeners, paintOn, removeScrollListener, scrollTo, scrollTo, scrollX, scrollX, scrollXTo, scrollXTo, scrollY, scrollY, scrollYTo, scrollYTo, setBounds, setHValue, setLineWrap, setLineWrapInner, setLocale, setLocationOfText, setSelectionBackground, setSelectionForeground, setSelectionVisible, setVValuebounds, disable, doLayout, enable, enable, getBounds, getFrame, getLocation, getPreferredGraphics, getPreferredGraphics, getSize, getToolTipText, getToolTipVisual, hide, isDirectNotification, isDoubleBuffered, layout, location, minimumSize, paint, postOldEvent, preferredSize, processMouseEvent, processMouseMotionEvent, repaintNow, requestFocus, reshape, setBackground, setDoubleBuffered, setEnabled, setFocusTraversable, setForeground, setToolTipText, setToolTipText, setToolTipVisual, setVisible, show, show, size, syncGraphics, syncGraphics, syncGraphics, updateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disableEvents, dispatchEvent, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, list, list, locate, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validateprotected TextListModel model
protected TextListController controller
protected boolean lineSelectionVisible
protected VDashedBorder visibleBorder
protected transient TextPositionInfo visiblePosition
public TextListView(TextListModel textListModel)
textListModel - the text list model.public RichText getRichText()
RichText object being viewed.getRichText クラス内 TextViewprotected TextLayout createTextLayout()
TextLayout object.createTextLayout クラス内 TextViewpublic TextListModel getModel()
public TextListController getController()
public void setController(TextListController controller)
public void listModelChanged(ListModelEvent event)
listModelChanged インタフェース内 ListModelListenerListModelListenerprotected void setTextLayout(TextLayout layout)
TextLayout object of this view.setTextLayout クラス内 TextViewpublic boolean isLineSelectionVisible()
public void setLineSelectionVisible(boolean b)
protected TextPositionInfo getVisiblePosition()
protected void setVisiblePosition(TextPositionInfo posInfo)
protected int getVisibleIndex()
protected void setVisibleIndex(int index)
protected void resetLocationOfText()
resetLocationOfText クラス内 TextViewpublic java.awt.Dimension getPreferredSize()
getPreferredSize クラス内 TextViewpublic void addNotify()
addNotify クラス内 KComponentAWTResources.checkComponentState(java.awt.Component)public void setFont(java.awt.Font f)
setFont クラス内 java.awt.Componentprotected void paint(java.awt.Graphics g,
TextPositionInfo begin,
TextPositionInfo end)
protected void showSelection()
showSelection クラス内 TextViewprotected void hideSelection()
hideSelection クラス内 TextViewprotected void toggleVisibleRectangle()
protected void paintLine(int lineIndex,
boolean select)
protected void updateAfterReplaced(TextListModelEvent event)
protected void paintAfterReplaced(TextLayoutChange change)
protected final int[] getSelectedForPaint()
protected boolean needsToRedrawSelection()
needsToRedrawSelection クラス内 TextViewprotected int getLineIndexNearby(TextPositionInfo posInfo, int textIndex)
protected int getLineIndexNearby(TextPositionInfo posInfo, java.awt.Point point)
protected TextPositionInfo getTextPositionAtLineBegin(int lineIndex)