IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.testeditor.common
Class StyledTextLogic

java.lang.Object
  extended by com.ibm.rational.test.lt.testeditor.common.StyledTextLogic
All Implemented Interfaces:
com.ibm.rational.common.test.editor.framework.kernel.actions.ITestEditorActionIDs, EventListener, ExtendedModifyListener, LineBackgroundListener, LineStyleListener, VerifyKeyListener, DisposeListener, KeyListener, MouseListener, MouseTrackListener, PaintListener, VerifyListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
ExtendedStyledText

Deprecated. use field support instead

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


Field Summary
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.  
 
Fields inherited from interface com.ibm.rational.common.test.editor.framework.kernel.actions.ITestEditorActionIDs
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 Summary
StyledTextLogic()
          Deprecated. Creates an instanceof of StyledTextLogic.
 
Method Summary
 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.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENDED_LOGIC

public static final String EXTENDED_LOGIC
Deprecated. 
See Also:
Constant Field Values

m_st

protected StyledText m_st
Deprecated. 

ACTION_NEXT_RANGE

protected static final int ACTION_NEXT_RANGE
Deprecated. 
See Also:
Constant Field Values

ACTION_PREV_RANGE

protected static final int ACTION_PREV_RANGE
Deprecated. 
See Also:
Constant Field Values

m_mmenu

protected MenuManager m_mmenu
Deprecated. 
Constructor Detail

StyledTextLogic

public StyledTextLogic()
Deprecated. 
Creates an instanceof of StyledTextLogic. Called is expected to call setStyledText method.

Method Detail

createActions

protected void createActions()
Deprecated. 

createMenuManager

protected abstract MenuManager createMenuManager()
Deprecated. 
Returns:
MenuManager

updateActions

protected void updateActions()
Deprecated. 

createKeyBindings

protected void createKeyBindings()
Deprecated. 

paintControl

public void paintControl(PaintEvent e)
Deprecated. 
Specified by:
paintControl in interface PaintListener

lineGetBackground

public void lineGetBackground(LineBackgroundEvent event)
Deprecated. 
Specified by:
lineGetBackground in interface LineBackgroundListener

lineGetStyle

public void lineGetStyle(LineStyleEvent event)
Deprecated. 
Specified by:
lineGetStyle in interface LineStyleListener

modifyText

public void modifyText(ExtendedModifyEvent event)
Deprecated. 
Specified by:
modifyText in interface ExtendedModifyListener

shift

protected abstract int shift(int start,
                             int len,
                             int shift,
                             String replacedText)
Deprecated. 
Parameters:
shift -
Returns:
0

verifyText

public void verifyText(VerifyEvent event)
Deprecated. 
Enable the change

Specified by:
verifyText in interface VerifyListener
See Also:
VerifyListener.verifyText(org.eclipse.swt.events.VerifyEvent)

mouseDoubleClick

public void mouseDoubleClick(MouseEvent e)
Deprecated. 
If user double-clicks mouse inside any range (including right edge), select the range text, otherwise, do default.

Specified by:
mouseDoubleClick in interface MouseListener
See Also:
MouseListener.mouseDoubleClick(org.eclipse.swt.events.MouseEvent)

mouseDown

public void mouseDown(MouseEvent e)
Deprecated. 
If Right mouse button is down, display menu, if the StyledText has one.

Specified by:
mouseDown in interface MouseListener
See Also:
MouseListener.mouseDown(org.eclipse.swt.events.MouseEvent)

mouseUp

public void mouseUp(MouseEvent e)
Deprecated. 
Specified by:
mouseUp in interface MouseListener

mouseEnter

public void mouseEnter(MouseEvent e)
Deprecated. 
Specified by:
mouseEnter in interface MouseTrackListener

mouseExit

public void mouseExit(MouseEvent e)
Deprecated. 
Specified by:
mouseExit in interface MouseTrackListener

mouseHover

public void mouseHover(MouseEvent e)
Deprecated. 
Specified by:
mouseHover in interface MouseTrackListener

setTooltipText

protected void setTooltipText(int x,
                              int y)
Deprecated. 

getToolTipFor

protected String getToolTipFor(StyleRange sr)
Deprecated. 
Parameters:
sr -
Returns:
String

getStyledText

public StyledText getStyledText()
Deprecated. 
Returns:
StyledText

setStyledText

public void setStyledText(StyledText text)
Deprecated. 
Parameters:
text -

fillMenu

protected void fillMenu(IMenuManager menu)
Deprecated. 
Parameters:
menu - IMenuManager

enableKeyBindings

protected void enableKeyBindings(boolean enable)
Deprecated. 
Parameters:
enable -

removeListeners

protected void removeListeners()
Deprecated. 

addListeners

protected void addListeners()
Deprecated. 

widgetDisposed

public void widgetDisposed(DisposeEvent e)
Deprecated. 
Specified by:
widgetDisposed in interface DisposeListener

getText

public String getText()
Deprecated. 

setText

public void setText(String text)
Deprecated. 

add

public boolean add(StyleRange sr)
Deprecated. 

isCursorInRange

protected StyleRange isCursorInRange(boolean touchFirst,
                                     boolean touchLast)
Deprecated. 
Parameters:
touchFirst - boolean cursor is on the left edge.
touchLast - boolean cursor is at the right edge.
Returns:
StyleRange in which caret is located, or null otherwise

getRangeForSelection

protected StyleRange getRangeForSelection()
Deprecated. 

isMouseInRange

protected StyleRange isMouseInRange(Point p)
Deprecated. 
Returns:
StyleRange in which caret is located, or null otherwise

isSelectionOverlapsWithRangesEx

protected boolean isSelectionOverlapsWithRangesEx(boolean touchLeft,
                                                  boolean touchRight)
Deprecated. 
Parameters:
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.
Returns:
boolean 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.

containsPoint

public static boolean containsPoint(int pt,
                                    int start,
                                    int end,
                                    boolean touchLeft,
                                    boolean touchRight)
Deprecated. 
Parameters:
pt -
start -
end -
touchLeft -
touchRight -
Returns:
boolean

verifyKey

public void verifyKey(VerifyEvent event)
Deprecated. 
checks that if typing the key will change the style range. Style Ranges are read-only areas. If either "Del" or "backspace" key was pressed we treat those as special cases. "Backspace acnnot be allowed when cursor touches a range on the right, Del cannot be allowed if cursor touches a range on the left. We also check for selection, because it can spawn across multiple ranges and start/end at where there is not range. In such case, the cursor will be outside of a range but any keu should be disabled anyway.

Specified by:
verifyKey in interface VerifyKeyListener
See Also:
VerifyKeyListener.verifyKey(org.eclipse.swt.events.VerifyEvent)

canPerform

protected boolean canPerform(int action)
Deprecated. 
called by StyledTextLogicInternalAction. Extending classes should override.

Parameters:
action - one of the supported actions (ST.COPY, ST.CUT, ST.PASTE, ST.SELECT_ALL, ST.DELETE_NEXT)
Returns:
boolean true if action is allowed, false otherwise.

doPerform

protected void doPerform(int action)
Deprecated. 

keyPressed

public void keyPressed(KeyEvent e)
Deprecated. 
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Deprecated. 
Specified by:
keyReleased in interface KeyListener

getHighlights

public ArrayList getHighlights()
Deprecated. 

size

public int size()
Deprecated. 

clear

protected void clear()
Deprecated. 

get

public Object get(int i)
Deprecated. 

remove

public Object remove(int i)
Deprecated. 

remove

public boolean remove(Object o)
Deprecated. 

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.