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

Class StyledTextLogic

    • Field Detail

      • EXTENDED_LOGIC

        public static final String EXTENDED_LOGIC
        Deprecated. 
      • ACTION_NEXT_RANGE

        protected static final int ACTION_NEXT_RANGE
        Deprecated. 
      • ACTION_PREV_RANGE

        protected static final int ACTION_PREV_RANGE
        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. 
      • shift

        protected abstract int shift(int start,
                int len,
                int shift,
                String replacedText)
        Deprecated. 
        Parameters:
        shift -
        Returns:
        0
      • 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. 
      • 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. 
      • 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. 2013. All rights reserved.