public abstract class StyledTextLogic extends Object implements com.ibm.rational.common.test.editor.framework.kernel.actions.ITestEditorActionIDs, LineBackgroundListener, LineStyleListener, ExtendedModifyListener, VerifyListener, MouseListener, MouseTrackListener, DisposeListener, VerifyKeyListener, PaintListener, KeyListener
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ACTION_NEXT_RANGE
Deprecated.
|
protected static int |
ACTION_PREV_RANGE
Deprecated.
|
static String |
EXTENDED_LOGIC
Deprecated.
|
protected MenuManager |
m_mmenu
Deprecated.
|
protected StyledText |
m_st
Deprecated.
|
ACTION_GROUP_EDIT_END, ACTION_GROUP_EDIT_START, ACTION_GROUP_FILTERS_END, ACTION_GROUP_FILTERS_START, ACTION_GROUP_FIND_END, ACTION_GROUP_FIND_START, ACTION_GROUP_GOTO_END, ACTION_GROUP_GOTO_START, ACTION_GROUP_MODIFY_CONTRIBUTIONS_END, ACTION_GROUP_MODIFY_CONTRIBUTIONS_START, ACTION_GROUP_NEW_END, ACTION_GROUP_NEW_START, ACTION_GROUP_SHOW_END, ACTION_GROUP_SHOW_START, COPY, CUT, DELETE, PASTE, SAVE, SELECT_ALL| Constructor and Description |
|---|
StyledTextLogic()
Deprecated.
Creates an instanceof of StyledTextLogic.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(StyleRange sr)
Deprecated.
|
protected void |
addListeners()
Deprecated.
|
protected boolean |
canPerform(int action)
Deprecated.
called by
StyledTextLogicInternalAction. |
protected void |
clear()
Deprecated.
|
static boolean |
containsPoint(int pt,
int start,
int end,
boolean touchLeft,
boolean touchRight)
Deprecated.
|
protected void |
createActions()
Deprecated.
|
protected void |
createKeyBindings()
Deprecated.
|
protected abstract MenuManager |
createMenuManager()
Deprecated.
|
protected void |
doPerform(int action)
Deprecated.
|
protected void |
enableKeyBindings(boolean enable)
Deprecated.
|
protected void |
fillMenu(IMenuManager menu)
Deprecated.
|
Object |
get(int i)
Deprecated.
|
ArrayList |
getHighlights()
Deprecated.
|
protected StyleRange |
getRangeForSelection()
Deprecated.
|
StyledText |
getStyledText()
Deprecated.
|
String |
getText()
Deprecated.
|
protected String |
getToolTipFor(StyleRange sr)
Deprecated.
|
protected StyleRange |
isCursorInRange(boolean touchFirst,
boolean touchLast)
Deprecated.
|
protected StyleRange |
isMouseInRange(Point p)
Deprecated.
|
protected boolean |
isSelectionOverlapsWithRangesEx(boolean touchLeft,
boolean touchRight)
Deprecated.
|
void |
keyPressed(KeyEvent e)
Deprecated.
|
void |
keyReleased(KeyEvent e)
Deprecated.
|
void |
lineGetBackground(LineBackgroundEvent event)
Deprecated.
|
void |
lineGetStyle(LineStyleEvent event)
Deprecated.
|
void |
modifyText(ExtendedModifyEvent event)
Deprecated.
|
void |
mouseDoubleClick(MouseEvent e)
Deprecated.
If user double-clicks mouse inside any range (including right edge),
select the range text, otherwise, do default.
|
void |
mouseDown(MouseEvent e)
Deprecated.
If Right mouse button is down, display menu, if the StyledText has one.
|
void |
mouseEnter(MouseEvent e)
Deprecated.
|
void |
mouseExit(MouseEvent e)
Deprecated.
|
void |
mouseHover(MouseEvent e)
Deprecated.
|
void |
mouseUp(MouseEvent e)
Deprecated.
|
void |
paintControl(PaintEvent e)
Deprecated.
|
Object |
remove(int i)
Deprecated.
|
boolean |
remove(Object o)
Deprecated.
|
protected void |
removeListeners()
Deprecated.
|
void |
setStyledText(StyledText text)
Deprecated.
|
void |
setText(String text)
Deprecated.
|
protected void |
setTooltipText(int x,
int y)
Deprecated.
|
protected abstract int |
shift(int start,
int len,
int shift,
String replacedText)
Deprecated.
|
int |
size()
Deprecated.
|
protected void |
updateActions()
Deprecated.
|
void |
verifyKey(VerifyEvent event)
Deprecated.
checks that if typing the key will change the style range.
|
void |
verifyText(VerifyEvent event)
Deprecated.
Enable the change
|
void |
widgetDisposed(DisposeEvent e)
Deprecated.
|
public static final String EXTENDED_LOGIC
protected StyledText m_st
protected static final int ACTION_NEXT_RANGE
protected static final int ACTION_PREV_RANGE
protected MenuManager m_mmenu
public StyledTextLogic()
setStyledText method.protected void createActions()
protected abstract MenuManager createMenuManager()
protected void updateActions()
protected void createKeyBindings()
public void paintControl(PaintEvent e)
paintControl in interface PaintListenerpublic void lineGetBackground(LineBackgroundEvent event)
lineGetBackground in interface LineBackgroundListenerpublic void lineGetStyle(LineStyleEvent event)
lineGetStyle in interface LineStyleListenerpublic void modifyText(ExtendedModifyEvent event)
modifyText in interface ExtendedModifyListenerprotected abstract int shift(int start,
int len,
int shift,
String replacedText)
shift - public void verifyText(VerifyEvent event)
verifyText in interface VerifyListenerVerifyListener.verifyText(org.eclipse.swt.events.VerifyEvent)public void mouseDoubleClick(MouseEvent e)
mouseDoubleClick in interface MouseListenerMouseListener.mouseDoubleClick(org.eclipse.swt.events.MouseEvent)public void mouseDown(MouseEvent e)
mouseDown in interface MouseListenerMouseListener.mouseDown(org.eclipse.swt.events.MouseEvent)public void mouseUp(MouseEvent e)
mouseUp in interface MouseListenerpublic void mouseEnter(MouseEvent e)
mouseEnter in interface MouseTrackListenerpublic void mouseExit(MouseEvent e)
mouseExit in interface MouseTrackListenerpublic void mouseHover(MouseEvent e)
mouseHover in interface MouseTrackListenerprotected void setTooltipText(int x,
int y)
protected String getToolTipFor(StyleRange sr)
sr - public StyledText getStyledText()
public void setStyledText(StyledText text)
text - protected void fillMenu(IMenuManager menu)
menu - IMenuManagerprotected void enableKeyBindings(boolean enable)
enable - protected void removeListeners()
protected void addListeners()
public void widgetDisposed(DisposeEvent e)
widgetDisposed in interface DisposeListenerpublic String getText()
public void setText(String text)
public boolean add(StyleRange sr)
protected StyleRange isCursorInRange(boolean touchFirst, boolean touchLast)
touchFirst - boolean cursor is on the left edge.touchLast - boolean cursor is at the right edge.null otherwiseprotected StyleRange getRangeForSelection()
protected StyleRange isMouseInRange(Point p)
null otherwiseprotected boolean isSelectionOverlapsWithRangesEx(boolean touchLeft,
boolean touchRight)
touchLeft - boolean check if selection starts at the same offset as any of possible overlapped ranges.touchRight - boolean check if selection ends at the same offset as any of possible overlapped ranges.true if selection exists and overlaps with one or more ranges. false if
there is no selection or if selection does not overlap with any ranges.public static boolean containsPoint(int pt,
int start,
int end,
boolean touchLeft,
boolean touchRight)
pt - start - end - touchLeft - touchRight - public void verifyKey(VerifyEvent event)
verifyKey in interface VerifyKeyListenerVerifyKeyListener.verifyKey(org.eclipse.swt.events.VerifyEvent)protected boolean canPerform(int action)
StyledTextLogicInternalAction. Extending classes should override.action - one of the supported actions (ST.COPY, ST.CUT, ST.PASTE, ST.SELECT_ALL, ST.DELETE_NEXT)true if action is allowed, false otherwise.protected void doPerform(int action)
public void keyPressed(KeyEvent e)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenerpublic ArrayList getHighlights()
public int size()
protected void clear()
public Object get(int i)
public Object remove(int i)
public boolean remove(Object o)
© Copyright IBM Corp. 2013. All rights reserved.