| |
|
| java.lang.Object org.netbeans.editor.EditorUI
All known Subclasses: org.netbeans.editor.ext.ExtEditorUI,
Inner Class :static class ComponentLock | |
Method Summary | |
public boolean | addLayer(DrawLayer layer, int visibility) Add new layer and use its priority to position it in the chain. | public void | addPropertyChangeListener(PropertyChangeListener l) | public void | addPropertyChangeListener(String propertyName, PropertyChangeListener l) | public void | adjustCaret(int percentFromWindowTop) Set the dot according to the currently visible screen window. | public void | adjustWindow(int caretPercentFromWindowTop) | public void | caretMoveDot(int offset, Rectangle scrollRect, int scrollPolicy) Set the position of the caret and scroll the extent if necessary.
Parameters: offset - position where the caret should be placed Parameters: scrollRect - rectangle that should become visible. | public void | caretSetDot(int offset, Rectangle scrollRect, int scrollPolicy) Set the position of the caret and scroll the extent if necessary.
Parameters: offset - position where the caret should be placed Parameters: scrollRect - rectangle that should become visible. | void | checkLineLimit() | protected Map | createColoringMap() | public DrawLayer | findLayer(String layerName) | final protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) | public Abbrev | getAbbrev() | public Coloring | getColoring(String coloringName) | public Map | getColoringMap() | final public JTextComponent | getComponent() | public Object | getComponentLock() Get the lock assuring the component will not be changed by
installUI() or uninstallUI(). | public Coloring | getDefaultColoring() | final public BaseDocument | getDocument() Get the document to work on. | final DrawLayerList | getDrawLayerList() | public JComponent | getExtComponent() Create or get extended editor component. | public Rectangle | getExtentBounds() | public Rectangle | getExtentBounds(Rectangle r) Get position of the component extent. | public int | getLineAscent() | public int | getLineHeight() | public int | getLineNumberDigitWidth() | public Insets | getLineNumberMargin() | public static Frame | getParentFrame(Component c) | public Object | getProperty(Object key) | protected static Map | getSharedColoringMap(Class kitClass) Gets the coloring map that can be shared by the components with the same
kit. | public StatusBar | getStatusBar() | public Insets | getTextMargin() | public WordMatch | getWordMatch() | public boolean | hasExtComponent() Whether this ui uses extComponent or not. | protected void | installUI(JTextComponent c) Called when the BaseTextUI is being installed into the
component. | boolean | isFontsInited() Return whether the fonts are already initialized or not. | public boolean | isGlyphGutterVisible() | public boolean | isLineNumberEnabled() | protected void | modelChanged(BaseDocument oldDoc, BaseDocument newDoc) | protected void | paint(Graphics g) This method is called by textui to do the paint. | public void | propertyChange(PropertyChangeEvent evt) | public void | putProperty(Object key, Object value) | public DrawLayer | removeLayer(String layerName) | public void | removePropertyChangeListener(PropertyChangeListener l) | public void | removePropertyChangeListener(String propertyName, PropertyChangeListener l) | public void | repaint(int startY) | public void | repaint(int startY, int height) | public void | repaintBlock(int startPos, int endPos) Repaint the block between the given positions. | public void | repaintOffset(int pos) | public void | scrollRectToVisible(Rectangle r, int scrollPolicy) | boolean | scrollRectToVisibleFragile(Rectangle r, int scrollPolicy) | void | setExtentPosition(int x, int y) | public void | setLineNumberEnabled(boolean lineNumberEnabled) | public void | settingsChange(SettingsChangeEvent evt) | public void | stateChanged(ChangeEvent evt) | protected void | uninstallUI(JTextComponent c) Called when the BaseTextUI is being uninstalled from the
component. | protected void | update(Graphics g) | public void | updateLineNumberWidth(int maxDigitCount) Update the width that will be occupied by the line number.
Parameters: maxDigitCount - maximum digit count that can the line number have. | protected void | updateScrollPaneCornerColor() | public void | updateTextMargin() | public boolean | updateVirtualHeight(int height) Possibly update virtual height. | public boolean | updateVirtualWidth(int width) Possibly update virtual width. |
COMPONENT_PROPERTY | final public static String COMPONENT_PROPERTY(Code) | | |
OVERWRITE_MODE_PROPERTY | final public static String OVERWRITE_MODE_PROPERTY(Code) | | |
SCROLL_DEFAULT | final public static int SCROLL_DEFAULT(Code) | | Default scrolling type is used for the standard setDot() call. If the
area is on the screen, it jumps to it, otherwise it centers the requested
area vertically in the middle of the window and it uses smallest covering
on the right side.
|
SCROLL_FIND | final public static int SCROLL_FIND(Code) | | Scrolling type for find operations, that can request additional
configurable area in each direction, so the context around is visible
too.
|
SCROLL_MOVE | final public static int SCROLL_MOVE(Code) | | Scrolling type used for regular caret moves. The scrollJump is used when
the caret requests area outside the screen.
|
SCROLL_SMALLEST | final public static int SCROLL_SMALLEST(Code) | | Scrolling type where the smallest covering for the requested rectangle is
used. It's useful for going to the end of the line for example.
|
defaultSpaceWidth | int defaultSpaceWidth(Code) | | Width of the space in the default coloring's font
|
highlightSearch | boolean highlightSearch(Code) | | Should the search words be colored?
|
lineNumberDigitWidth | int lineNumberDigitWidth(Code) | | Width of one digit used for line numbering. It's based on the information
from the line coloring.
|
lineNumberEnabled | boolean lineNumberEnabled(Code) | | Enable displaying line numbers. Both this flag and
lineNumberVisibleSetting must be true to have the line numbers
visible in the window. This flag is false by default. It's turned on
automatically if the getExtComponent is called.
|
lineNumberMargin | Insets lineNumberMargin(Code) | | Margin on the left and right side of the line number
|
lineNumberMaxDigitCount | int lineNumberMaxDigitCount(Code) | | Current maximum count of digits in line number
|
lineNumberVisible | boolean lineNumberVisible(Code) | | Whether to show line numbers or not. This flag is obtained using bitwise
AND operation on lineNumberEnabled flag and lineNumberVisibleSetting
flag.
|
lineNumberVisibleSetting | boolean lineNumberVisibleSetting(Code) | | This flag corresponds to the LINE_NUMBER_VISIBLE setting.
|
lineNumberWidth | int lineNumberWidth(Code) | | Line number total width with indentation. It includes left and right
line-number margins and lineNumberDigitWidth * lineNumberMaxDigitCount.
|
scrollFindInsets | Insets scrollFindInsets(Code) | | How much columns/lines to add when the scroll is performed so that the
component is not scrolled so often. Negative number means portion of the
extent width/height
|
scrollJumpInsets | Insets scrollJumpInsets(Code) | | How much columns/lines to add when the scroll is performed so that the
component is not scrolled so often. Negative number means portion of the
extent width/height
|
textLeftMarginWidth | int textLeftMarginWidth(Code) | | Margin between the line-number bar and the text.
|
textLimitLineVisible | boolean textLimitLineVisible(Code) | | |
textLimitWidth | int textLimitWidth(Code) | | |
textMargin | Insets textMargin(Code) | | This is the full margin around the text. The left margin is an addition
of component's margin and lineNumberWidth and textLeftMarginWidth.
|
virtualSize | Rectangle virtualSize(Code) | | This is the size of the editor as component while the real size of the
lines edited can be lower. The reason why to use this virtual size is
that each resizing of the component means revalidating and therefore
repainting of the whole component.
|
virtualSizeUpdated | boolean virtualSizeUpdated(Code) | | Flag saying whether either the width or height in virtualSize were
updated.
|
EditorUI | public EditorUI()(Code) | | Construct extended UI for the use with a text component
|
EditorUI | public EditorUI(BaseDocument printDoc)(Code) | | Construct extended UI for printing the given document
|
addLayer | public boolean addLayer(DrawLayer layer, int visibility)(Code) | | Add new layer and use its priority to position it in the chain. If
there's the layer with same visibility then the inserted layer will be
placed after it.
Parameters: layer - layer to insert into the chain |
adjustCaret | public void adjustCaret(int percentFromWindowTop)(Code) | | Set the dot according to the currently visible screen window. #param
percentFromWindowTop percentage giving the distance of the caret from the
top of the currently visible window.
|
adjustWindow | public void adjustWindow(int caretPercentFromWindowTop)(Code) | | |
caretMoveDot | public void caretMoveDot(int offset, Rectangle scrollRect, int scrollPolicy)(Code) | | Set the position of the caret and scroll the extent if necessary.
Parameters: offset - position where the caret should be placed Parameters: scrollRect - rectangle that should become visible. It can be null when noscrolling should be done. Parameters: scrollPolicy - policy to be used when scrolling. |
caretSetDot | public void caretSetDot(int offset, Rectangle scrollRect, int scrollPolicy)(Code) | | Set the position of the caret and scroll the extent if necessary.
Parameters: offset - position where the caret should be placed Parameters: scrollRect - rectangle that should become visible. It can be null when noscrolling should be done. Parameters: scrollPolicy - policy to be used when scrolling. |
checkLineLimit | void checkLineLimit()(Code) | | |
createColoringMap | protected Map createColoringMap()(Code) | | |
findLayer | public DrawLayer findLayer(String layerName)(Code) | | Find the layer with some layer name in the layer hierarchy
|
getColoringMap | public Map getColoringMap()(Code) | | |
getComponentLock | public Object getComponentLock()(Code) | | Get the lock assuring the component will not be changed by
installUI() or uninstallUI(). It's useful for the
classes that want to listen for the component change in EditorUI.
|
getDocument | final public BaseDocument getDocument()(Code) | | Get the document to work on. Either component's document or printed
document is returned. It can return null in case the component's document
is not instance of BaseDocument.
|
getExtComponent | public JComponent getExtComponent()(Code) | | Create or get extended editor component. The extended component should
normally be used for editing files instead of just the JEditorPane
because it offers status bar and possibly other useful components. The
getExtComponent() should not be used when the JEditorPane is included in
dialog.
See Also: EditorUI.hasExtComponent() |
getExtentBounds | public Rectangle getExtentBounds(Rectangle r)(Code) | | Get position of the component extent. The (x, y) are set to (0, 0) if
there's no viewport or (-x, -y) if there's one.
|
getLineAscent | public int getLineAscent()(Code) | | |
getLineHeight | public int getLineHeight()(Code) | | |
getLineNumberDigitWidth | public int getLineNumberDigitWidth()(Code) | | Returns width of the one digit
|
getLineNumberMargin | public Insets getLineNumberMargin()(Code) | | Returns the line number margin
|
getParentFrame | public static Frame getParentFrame(Component c)(Code) | | Finds the frame - parent of editor component
|
getSharedColoringMap | protected static Map getSharedColoringMap(Class kitClass)(Code) | | Gets the coloring map that can be shared by the components with the same
kit. Only the component coloring map is provided.
|
getTextMargin | public Insets getTextMargin()(Code) | | Get the begining of the area covered by text
|
installUI | protected void installUI(JTextComponent c)(Code) | | Called when the BaseTextUI is being installed into the
component.
|
isFontsInited | boolean isFontsInited()(Code) | | Return whether the fonts are already initialized or not.
|
isGlyphGutterVisible | public boolean isGlyphGutterVisible()(Code) | | Is glyph gutter created and visible for the document or not
|
isLineNumberEnabled | public boolean isLineNumberEnabled()(Code) | | |
paint | protected void paint(Graphics g)(Code) | | This method is called by textui to do the paint. It is forwarded either
to paint through the image and then copy the image area to the screen or
to paint directly to this graphics. The real work occurs in draw-engine.
|
repaint | public void repaint(int startY)(Code) | | |
repaint | public void repaint(int startY, int height)(Code) | | |
repaintBlock | public void repaintBlock(int startPos, int endPos) throws BadLocationException(Code) | | Repaint the block between the given positions.
|
scrollRectToVisible | public void scrollRectToVisible(Rectangle r, int scrollPolicy)(Code) | | |
scrollRectToVisibleFragile | boolean scrollRectToVisibleFragile(Rectangle r, int scrollPolicy)(Code) | | Must be called with EventDispatchThread
|
setExtentPosition | void setExtentPosition(int x, int y)(Code) | | |
setLineNumberEnabled | public void setLineNumberEnabled(boolean lineNumberEnabled)(Code) | | |
uninstallUI | protected void uninstallUI(JTextComponent c)(Code) | | Called when the BaseTextUI is being uninstalled from the
component.
|
updateLineNumberWidth | public void updateLineNumberWidth(int maxDigitCount)(Code) | | Update the width that will be occupied by the line number.
Parameters: maxDigitCount - maximum digit count that can the line number have. if it'slower or equal to zero it will be computed automatically. |
updateScrollPaneCornerColor | protected void updateScrollPaneCornerColor()(Code) | | |
updateTextMargin | public void updateTextMargin()(Code) | | |
updateVirtualHeight | public boolean updateVirtualHeight(int height)(Code) | | Possibly update virtual height. If the height is really updated, the
method returns true. There is a slight difference against virtual width
in that if the height is shrinked too much the virtual height is shrinked
too. 0 can be used to update to the real height.
|
updateVirtualWidth | public boolean updateVirtualWidth(int width)(Code) | | Possibly update virtual width. If the width is really updated, the method
returns true.
|
|
|
|