mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javadocs
This commit is contained in:
+7
@@ -24,6 +24,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Performs transformations between various location representations in editor
|
||||
* (offset, logical position, visual position, pixel coordinates).
|
||||
*
|
||||
* @see LogicalPosition
|
||||
* @see VisualPosition
|
||||
*/
|
||||
class EditorCoordinateMapper {
|
||||
private final EditorView myView;
|
||||
private final Document myDocument;
|
||||
|
||||
@@ -43,6 +43,9 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Renders editor contents.
|
||||
*/
|
||||
class EditorPainter {
|
||||
private static final Stroke IME_COMPOSED_TEXT_UNDERLINE_STROKE = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 0,
|
||||
new float[]{0, 2, 0, 2}, 0);
|
||||
|
||||
+3
@@ -34,6 +34,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.awt.*;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Calculates width (in pixels) of editor contents.
|
||||
*/
|
||||
class EditorSizeManager implements PrioritizedDocumentListener, Disposable, FoldingListener {
|
||||
private final EditorView myView;
|
||||
private final EditorImpl myEditor;
|
||||
|
||||
+4
@@ -23,6 +23,10 @@ import java.awt.*;
|
||||
import java.awt.font.FontRenderContext;
|
||||
import java.awt.font.GlyphVector;
|
||||
|
||||
/**
|
||||
* Encapsulates logic related to font metrics. Mock instance can be used in tests to make them independent on font properties on particular
|
||||
* platform.
|
||||
*/
|
||||
public abstract class FontLayoutService {
|
||||
private static final FontLayoutService DEFAULT_INSTANCE = new DefaultFontLayoutService();
|
||||
private static FontLayoutService INSTANCE = DEFAULT_INSTANCE;
|
||||
|
||||
@@ -42,6 +42,10 @@ import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Iterator over editor's text contents. Each iteration step corresponds to a text fragment having common graphical attributes
|
||||
* (font style, foreground and background color, effect type and color).
|
||||
*/
|
||||
// This class should replace com.intellij.openapi.editor.impl.IterationState when new editor rendering engine will become default
|
||||
public class IterationState {
|
||||
private static final Logger LOG = Logger.getInstance(IterationState.class);
|
||||
|
||||
+4
@@ -25,6 +25,10 @@ import java.awt.*;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* Iterator over visual line's fragments. Fragment's text has the same font and directionality. Collapsed fold regions are also represented
|
||||
* as fragments.
|
||||
*/
|
||||
class VisualLineFragmentsIterator implements Iterator<VisualLineFragmentsIterator.Fragment> {
|
||||
|
||||
static Iterable<Fragment> create(final EditorView view, final int offset) {
|
||||
|
||||
Reference in New Issue
Block a user