Class LineLockedFieldPanelCoordinator

  • All Implemented Interfaces:
    ViewListener
    Direct Known Subclasses:
    DualDecompilerFieldPanelCoordinator, LayoutLockedFieldPanelCoordinator

    public class LineLockedFieldPanelCoordinator
    extends FieldPanelCoordinator
    A LineLockedFieldPanelCoordinator coordinates the scrolling of a set of field panels by sharing bound scroll models that are locked together by a set of line numbers. All the field panels are locked together at the line numbers specified in the locked line array. In other words this coordinator tries to keep the indicated line for each field panel side by side with the indicated line for each other field panel.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.math.BigInteger[] lockedLineNumbers  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(FieldPanel fp)
      Adds the given field panel to the list of panels to coordinate.
      protected java.math.BigInteger getLockedLineForPanel​(FieldPanel fp)
      Gets the locked line value for the indicated panel.
      void remove​(FieldPanel fp)
      Removes the given field panel from the list of those to be coordinated.
      void resetLockedLines()
      Resets the locked line numbers for this field panel coordinator to their default of each being zero.
      void setLockedLines​(java.math.BigInteger[] lockedLineNumbers)
      Call this method whenever you want to change the line numbers that are locked together for the associated field panels.
      void viewChanged​(FieldPanel fp, java.math.BigInteger index, int xPos, int yPos)
      Notifies the listener that the top of the screen has changed position.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lockedLineNumbers

        protected java.math.BigInteger[] lockedLineNumbers
    • Constructor Detail

      • LineLockedFieldPanelCoordinator

        public LineLockedFieldPanelCoordinator​(FieldPanel[] panels)
    • Method Detail

      • resetLockedLines

        public void resetLockedLines()
        Resets the locked line numbers for this field panel coordinator to their default of each being zero.
      • setLockedLines

        public void setLockedLines​(java.math.BigInteger[] lockedLineNumbers)
        Call this method whenever you want to change the line numbers that are locked together for the associated field panels.
        Parameters:
        lockedLineNumbers - the array of locked line numbers that are directly associated with the array of field panels.
        Important: Make sure the line numbers are in the order that matches the field panels in the array.
      • add

        public void add​(FieldPanel fp)
        Adds the given field panel to the list of panels to coordinate.
        Overrides:
        add in class FieldPanelCoordinator
        Parameters:
        fp - the field panel to add.
      • viewChanged

        public void viewChanged​(FieldPanel fp,
                                java.math.BigInteger index,
                                int xPos,
                                int yPos)
        Description copied from interface: ViewListener
        Notifies the listener that the top of the screen has changed position.
        Specified by:
        viewChanged in interface ViewListener
        Overrides:
        viewChanged in class FieldPanelCoordinator
        Parameters:
        fp - the field panel whose view changed.
        index - the index of the layout at the top of the screen.
        xPos - the x coordinate of the layout displayed at the left of the screen.
        yPos - the y coordinate of the layout displayed at the top of the screen.
      • getLockedLineForPanel

        protected java.math.BigInteger getLockedLineForPanel​(FieldPanel fp)
        Gets the locked line value for the indicated panel.
        Parameters:
        fp - the field panel whose locked line value is wanted.
        Returns:
        the locked line value or null if the panel isn't found.