|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITextLocator
Locates(draws) text into (segment of) one text line. Supposed to implement by classes drawing text into segment of line. Characters of text are indexed. First character have index 0. All methods works with rendered(drawn) text.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure |
---|
org.eclipse.draw2d.IFigure.NoInsets |
Field Summary |
---|
Fields inherited from interface org.eclipse.draw2d.IFigure |
---|
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Method Summary | |
---|---|
org.eclipse.draw2d.geometry.Point |
getEnd(int charIndex)
Returns top right point of rectangle bounding character with index charIndex. |
int |
getNearestCharGapIndexAtPos(int x)
Computes index of nearest chararacter gap placed at given horizontal x coordinate. |
int |
getNearestCharIndexAtPos(int x)
Computes index of nearest character placed at given horizontal x coordinate. |
org.eclipse.draw2d.geometry.Point |
getStart(int charIndex)
Returns top left point of rectangle bounding character with index charIndex. |
String |
getText()
Returns text located by this ITextLocator |
org.eclipse.draw2d.geometry.Rectangle |
getTextBounds()
Bounds of whole text. |
org.eclipse.draw2d.geometry.Rectangle |
getTextBounds(int start,
int end)
Computes bounds of text substring between start and
end . |
void |
updateText(String text)
Stores the new Text. |
Methods inherited from interface sk.uniba.euromath.editor.figures.IEMFigure |
---|
getID, getModel, needsEditPart |
Methods inherited from interface org.eclipse.draw2d.IFigure |
---|
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate |
Method Detail |
---|
org.eclipse.draw2d.geometry.Point getStart(int charIndex)
charIndex
- index of character in text, charIndex have to be
correct index - non negative and less than text length
org.eclipse.draw2d.geometry.Point getEnd(int charIndex)
charIndex
- index of character in text, charIndex have to be
correct index - non negative and less than text length
int getNearestCharIndexAtPos(int x)
x
- horizontal relative coordinate
x
int getNearestCharGapIndexAtPos(int x)
x
- horizontal relative coordinate
x
org.eclipse.draw2d.geometry.Rectangle getTextBounds()
org.eclipse.draw2d.geometry.Rectangle getTextBounds(int start, int end)
start
and
end
. This substring includes character with index
start
,but don't include character with index
end
.
start
- index of first character in result boundsend
- index of first character that is not in result bounds
String getText()
void updateText(String text)
text
- newText
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |